Miscellaneous Body Decoupling (#38958)
This commit is contained in:
@@ -117,19 +117,18 @@ public sealed class SharpSystem : EntitySystem
|
||||
popupEnt = Spawn(proto, coords.Offset(_robustRandom.NextVector2(0.25f)));
|
||||
}
|
||||
|
||||
var hasBody = TryComp<BodyComponent>(args.Args.Target.Value, out var body);
|
||||
|
||||
// only show a big popup when butchering living things.
|
||||
var popupType = PopupType.Small;
|
||||
if (hasBody)
|
||||
popupType = PopupType.LargeCaution;
|
||||
// Meant to differentiate cutting up clothes and cutting up your boss.
|
||||
var popupType = HasComp<MobStateComponent>(args.Args.Target.Value)
|
||||
? PopupType.LargeCaution
|
||||
: PopupType.Small;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("butcherable-knife-butchered-success", ("target", args.Args.Target.Value), ("knife", Identity.Entity(uid, EntityManager))),
|
||||
popupEnt, args.Args.User, popupType);
|
||||
|
||||
if (hasBody)
|
||||
_bodySystem.GibBody(args.Args.Target.Value, body: body);
|
||||
popupEnt,
|
||||
args.Args.User,
|
||||
popupType);
|
||||
|
||||
_bodySystem.GibBody(args.Args.Target.Value); // does nothing if ent can't be gibbed
|
||||
_destructibleSystem.DestroyEntity(args.Args.Target.Value);
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
Reference in New Issue
Block a user