Trigger Refactor (#39034)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user