Client LuaCsForBarotrauma
ClearTagAction.cs
1 namespace Barotrauma
2 {
3 
8  {
9  [Serialize("", IsPropertySaveable.Yes, description: "The tag to clear.")]
10  public Identifier Tag { get; set; }
11 
12  private bool isFinished;
13 
14  public ClearTagAction(ScriptedEvent parentEvent, ContentXElement element) : base(parentEvent, element) { }
15 
16  public override bool IsFinished(ref string goToLabel) => isFinished;
17 
18  public override void Reset()
19  {
20  isFinished = false;
21  }
22 
23  public override void Update(float deltaTime)
24  {
25  if (isFinished) { return; }
26 
27  if (!Tag.IsEmpty)
28  {
30  }
31  isFinished = true;
32  }
33 
34  public override string ToDebugString()
35  {
36  return $"{ToolBox.GetDebugSymbol(isFinished)} {nameof(ClearTagAction)} -> (Tag: {Tag.ColorizeObject()})";
37  }
38  }
39 }
Clears the specific tag from the event (i.e. untagging all the entities that have been previously giv...
override string ToDebugString()
Rich test to display in debugdraw
override void Update(float deltaTime)
override bool IsFinished(ref string goToLabel)
Has the action finished.
ClearTagAction(ScriptedEvent parentEvent, ContentXElement element)
readonly ScriptedEvent ParentEvent
Definition: EventAction.cs:102
void RemoveTag(Identifier tag)