public StoredSettings() { Mode = BehaviorMode.Init; CurrentTargetEntityId = 0; StoredCustomBooleans = new Dictionary <string, bool>(); StoredCustomCounters = new Dictionary <string, int>(); Triggers = new List <TriggerProfile>(); DamageTriggers = new List <TriggerProfile>(); CommandTriggers = new List <TriggerProfile>(); CompromisedTriggers = new List <TriggerProfile>(); TotalDamageAccumulated = 0; LastDamageTakenTime = MyAPIGateway.Session.GameDateTime; CustomTargetProfile = ""; RotationDirection = Direction.Forward; BlockOrientation = new SerializableBlockOrientation(Base6Directions.Direction.Forward, Base6Directions.Direction.Up); DespawnCoords = Vector3D.Zero; StoredCoords = Vector3D.Zero; StartCoords = Vector3D.Zero; LastDamagerEntity = 0; AutoPilotFlags = NewAutoPilotMode.None; APDataMode = AutoPilotDataMode.Primary; PrimaryAutopilotId = ""; SecondaryAutopilotId = ""; TertiaryAutopilotId = ""; IgnoreTriggers = false; }
public StoredSettings(StoredSettings oldSettings, bool preserveSettings, bool preserveTriggers, bool preserveTargetProfile) : base() { //Stuff From Old Settings if (!preserveSettings) { return; } //this.Mode = oldSettings.Mode; this.StoredCustomBooleans = oldSettings.StoredCustomBooleans; this.StoredCustomCounters = oldSettings.StoredCustomCounters; this.TotalDamageAccumulated = oldSettings.TotalDamageAccumulated; this.LastDamageTakenTime = oldSettings.LastDamageTakenTime; this.RotationDirection = oldSettings.RotationDirection; this.BlockOrientation = oldSettings.BlockOrientation; this.DespawnCoords = oldSettings.DespawnCoords; this.StoredCoords = oldSettings.StoredCoords; this.StartCoords = oldSettings.StartCoords; this.LastDamagerEntity = oldSettings.LastDamagerEntity; this.AutoPilotFlags = oldSettings.AutoPilotFlags; this.APDataMode = oldSettings.APDataMode; //Triggers if (preserveTriggers) { this.Triggers = oldSettings.Triggers; this.DamageTriggers = oldSettings.DamageTriggers; this.CommandTriggers = oldSettings.CommandTriggers; this.CompromisedTriggers = oldSettings.CompromisedTriggers; } else { IgnoreTriggers = true; } //TargetProfile if (preserveTargetProfile) { this.CustomTargetProfile = oldSettings.CustomTargetProfile; this.CurrentTargetEntityId = oldSettings.CurrentTargetEntityId; } this.SetRotation(RotationDirection); }