Температурные пушки (#90)

* - add: Temperature guns.

* - tweak: Change cryo sting slowdown.

* - tweak: Tempgun tweaks.

* - add: Hardsuit temperature adjustment system.
This commit is contained in:
Aviu00
2024-02-18 17:28:18 +09:00
committed by GitHub
parent 0b6fd195a7
commit 9caa5a408b
42 changed files with 383 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Server.Administration.Systems;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
@@ -11,6 +11,7 @@ using Content.Server.Mind;
using Content.Server.Polymorph.Systems;
using Content.Server.Popups;
using Content.Server.Store.Components;
using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Shared.Actions;
using Content.Shared.Changeling;
@@ -431,7 +432,8 @@ public sealed partial class ChangelingSystem
private void OnCryoSting(EntityUid uid, ChangelingComponent component, CryoStingActionEvent args)
{
if (!HasComp<HumanoidAppearanceComponent>(args.Target))
if (!HasComp<HumanoidAppearanceComponent>(args.Target) ||
!TryComp(args.Target, out TemperatureComponent? temperature))
{
_popup.PopupEntity(Loc.GetString("changeling-popup-cant-sting"), uid, uid);
return;
@@ -440,10 +442,8 @@ public sealed partial class ChangelingSystem
if (!TakeChemicals(uid, component, 15))
return;
var statusTimeSpan = TimeSpan.FromSeconds(30);
_statusEffectsSystem.TryAddStatusEffect(args.Target, "SlowedDown", statusTimeSpan, false, "SlowedDown");
_temperatureSystem.ForceChangeTemperature(args.Target, 100);
_temperatureSystem.ForceChangeTemperature(args.Target, MathF.Min(70, temperature.CurrentTemperature),
temperature);
args.Handled = true;
}