Aghosts and other powerful beings no longer burn their hands on lights. (#23879)
Make aghosts and other things that can't take burn damage not burn their hand when changing lightbolbs
This commit is contained in:
@@ -127,19 +127,20 @@ namespace Content.Server.Light.EntitySystems
|
|||||||
var burnedHand = light.CurrentLit && res < lightBulb.BurningTemperature;
|
var burnedHand = light.CurrentLit && res < lightBulb.BurningTemperature;
|
||||||
if (burnedHand)
|
if (burnedHand)
|
||||||
{
|
{
|
||||||
// apply damage to users hands and show message with sound
|
|
||||||
var burnMsg = Loc.GetString("powered-light-component-burn-hand");
|
|
||||||
_popupSystem.PopupEntity(burnMsg, uid, userUid);
|
|
||||||
|
|
||||||
var damage = _damageableSystem.TryChangeDamage(userUid, light.Damage, origin: userUid);
|
var damage = _damageableSystem.TryChangeDamage(userUid, light.Damage, origin: userUid);
|
||||||
|
|
||||||
|
// If damage is null then the entity could not take heat damage so they did not get burned.
|
||||||
if (damage != null)
|
if (damage != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var burnMsg = Loc.GetString("powered-light-component-burn-hand");
|
||||||
|
_popupSystem.PopupEntity(burnMsg, uid, userUid);
|
||||||
_adminLogger.Add(LogType.Damaged, $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
|
_adminLogger.Add(LogType.Damaged, $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
|
||||||
|
_audio.PlayEntity(light.BurnHandSound, Filter.Pvs(uid), uid, true);
|
||||||
|
|
||||||
_audio.PlayEntity(light.BurnHandSound, Filter.Pvs(uid), uid, true);
|
args.Handled = true;
|
||||||
|
return;
|
||||||
args.Handled = true;
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user