Basic gibbing (#2973)

* Adds gibbing

* Adds adminbused absurd-damage foamblade

* Sane parts

* BaseOrgan -> BaseMechanism

* Do not do random offset on shared, fix killing oneself with click attacks

* BaseMechanism -> BaseHumanOrgan -> *stuff*

* Account for prediction, again

* Add gibbing sound
This commit is contained in:
Vera Aguilera Puerto
2021-01-10 20:12:34 +01:00
committed by GitHub
parent 8def38aed4
commit 12c733654c
18 changed files with 172 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Damage;
@@ -11,7 +12,10 @@ using Content.Shared.GameObjects.Components.Body.Template;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Utility;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Containers;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
@@ -19,6 +23,7 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using Component = Robust.Shared.GameObjects.Component;
namespace Content.Shared.GameObjects.Components.Body
{
@@ -697,6 +702,17 @@ namespace Content.Shared.GameObjects.Components.Body
}
}
}
public virtual void Gib(bool gibParts = false)
{
foreach (var (_, part) in Parts)
{
RemovePart(part);
if (gibParts)
part.Gib();
}
}
}
[Serializable, NetSerializable]