Body code cleanup (#24946)
* Fix test * Kill float accumulators * Use entity proxy methods * DataField auto name generation where possible * Kill comp properties * Clean up server comps * Make events record structs * Clean up shared body code * Clean up server body code * Rename organ events to be same names as in med refactor
This commit is contained in:
@@ -101,17 +101,17 @@ namespace Content.Server.Hands.Systems
|
||||
|
||||
private void HandleBodyPartAdded(EntityUid uid, HandsComponent component, ref BodyPartAddedEvent args)
|
||||
{
|
||||
if (args.Part.PartType != BodyPartType.Hand)
|
||||
if (args.Part.Comp.PartType != BodyPartType.Hand)
|
||||
return;
|
||||
|
||||
// If this annoys you, which it should.
|
||||
// Ping Smugleaf.
|
||||
var location = args.Part.Symmetry switch
|
||||
var location = args.Part.Comp.Symmetry switch
|
||||
{
|
||||
BodyPartSymmetry.None => HandLocation.Middle,
|
||||
BodyPartSymmetry.Left => HandLocation.Left,
|
||||
BodyPartSymmetry.Right => HandLocation.Right,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(args.Part.Symmetry))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(args.Part.Comp.Symmetry))
|
||||
};
|
||||
|
||||
AddHand(uid, args.Slot, location);
|
||||
@@ -119,7 +119,7 @@ namespace Content.Server.Hands.Systems
|
||||
|
||||
private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref BodyPartRemovedEvent args)
|
||||
{
|
||||
if (args.Part.PartType != BodyPartType.Hand)
|
||||
if (args.Part.Comp.PartType != BodyPartType.Hand)
|
||||
return;
|
||||
|
||||
RemoveHand(uid, args.Slot);
|
||||
|
||||
Reference in New Issue
Block a user