Fix being gibbed when commiting suicide or ghosting while crit'd
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Content.Server.Commands.Chat
|
|||||||
var kind = suicide.Suicide(target, chat);
|
var kind = suicide.Suicide(target, chat);
|
||||||
if (kind != SuicideKind.Special)
|
if (kind != SuicideKind.Special)
|
||||||
{
|
{
|
||||||
damageableComponent.ChangeDamage(kind switch
|
damageableComponent.SetDamage(kind switch
|
||||||
{
|
{
|
||||||
SuicideKind.Blunt => DamageType.Blunt,
|
SuicideKind.Blunt => DamageType.Blunt,
|
||||||
SuicideKind.Slash => DamageType.Slash,
|
SuicideKind.Slash => DamageType.Slash,
|
||||||
@@ -52,8 +52,7 @@ namespace Content.Server.Commands.Chat
|
|||||||
SuicideKind.Bloodloss => DamageType.Bloodloss,
|
SuicideKind.Bloodloss => DamageType.Bloodloss,
|
||||||
_ => DamageType.Blunt
|
_ => DamageType.Blunt
|
||||||
},
|
},
|
||||||
500,
|
200, source);
|
||||||
true, source);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +118,7 @@ namespace Content.Server.Commands.Chat
|
|||||||
var selfMessage = Loc.GetString("You attempt to bite your own tongue!");
|
var selfMessage = Loc.GetString("You attempt to bite your own tongue!");
|
||||||
owner.PopupMessage(selfMessage);
|
owner.PopupMessage(selfMessage);
|
||||||
|
|
||||||
dmgComponent.ChangeDamage(DamageType.Piercing, 500, true, owner);
|
dmgComponent.SetDamage(DamageType.Piercing, 200, owner);
|
||||||
|
|
||||||
// Prevent the player from returning to the body. Yes, this is an ugly hack.
|
// Prevent the player from returning to the body. Yes, this is an ugly hack.
|
||||||
var ghost = new Ghost(){CanReturn = false};
|
var ghost = new Ghost(){CanReturn = false};
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Content.Server.GameTicking
|
|||||||
if (playerEntity.TryGetComponent(out IDamageableComponent? damageable))
|
if (playerEntity.TryGetComponent(out IDamageableComponent? damageable))
|
||||||
{
|
{
|
||||||
//todo: what if they dont breathe lol
|
//todo: what if they dont breathe lol
|
||||||
damageable.ChangeDamage(DamageType.Asphyxiation, 100, true);
|
damageable.SetDamage(DamageType.Asphyxiation, 200, playerEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Content.Server.Administration;
|
using Content.Server.Administration;
|
||||||
|
using Content.Server.Commands.Observer;
|
||||||
using Content.Server.GameObjects.Components.Access;
|
using Content.Server.GameObjects.Components.Access;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
using Content.Server.GameObjects.Components.Items.Storage;
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
|
|||||||
Reference in New Issue
Block a user