More magic (#338)
* - tweak: Magic tweaks. * - add: Rework some spells. * - fix: Some bugfixes. * - tweak: Less requirements. * - add: Loc.
This commit is contained in:
@@ -219,7 +219,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
_appearance.SetData(uid, ElectrifiedVisuals.IsPowered, true);
|
||||
|
||||
siemens *= electrified.SiemensCoefficient;
|
||||
if (!DoCommonElectrocutionAttempt(targetUid, uid, ref siemens) || siemens <= 0)
|
||||
if (targetUid != electrified.Caster && !DoCommonElectrocutionAttempt(targetUid, uid, ref siemens, electrified.IgnoreInsulation) || siemens <= 0) // WD EDIT
|
||||
return false; // If electrocution would fail, do nothing.
|
||||
|
||||
var targets = new List<(EntityUid entity, int depth)>();
|
||||
@@ -230,13 +230,19 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
for (var i = targets.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var (entity, depth) = targets[i];
|
||||
|
||||
if (entity == electrified.Caster) // WD
|
||||
continue;
|
||||
|
||||
lastRet = TryDoElectrocution(
|
||||
entity,
|
||||
uid,
|
||||
(int) (electrified.ShockDamage * MathF.Pow(RecursiveDamageMultiplier, depth)),
|
||||
TimeSpan.FromSeconds(electrified.ShockTime * MathF.Pow(RecursiveTimeMultiplier, depth)),
|
||||
true,
|
||||
electrified.SiemensCoefficient
|
||||
electrified.SiemensCoefficient,
|
||||
null, // WD EDIT START
|
||||
electrified.IgnoreInsulation // WD EDIT END
|
||||
);
|
||||
}
|
||||
|
||||
@@ -518,4 +524,4 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
|
||||
_audio.PlayPvs(electrified.ShockNoises, targetUid, AudioParams.Default.WithVolume(electrified.ShockVolume));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user