Don't remove borg access without power (#41844)

* init

* comment
This commit is contained in:
ScarKy0 2025-12-14 01:42:54 +01:00 committed by GitHub
parent 7d1c75c1bb
commit 15968acdf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,6 @@ public sealed partial class BorgChassisComponent : Component
/// <summary>
/// Is this borg currently activated?
/// If activated the borg
/// - has door access,
/// - can use modules and
/// - has full movement speed.
/// To be activated the borg

View file

@ -50,7 +50,6 @@ public abstract partial class SharedBorgSystem
/// <summary>
/// Activates or deactivates a borg.
/// If active the borg
/// - has door access,
/// - can use modules and
/// - has full movement speed.
/// </summary>
@ -67,7 +66,6 @@ public abstract partial class SharedBorgSystem
else
DisableAllModules(chassis.AsNullable());
_access.SetAccessEnabled(chassis.Owner, active); // Needs a player so that scientists can't drag around an empty borg for free AA.
_powerCell.SetDrawEnabled(chassis.Owner, active);
_movementSpeedModifier.RefreshMovementSpeedModifiers(chassis);

View file

@ -199,6 +199,7 @@ public abstract partial class SharedBorgSystem : EntitySystem
TryActivate(chassis);
_access.SetAccessEnabled(chassis.Owner, true); // Needs a player so that scientists can't drag around an empty borg for free AA.
_appearance.SetData(chassis.Owner, BorgVisuals.HasPlayer, true);
}
@ -211,6 +212,8 @@ public abstract partial class SharedBorgSystem : EntitySystem
// Turn off the light so that the no-player visuals can be seen.
if (TryComp<HandheldLightComponent>(chassis.Owner, out var light))
_handheldLight.TurnOff((chassis.Owner, light), makeNoise: false); // Already plays a sound when toggling the borg off.
_access.SetAccessEnabled(chassis.Owner, false); // Needs a player so that scientists can't drag around an empty borg for free AA.
_appearance.SetData(chassis.Owner, BorgVisuals.HasPlayer, false);
}