Feature/1754 kill player on body parts missing (#2014)
* Moved the uplink creation code to the PresetSuspicion.Start method to ensure uplink created when we give the traitor role Moved the starting TC balance to cvars * Added isVital flag for body parts Automatically killing creature if last vital body part removed Marked head as vital part
This commit is contained in:
@@ -152,6 +152,13 @@ namespace Content.Server.Body
|
||||
[ViewVariables]
|
||||
public IReadOnlyCollection<IMechanism> Mechanisms => _mechanisms;
|
||||
|
||||
/// <summary>
|
||||
/// Represents if body part is vital for creature.
|
||||
/// If the last vital body part is removed creature dies
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public bool IsVital { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// This method is called by
|
||||
/// <see cref="IBodyManagerComponent.PreMetabolism"/> before
|
||||
@@ -451,6 +458,7 @@ namespace Content.Server.Body
|
||||
RSIPath = data.RSIPath;
|
||||
RSIState = data.RSIState;
|
||||
MaxDurability = data.Durability;
|
||||
IsVital = data.IsVital;
|
||||
|
||||
if (!prototypeManager.TryIndex(data.DamageContainerPresetId,
|
||||
out DamageContainerPrototype damageContainerData))
|
||||
|
||||
Reference in New Issue
Block a user