adds a source uid to most damage & mobstate events (#11559)
Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
This commit is contained in:
@@ -105,7 +105,7 @@ namespace Content.Server.Electrocution
|
||||
_prototypeManager.Index<DamageTypePrototype>(DamageType),
|
||||
(int) finished.AccumulatedDamage);
|
||||
|
||||
var actual = _damageableSystem.TryChangeDamage(finished.Electrocuting, damage);
|
||||
var actual = _damageableSystem.TryChangeDamage(finished.Electrocuting, damage, origin: finished.Source);
|
||||
if (actual != null)
|
||||
{
|
||||
_adminLogger.Add(LogType.Electrocution,
|
||||
@@ -315,6 +315,7 @@ namespace Content.Server.Electrocution
|
||||
|
||||
electrocutionComponent.TimeLeft = 1f;
|
||||
electrocutionComponent.Electrocuting = uid;
|
||||
electrocutionComponent.Source = sourceUid;
|
||||
|
||||
RaiseLocalEvent(uid, new ElectrocutedEvent(uid, sourceUid, siemensCoefficient), true);
|
||||
|
||||
@@ -369,7 +370,7 @@ namespace Content.Server.Electrocution
|
||||
if(shockDamage is {} dmg)
|
||||
{
|
||||
var actual = _damageableSystem.TryChangeDamage(uid,
|
||||
new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>(DamageType), dmg));
|
||||
new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>(DamageType), dmg), origin: sourceUid);
|
||||
|
||||
if (actual != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user