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:
Morbo
2022-05-29 07:36:50 +03:00
committed by GitHub
parent 594499a9a2
commit 1fc7c72b22
5 changed files with 73 additions and 5 deletions

View File

@@ -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;
}
}
}