Light Cigars when interacting with hot stuff (#5879)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
JustinTime
2021-12-24 04:59:14 -07:00
committed by GitHub
parent 105b38b7f4
commit 0fd0035581
3 changed files with 27 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Maps;
using Content.Shared.Physics;
using Content.Shared.Temperature;
using Content.Shared.Shuttles.Components;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
@@ -52,7 +53,7 @@ namespace Content.Server.Shuttles.EntitySystems
SubscribeLocalEvent<ThrusterComponent, PowerChangedEvent>(OnPowerChange);
SubscribeLocalEvent<ThrusterComponent, AnchorStateChangedEvent>(OnAnchorChange);
SubscribeLocalEvent<ThrusterComponent, RotateEvent>(OnRotate);
SubscribeLocalEvent<ThrusterComponent, IsHotEvent>(OnIsHotEvent);
SubscribeLocalEvent<ThrusterComponent, StartCollideEvent>(OnStartCollide);
SubscribeLocalEvent<ThrusterComponent, EndCollideEvent>(OnEndCollide);
@@ -95,6 +96,11 @@ namespace Content.Server.Shuttles.EntitySystems
_mapManager.TileChanged -= OnTileChange;
}
private void OnIsHotEvent(EntityUid uid, ThrusterComponent component, IsHotEvent args)
{
args.IsHot = component.Type != ThrusterType.Angular && component.IsOn;
}
private void OnTileChange(object? sender, TileChangedEventArgs e)
{
// If the old tile was space but the new one isn't then disable all adjacent thrusters