Files
wwdpublic/Content.Server/_Goobstation/Temperature/KillOnOverheatSystem.cs
sleepyyapril 6249942d3e Goob Mechs (#1611)
# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

We like mechs here, yeah?

---

# Changelog

<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

🆑 Mocho, John Space
- tweak: The H.O.N.K. has received an airtight cabin for honk operations
in outer space.
- add: Added the Ripley MK-II, a heavy, slow all-purpose mech, featuring
a pressurized cabin for space operations.
- add: Added the Clarke, A fast moving mech for space travel, with built
in thrusters (not certain if they work properly though :trollface:)
- add: Added the Gygax, a lightly armored and highly mobile mech with
enough force to rip walls, or someone's head off.
- add: Added the Durand, a slow but beefy combat suit that you dont want
to fight in close quarters.
- add: Added the Marauder, a specialized mech issued to ERT operatives.
- add: Added the Seraph, a specialized combat suit issued to ???
operatives.
- add: The syndicate has started issuing units under the codenames "Dark
Gygax" and "Mauler" to syndicate agents at an introductory price.
- add: The exosuit fabricator can now be emagged to reveal new recipes.
- add: There are 4 new bounties cargo can fulfill for mechs. Feedback on
the cost/reward is welcome!

---------

Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
Co-authored-by: John Space <bigdumb421@gmail.com>
Co-authored-by: gluesniffler <159397573+gluesniffler@users.noreply.github.com>
Co-authored-by: ScyronX <166930367+ScyronX@users.noreply.github.com>

(cherry picked from commit e3003b67014565816e83556c826a8bba344aac94)
2025-01-23 08:06:20 +03:00

34 lines
1.2 KiB
C#

using Content.Server.Temperature.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Popups;
using Content.Shared.Damage.Components;
namespace Content.Server._Goobstation.Temperature;
public sealed class KillOnOverheatSystem : EntitySystem
{
[Dependency] private readonly MobStateSystem _mob = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Update(float frameTime)
{
base.Update(frameTime);
var query = EntityQueryEnumerator<KillOnOverheatComponent, TemperatureComponent, MobStateComponent>();
while (query.MoveNext(out var uid, out var comp, out var temp, out var mob))
{
if (mob.CurrentState == MobState.Dead
|| temp.CurrentTemperature < comp.OverheatThreshold
|| HasComp<GodmodeComponent>(uid))
continue;
var msg = Loc.GetString(comp.OverheatPopup, ("name", Identity.Name(uid, EntityManager)));
_popup.PopupEntity(msg, uid, PopupType.LargeCaution);
_mob.ChangeMobState(uid, MobState.Dead, mob);
}
}
}