Реворк экспедиций (#360)

* - add: Expedition rework.

* - tweak: Hardsuit tweak.
This commit is contained in:
Aviu00
2024-06-16 15:33:26 +00:00
committed by GitHub
parent b6d9ee496a
commit 3353440a99
19 changed files with 280 additions and 115 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.Damage;
using Content.Shared.Mobs.Systems;
using Content.Shared.Projectiles;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Audio;
@@ -15,6 +16,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
[Dependency] private readonly INetManager _netManager = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly MobStateSystem _mobState = default!; // WD
public override void Initialize()
{
@@ -32,7 +34,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
RemCompDeferred<DamageMarkerComponent>(uid);
_audio.PlayPredicted(component.Sound, uid, args.User);
if (TryComp<LeechOnMarkerComponent>(args.Used, out var leech))
if (TryComp<LeechOnMarkerComponent>(args.Used, out var leech) && !_mobState.IsDead(uid)) // WD EDIT
{
_damageable.TryChangeDamage(args.User, leech.Leech, true, false, origin: args.Used);
}