Set alert level command (#8507)
* Add force mode for setting alert level * Add console command for changing alert level * Filename typo * Return delta disableSelection property * Make locked a component property * Not lock green level after nuke disarm
This commit is contained in:
@@ -22,6 +22,11 @@ public sealed class AlertLevelComponent : Component
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string CurrentLevel = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Is current station level can be changed by crew.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)] public bool IsLevelLocked = false;
|
||||
|
||||
[ViewVariables] public const float Delay = 300;
|
||||
[ViewVariables] public float CurrentDelay = 0;
|
||||
[ViewVariables] public bool ActiveDelay;
|
||||
@@ -40,7 +45,7 @@ public sealed class AlertLevelComponent : Component
|
||||
return false;
|
||||
}
|
||||
|
||||
return level.Selectable && !level.DisableSelection;
|
||||
return level.Selectable && !level.DisableSelection && !IsLevelLocked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user