decouple ItemToggle from PowerCellDraw (#31392)

* remove ItemToggle from PowerCellDraw query

* add EntityQuery for resolves, make them all optional

* move integration to ToggleCellDraw

* add ToggleCellDraw to almost every PowerCellDraw prototype

* :trollface:

* :trollface:

* :trollface:

* let it disable on mapinit

* set update time on mapinit, make borg power logic consistent now

* :trollface:

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-08-25 12:17:03 +00:00
committed by GitHub
parent 42865ae705
commit e1df251cbc
15 changed files with 99 additions and 28 deletions

View File

@@ -8,7 +8,6 @@ namespace Content.Shared.PowerCell;
/// </summary>
/// <remarks>
/// With ActivatableUI it will activate and deactivate when the ui is opened and closed, drawing power inbetween.
/// Requires <see cref="ItemToggleComponent"/> to work.
/// </remarks>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class PowerCellDrawComponent : Component
@@ -30,9 +29,8 @@ public sealed partial class PowerCellDrawComponent : Component
#endregion
/// <summary>
/// Whether drawing is enabled, regardless of ItemToggle.
/// Whether drawing is enabled.
/// Having no cell will still disable it.
/// Only use this if you really don't want it to use power for some time.
/// </summary>
[DataField, AutoNetworkedField]
public bool Enabled = true;