Resolves https://github.com/space-wizards/space-station-14/issues/4832
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
||||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!;
|
||||
@@ -206,19 +207,19 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
|
||||
if (canister.Air.Pressure < 10)
|
||||
{
|
||||
appearance.SetData(GasCanisterVisuals.PressureState, 0);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.PressureState, 0, appearance);
|
||||
}
|
||||
else if (canister.Air.Pressure < Atmospherics.OneAtmosphere)
|
||||
{
|
||||
appearance.SetData(GasCanisterVisuals.PressureState, 1);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.PressureState, 1, appearance);
|
||||
}
|
||||
else if (canister.Air.Pressure < (15 * Atmospherics.OneAtmosphere))
|
||||
{
|
||||
appearance.SetData(GasCanisterVisuals.PressureState, 2);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.PressureState, 2, appearance);
|
||||
}
|
||||
else
|
||||
{
|
||||
appearance.SetData(GasCanisterVisuals.PressureState, 3);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.PressureState, 3, appearance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +235,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
_userInterfaceSystem.GetUiOrNull(uid, GasCanisterUiKey.Key)?.Open(actor.PlayerSession);
|
||||
_userInterfaceSystem.TryOpen(uid, GasCanisterUiKey.Key, actor.PlayerSession);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
@@ -246,13 +247,13 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
if (TryComp<LockComponent>(uid, out var lockComponent) && lockComponent.Locked)
|
||||
return;
|
||||
|
||||
_userInterfaceSystem.GetUiOrNull(uid, GasCanisterUiKey.Key)?.Open(actor.PlayerSession);
|
||||
_userInterfaceSystem.TryOpen(uid, GasCanisterUiKey.Key, actor.PlayerSession);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnCanisterInteractUsing(EntityUid canister, GasCanisterComponent component, InteractUsingEvent args)
|
||||
{
|
||||
var container = canister.EnsureContainer<ContainerSlot>(component.ContainerName);
|
||||
var container = _containerSystem.EnsureContainer<ContainerSlot>(canister, component.ContainerName);
|
||||
|
||||
// Container full.
|
||||
if (container.ContainedEntity != null)
|
||||
@@ -277,10 +278,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
|
||||
DirtyUI(uid, component);
|
||||
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
appearance.SetData(GasCanisterVisuals.TankInserted, true);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.TankInserted, true);
|
||||
}
|
||||
|
||||
private void OnCanisterContainerRemoved(EntityUid uid, GasCanisterComponent component, EntRemovedFromContainerMessage args)
|
||||
@@ -290,10 +288,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
|
||||
DirtyUI(uid, component);
|
||||
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
appearance.SetData(GasCanisterVisuals.TankInserted, false);
|
||||
_appearanceSystem.SetData(uid, GasCanisterVisuals.TankInserted, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
damageModifierSet: Metallic
|
||||
@@ -124,6 +125,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
# Filled canisters, contain 1871.71051 moles each
|
||||
|
||||
@@ -157,6 +159,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
- type: entity
|
||||
parent: GasCanister
|
||||
@@ -187,6 +190,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
- type: entity
|
||||
parent: GasCanister
|
||||
@@ -218,6 +222,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
- type: entity
|
||||
parent: GasCanister
|
||||
@@ -250,6 +255,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
@@ -322,6 +328,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
@@ -359,6 +366,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
- type: entity
|
||||
parent: GasCanister
|
||||
@@ -395,6 +403,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
@@ -434,6 +443,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
|
||||
- type: entity
|
||||
parent: GasCanister
|
||||
@@ -471,6 +481,7 @@
|
||||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- !type:DumpCanisterBehavior
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user