Class SharedObjectivesSystem
Provides API for creating and interacting with objectives.
Inheritance
System.Object
SharedObjectivesSystem
Assembly: Content.Shared.dll
Syntax
public abstract class SharedObjectivesSystem : EntitySystem
Methods
|
Improve this Doc
View Source
CanBeAssigned(EntityUid, EntityUid, MindComponent, ObjectiveComponent)
Checks requirements and duplicate objectives to see if an objective can be assigned.
Declaration
public bool CanBeAssigned(EntityUid uid, EntityUid mindId, MindComponent mind, ObjectiveComponent comp = null)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
GetInfo(EntityUid, EntityUid, MindComponent)
Declaration
public ObjectiveInfo? GetInfo(EntityUid uid, EntityUid mindId, MindComponent mind = null)
Parameters
| Type |
Name |
Description |
| EntityUid |
uid |
|
| EntityUid |
mindId |
|
| MindComponent |
mind |
|
Returns
| Type |
Description |
| System.Nullable<Content.Shared.Objectives.ObjectiveInfo> |
|
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
SetIcon(EntityUid, SpriteSpecifier, ObjectiveComponent)
Sets the objective's icon to the one specified.
Intended for Content.Shared.Objectives.Components.ObjectiveAfterAssignEvent handlers to set an icon.
Declaration
public void SetIcon(EntityUid uid, SpriteSpecifier icon, ObjectiveComponent comp = null)
Parameters
| Type |
Name |
Description |
| EntityUid |
uid |
|
| Robust.Shared.Utility.SpriteSpecifier |
icon |
|
| ObjectiveComponent |
comp |
|
|
Improve this Doc
View Source
TryCreateObjective(EntityUid, MindComponent, String)
Spawns and assigns an objective for a mind.
The objective is not added to the mind's objectives, mind system does that in TryAddObjective.
If the objective could not be assigned the objective is deleted and null is returned.
Declaration
public EntityUid? TryCreateObjective(EntityUid mindId, MindComponent mind, string proto)
Parameters
| Type |
Name |
Description |
| EntityUid |
mindId |
|
| MindComponent |
mind |
|
| System.String |
proto |
|
Returns
| Type |
Description |
| System.Nullable<EntityUid> |
|