Trigger Refactor (#39034)

This commit is contained in:
slarticodefast
2025-08-03 21:20:37 +02:00
committed by GitHub
parent 777e89ab3e
commit 2c40a950f7
256 changed files with 3987 additions and 2892 deletions

View File

@@ -58,7 +58,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly TurfSystem _turf = default!;
private static readonly ProtoId<StatusEffectPrototype> StatusEffectKey = "Electrocution";
private static readonly ProtoId<StatusEffectPrototype> StatusKeyIn = "Electrocution";
private static readonly ProtoId<DamageTypePrototype> DamageType = "Shock";
private static readonly ProtoId<TagPrototype> WindowTag = "Window";
@@ -386,12 +386,12 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
}
if (!Resolve(uid, ref statusEffects, false) ||
!_statusEffects.CanApplyEffect(uid, StatusEffectKey, statusEffects))
!_statusEffects.CanApplyEffect(uid, StatusKeyIn, statusEffects))
{
return false;
}
if (!_statusEffects.TryAddStatusEffect<ElectrocutedComponent>(uid, StatusEffectKey, time, refresh, statusEffects))
if (!_statusEffects.TryAddStatusEffect<ElectrocutedComponent>(uid, StatusKeyIn, time, refresh, statusEffects))
return false;
var shouldStun = siemensCoefficient > 0.5f;