Replace IClickAlert with events (#30728)

* Replace IAlertClick with events

* whoop

* eek!
This commit is contained in:
Nemanja
2024-08-07 01:15:35 -04:00
committed by GitHub
parent 2dabf33d46
commit ce97225c2d
33 changed files with 177 additions and 270 deletions

View File

@@ -72,6 +72,7 @@ namespace Content.Server.Atmos.EntitySystems
SubscribeLocalEvent<FlammableComponent, IsHotEvent>(OnIsHot);
SubscribeLocalEvent<FlammableComponent, TileFireEvent>(OnTileFire);
SubscribeLocalEvent<FlammableComponent, RejuvenateEvent>(OnRejuvenate);
SubscribeLocalEvent<FlammableComponent, ResistFireAlertEvent>(OnResistFireAlert);
SubscribeLocalEvent<IgniteOnCollideComponent, StartCollideEvent>(IgniteOnCollide);
SubscribeLocalEvent<IgniteOnCollideComponent, LandEvent>(OnIgniteLand);
@@ -250,6 +251,15 @@ namespace Content.Server.Atmos.EntitySystems
Extinguish(uid, component);
}
private void OnResistFireAlert(Entity<FlammableComponent> ent, ref ResistFireAlertEvent args)
{
if (args.Handled)
return;
Resist(ent, ent);
args.Handled = true;
}
public void UpdateAppearance(EntityUid uid, FlammableComponent? flammable = null, AppearanceComponent? appearance = null)
{
if (!Resolve(uid, ref flammable, ref appearance))