Update DamageableSystem to modern standards (#39417)
* Update DamageableSystem to modern standards * DamageContainerId -> DamageContainerID with lint flag * Replace strings with protoids * Make CVar subscription declarations all consistently whitespaced * ChangeDamage -> TryChangeDamage, cope with C# jank * Revert event signature changes * Restore a comment * Re-add two queries * Init the queries * Use appearanceQuery in DamageChanged * Use damageableQuery in TryChangeDamage * Use damageableQuery in SetDamageModifierSetId * Final cleanup, fix sandboxing * Rectify ExplosionSystem:::ProcessEntity's call to TryChangeDamage * Re-organize DamageableSystem * first big fuck you breaking change. * THATS A LOT OF DAMAGE!!! * Fix test fails * test fixes 2 * push it --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cf66dd7b35
commit
cdbe92d37d
@@ -2,7 +2,7 @@ using Content.Shared.CCVar;
|
||||
using Content.Shared.Chemistry.Hypospray.Events;
|
||||
using Content.Shared.Climbing.Components;
|
||||
using Content.Shared.Climbing.Events;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Medical;
|
||||
using Content.Shared.Popups;
|
||||
@@ -95,7 +95,7 @@ public sealed class ClumsySystem : EntitySystem
|
||||
args.Cancelled = true; // fail to catch
|
||||
|
||||
if (ent.Comp.CatchingFailDamage != null)
|
||||
_damageable.TryChangeDamage(ent, ent.Comp.CatchingFailDamage, origin: args.Item);
|
||||
_damageable.ChangeDamage(ent.Owner, ent.Comp.CatchingFailDamage, origin: args.Item);
|
||||
|
||||
// Collisions don't work properly with PopupPredicted or PlayPredicted.
|
||||
// So we make this server only.
|
||||
@@ -127,7 +127,7 @@ public sealed class ClumsySystem : EntitySystem
|
||||
return;
|
||||
|
||||
if (ent.Comp.GunShootFailDamage != null)
|
||||
_damageable.TryChangeDamage(ent, ent.Comp.GunShootFailDamage, origin: ent);
|
||||
_damageable.ChangeDamage(ent.Owner, ent.Comp.GunShootFailDamage, origin: ent);
|
||||
|
||||
_stun.TryUpdateParalyzeDuration(ent, ent.Comp.GunShootFailStunTime);
|
||||
|
||||
@@ -199,7 +199,7 @@ public sealed class ClumsySystem : EntitySystem
|
||||
{
|
||||
stunTime = bonkComp.BonkTime;
|
||||
if (bonkComp.BonkDamage != null)
|
||||
_damageable.TryChangeDamage(target, bonkComp.BonkDamage, true);
|
||||
_damageable.ChangeDamage(target.Owner, bonkComp.BonkDamage, true);
|
||||
}
|
||||
|
||||
_stun.TryUpdateParalyzeDuration(target, stunTime);
|
||||
|
||||
Reference in New Issue
Block a user