From 984cd643fe8e7d1930bddb641750548280539983 Mon Sep 17 00:00:00 2001
From: deltanedas <39013340+deltanedas@users.noreply.github.com>
Date: Mon, 1 Jan 2024 08:10:48 +0000
Subject: [PATCH] light ciggies with fire structures (#23196)
the pro ops
Co-authored-by: deltanedas <@deltanedas:kde.org>
---
.../Components/AlwaysHotComponent.cs | 11 +++++++++++
.../Temperature/Systems/AlwaysHotSystem.cs | 19 +++++++++++++++++++
.../Structures/Decoration/bonfire.yml | 1 +
.../Structures/Decoration/fireplace.yml | 1 +
4 files changed, 32 insertions(+)
create mode 100644 Content.Shared/Temperature/Components/AlwaysHotComponent.cs
create mode 100644 Content.Shared/Temperature/Systems/AlwaysHotSystem.cs
diff --git a/Content.Shared/Temperature/Components/AlwaysHotComponent.cs b/Content.Shared/Temperature/Components/AlwaysHotComponent.cs
new file mode 100644
index 0000000000..8c4ba5f5d0
--- /dev/null
+++ b/Content.Shared/Temperature/Components/AlwaysHotComponent.cs
@@ -0,0 +1,11 @@
+using Content.Shared.Temperature.Systems;
+
+namespace Content.Shared.Temperature.Components;
+
+///
+/// Makes the entity always set IsHotEvent.IsHot to true, no matter what.
+///
+[RegisterComponent, Access(typeof(AlwaysHotSystem))]
+public sealed partial class AlwaysHotComponent : Component
+{
+}
diff --git a/Content.Shared/Temperature/Systems/AlwaysHotSystem.cs b/Content.Shared/Temperature/Systems/AlwaysHotSystem.cs
new file mode 100644
index 0000000000..605fc077ca
--- /dev/null
+++ b/Content.Shared/Temperature/Systems/AlwaysHotSystem.cs
@@ -0,0 +1,19 @@
+using Content.Shared.Temperature;
+using Content.Shared.Temperature.Components;
+
+namespace Content.Shared.Temperature.Systems;
+
+public sealed class AlwaysHotSystem : EntitySystem
+{
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent(OnIsHot);
+ }
+
+ private void OnIsHot(Entity ent, ref IsHotEvent args)
+ {
+ args.IsHot = true;
+ }
+}
diff --git a/Resources/Prototypes/Entities/Structures/Decoration/bonfire.yml b/Resources/Prototypes/Entities/Structures/Decoration/bonfire.yml
index 6934b67c5e..22aef79340 100644
--- a/Resources/Prototypes/Entities/Structures/Decoration/bonfire.yml
+++ b/Resources/Prototypes/Entities/Structures/Decoration/bonfire.yml
@@ -29,6 +29,7 @@
range: 5
sound:
path: /Audio/Ambience/Objects/fireplace.ogg
+ - type: AlwaysHot
- type: entity
id: LegionnaireBonfire
diff --git a/Resources/Prototypes/Entities/Structures/Decoration/fireplace.yml b/Resources/Prototypes/Entities/Structures/Decoration/fireplace.yml
index f5bbafa40c..3446c4980b 100644
--- a/Resources/Prototypes/Entities/Structures/Decoration/fireplace.yml
+++ b/Resources/Prototypes/Entities/Structures/Decoration/fireplace.yml
@@ -45,3 +45,4 @@
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
+ - type: AlwaysHot
--
2.51.2