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:
@@ -282,6 +282,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
{
|
||||
Popup.PopupEntity(Loc.GetString("borg-mind-added", ("name", Identity.Name(uid, EntityManager))), uid);
|
||||
Toggle.TryActivate(uid);
|
||||
_powerCell.SetDrawEnabled(uid, _mobState.IsAlive(uid));
|
||||
_appearance.SetData(uid, BorgVisuals.HasPlayer, true);
|
||||
}
|
||||
|
||||
@@ -292,6 +293,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
{
|
||||
Popup.PopupEntity(Loc.GetString("borg-mind-removed", ("name", Identity.Name(uid, EntityManager))), uid);
|
||||
Toggle.TryDeactivate(uid);
|
||||
_powerCell.SetDrawEnabled(uid, false);
|
||||
_appearance.SetData(uid, BorgVisuals.HasPlayer, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user