Fix more component-dependency purge issues (#6178)
This commit is contained in:
@@ -131,7 +131,7 @@ namespace Content.Server.Doors.Components
|
||||
|
||||
public bool IsPowered()
|
||||
{
|
||||
return _entityManager.TryGetComponent<ApcPowerReceiverComponent>(Owner, out var receiverComponent) && receiverComponent.Powered;
|
||||
return !_entityManager.TryGetComponent<ApcPowerReceiverComponent>(Owner, out var receiverComponent) || receiverComponent.Powered;
|
||||
}
|
||||
|
||||
public void UpdateBoltLightStatus()
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Content.Server.Morgue.Components
|
||||
|
||||
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
if (_entities.TryGetComponent<AppearanceComponent>(Owner, out var appearance)) return;
|
||||
if (!_entities.TryGetComponent<AppearanceComponent>(Owner, out var appearance)) return;
|
||||
|
||||
if (inDetailsRange)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.Power.Components
|
||||
return;
|
||||
|
||||
var accessSystem = EntitySystem.Get<AccessReaderSystem>();
|
||||
if (_entMan.TryGetComponent<AccessReaderComponent>(Owner, out var accessReaderComponent) || accessSystem.IsAllowed(accessReaderComponent, attached))
|
||||
if (!_entMan.TryGetComponent<AccessReaderComponent>(Owner, out var accessReaderComponent) || accessSystem.IsAllowed(accessReaderComponent, attached))
|
||||
{
|
||||
MainBreakerEnabled = !MainBreakerEnabled;
|
||||
_entMan.GetComponent<PowerNetworkBatteryComponent>(Owner).CanDischarge = MainBreakerEnabled;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Content.Server.Power.Components
|
||||
|
||||
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
if (_entityManager.TryGetComponent<BatteryComponent>(Owner, out var batteryComponent))
|
||||
if (!_entityManager.TryGetComponent<BatteryComponent>(Owner, out var batteryComponent))
|
||||
return;
|
||||
if (inDetailsRange)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user