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