Class SharedActionsSystem
Inheritance
System.Object
SharedActionsSystem
Assembly: Content.Shared.dll
Syntax
public abstract class SharedActionsSystem : EntitySystem
Fields
|
Improve this Doc
View Source
GameTiming
Declaration
protected readonly IGameTiming GameTiming
Field Value
Type |
Description |
Robust.Shared.Timing.IGameTiming |
|
Methods
|
Improve this Doc
View Source
ActionAdded(EntityUid, EntityUid, ActionsComponent, BaseActionComponent)
This method gets called after a new action got added.
Declaration
protected virtual void ActionAdded(EntityUid performer, EntityUid actionId, ActionsComponent comp, BaseActionComponent action)
Parameters
|
Improve this Doc
View Source
ActionRemoved(EntityUid, EntityUid, ActionsComponent, BaseActionComponent)
This method gets called after an action got removed.
Declaration
protected virtual void ActionRemoved(EntityUid performer, EntityUid actionId, ActionsComponent comp, BaseActionComponent action)
Parameters
|
Improve this Doc
View Source
AddAction(EntityUid, EntityUid, EntityUid, ActionsComponent, BaseActionComponent, ActionsContainerComponent)
Adds a pre-existing action.
Declaration
public bool AddAction(EntityUid performer, EntityUid actionId, EntityUid container, ActionsComponent comp = null, BaseActionComponent action = null, ActionsContainerComponent containerComp = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
AddAction(EntityUid, ref Nullable<EntityUid>, out BaseActionComponent, Nullable<String>, EntityUid, ActionsComponent)
Declaration
public bool AddAction(EntityUid performer, ref EntityUid? actionId, out BaseActionComponent action, string? actionPrototypeId, EntityUid container = null, ActionsComponent component = null)
Parameters
Type |
Name |
Description |
EntityUid |
performer |
|
System.Nullable<EntityUid> |
actionId |
|
BaseActionComponent |
action |
|
System.Nullable<System.String> |
actionPrototypeId |
|
EntityUid |
container |
|
ActionsComponent |
component |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
AddAction(EntityUid, ref Nullable<EntityUid>, Nullable<String>, EntityUid, ActionsComponent)
Adds an action to an action holder. If the given entity does not exist, it will attempt to spawn one.
If the holder has no actions component, this will give them one.
Declaration
public bool AddAction(EntityUid performer, ref EntityUid? actionId, string? actionPrototypeId, EntityUid container = null, ActionsComponent component = null)
Parameters
Type |
Name |
Description |
EntityUid |
performer |
Entity to receive the actions
|
System.Nullable<EntityUid> |
actionId |
Action entity to add
|
System.Nullable<System.String> |
actionPrototypeId |
The action entity prototype id to use if is invalid.
|
EntityUid |
container |
The entity that contains/enables this action (e.g., flashlight)..
|
ActionsComponent |
component |
The 's action component of
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
AddAction(EntityUid, Nullable<String>, EntityUid, ActionsComponent)
Declaration
public EntityUid? AddAction(EntityUid performer, string? actionPrototypeId, EntityUid container = null, ActionsComponent component = null)
Parameters
Type |
Name |
Description |
EntityUid |
performer |
|
System.Nullable<System.String> |
actionPrototypeId |
|
EntityUid |
container |
|
ActionsComponent |
component |
|
Returns
Type |
Description |
System.Nullable<EntityUid> |
|
|
Improve this Doc
View Source
AddActionDirect(EntityUid, EntityUid, ActionsComponent, BaseActionComponent)
Adds a pre-existing action. This also bypasses the requirement that the given action must be stored in a
valid action container.
Declaration
public bool AddActionDirect(EntityUid performer, EntityUid actionId, ActionsComponent comp = null, BaseActionComponent action = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetActions(EntityUid, ActionsComponent)
Declaration
public IEnumerable<(EntityUid Id, BaseActionComponent Comp)> GetActions(EntityUid holderId, ActionsComponent actions = null)
Parameters
Returns
|
Improve this Doc
View Source
GrantActions(EntityUid, IEnumerable<EntityUid>, EntityUid, ActionsComponent, ActionsContainerComponent)
Grant pre-existing actions. If the entity has no action component, this will give them one.
Declaration
public void GrantActions(EntityUid performer, IEnumerable<EntityUid> actions, EntityUid container, ActionsComponent comp = null, ActionsContainerComponent containerComp = null)
Parameters
Type |
Name |
Description |
EntityUid |
performer |
Entity to receive the actions
|
IEnumerable<EntityUid> |
actions |
The actions to add
|
EntityUid |
container |
The entity that enables these actions (e.g., flashlight). May be null (innate actions).
|
ActionsComponent |
comp |
|
ActionsContainerComponent |
containerComp |
|
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
PerformAction(EntityUid, ActionsComponent, EntityUid, BaseActionComponent, BaseActionEvent, TimeSpan, Boolean)
Declaration
public void PerformAction(EntityUid performer, ActionsComponent component, EntityUid actionId, BaseActionComponent action, BaseActionEvent actionEvent, TimeSpan curTime, bool predicted = true)
Parameters
|
Improve this Doc
View Source
RemoveAction(EntityUid, Nullable<EntityUid>, ActionsComponent, BaseActionComponent)
Declaration
public void RemoveAction(EntityUid performer, EntityUid? actionId, ActionsComponent comp = null, BaseActionComponent action = null)
Parameters
|
Improve this Doc
View Source
RemoveAction(Nullable<EntityUid>)
Declaration
public void RemoveAction(EntityUid? actionId)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
|
Improve this Doc
View Source
RemoveProvidedActions(EntityUid, EntityUid, ActionsComponent)
Remove any actions that were enabled by some other entity. Useful when unequiping items that grant actions.
Declaration
public void RemoveProvidedActions(EntityUid performer, EntityUid container, ActionsComponent comp = null)
Parameters
Type |
Name |
Description |
EntityUid |
performer |
|
EntityUid |
container |
|
ActionsComponent |
comp |
|
|
Improve this Doc
View Source
ResolveActionData(Nullable<EntityUid>, ref BaseActionComponent, Boolean)
Declaration
public bool ResolveActionData(EntityUid? uid, ref BaseActionComponent result, bool logError = true)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
uid |
|
BaseActionComponent |
result |
|
System.Boolean |
logError |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SetCharges(Nullable<EntityUid>, Nullable<Int32>)
Declaration
public void SetCharges(EntityUid? actionId, int? charges)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
System.Nullable<System.Int32> |
charges |
|
|
Improve this Doc
View Source
SetCooldown(Nullable<EntityUid>, TimeSpan, TimeSpan)
Declaration
public void SetCooldown(EntityUid? actionId, TimeSpan start, TimeSpan end)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
TimeSpan |
start |
|
TimeSpan |
end |
|
|
Improve this Doc
View Source
SetEnabled(Nullable<EntityUid>, Boolean)
Declaration
public void SetEnabled(EntityUid? actionId, bool enabled)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
System.Boolean |
enabled |
|
|
Improve this Doc
View Source
SetEntityIcon(EntityUid, Nullable<EntityUid>, BaseActionComponent)
Declaration
public void SetEntityIcon(EntityUid uid, EntityUid? icon, BaseActionComponent action = null)
Parameters
|
Improve this Doc
View Source
SetToggled(Nullable<EntityUid>, Boolean)
Declaration
public void SetToggled(EntityUid? actionId, bool toggled)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
System.Boolean |
toggled |
|
|
Improve this Doc
View Source
StartUseDelay(Nullable<EntityUid>)
Declaration
public void StartUseDelay(EntityUid? actionId)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
|
Improve this Doc
View Source
TryGetActionData(Nullable<EntityUid>, out BaseActionComponent, Boolean)
Declaration
public bool TryGetActionData(EntityUid? uid, out BaseActionComponent result, bool logError = true)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
uid |
|
BaseActionComponent |
result |
|
System.Boolean |
logError |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UpdateAction(Nullable<EntityUid>, BaseActionComponent)
Declaration
protected virtual void UpdateAction(EntityUid? actionId, BaseActionComponent action = null)
Parameters
|
Improve this Doc
View Source
ValidateEntityTarget(EntityUid, EntityUid, EntityTargetActionComponent)
Declaration
public bool ValidateEntityTarget(EntityUid user, EntityUid target, EntityTargetActionComponent action)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ValidateWorldTarget(EntityUid, EntityCoordinates, WorldTargetActionComponent)
Declaration
public bool ValidateWorldTarget(EntityUid user, EntityCoordinates coords, WorldTargetActionComponent action)
Parameters
Returns
Type |
Description |
System.Boolean |
|