Add gas tank valve (#19830)

This commit is contained in:
Slava0135
2023-09-05 20:20:05 +03:00
committed by GitHub
parent b1eeb07da9
commit 81388f77ed
4 changed files with 96 additions and 20 deletions

View File

@@ -260,7 +260,7 @@ public sealed class GasCanisterSystem : EntitySystem
return;
// Check the used item is valid...
if (!HasComp<GasTankComponent>(args.Used))
if (!TryComp<GasTankComponent>(args.Used, out var gasTank) || gasTank.IsValveOpen)
return;
// Preventing inserting a tank since if its locked you cant remove it.