using System.Collections; using System.Collections.Generic; using System.ComponentModel; using EventParts; using Godot; using Godot.Bridge; using Godot.NativeInterop; [ScriptPath("res://Scripts/Events/EventParts/SetFlag.cs")] public partial class SetFlag : Node, EventPart { [Export(PropertyHint.None, "")] private SaveFile.Flags flag; [Export(PropertyHint.None, "")] private bool on = true; public bool parallel { get; set; } public EventController parent { get; set; } public Coroutine routine { get; set; } public IEnumerator Routine() { if (on) { SaveFile.AddFlag(flag); } else { SaveFile.current.flags.Remove(flag); } yield break; } }