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:
creadth
2020-09-03 21:35:39 +03:00
committed by GitHub
parent 5f79d3e31d
commit b8bf100277
7 changed files with 50 additions and 38 deletions

View File

@@ -33,6 +33,8 @@ namespace Content.Shared.Body.Part
private string _rsiState;
private int _size;
private string _surgeryDataName;
private bool _isVital;
[ViewVariables] public string Name => _name;
@@ -66,6 +68,8 @@ namespace Content.Shared.Body.Part
[ViewVariables] public string ID => _id;
[ViewVariables] public bool IsVital => _isVital;
public virtual void LoadFrom(YamlMappingNode mapping)
{
var serializer = YamlObjectSerializer.NewReader(mapping);
@@ -86,6 +90,7 @@ namespace Content.Shared.Body.Part
serializer.DataField(ref _resistanceSetId, "resistances", string.Empty);
serializer.DataField(ref _properties, "properties", new List<IExposeData>());
serializer.DataField(ref _mechanisms, "mechanisms", new List<string>());
serializer.DataField(ref _isVital, "isVital", false);
foreach (var property in _properties)
{