Editable "NeedsHands" for SharedPullerComponent using SharedPullingStateManagementSystem (#21960)
* Editable "NeedsHands" for SharedPullerComponent
* is { get; set; } better?
* Waiter, waiter! There's a worm in my access!
They call me the worst clown there is.
* Get the comp to dirty.
This commit is contained in:
@@ -210,5 +210,18 @@ namespace Content.Shared.Pulling
|
|||||||
RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true);
|
RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Changes if the entity needs a hand in order to be able to pull objects.
|
||||||
|
/// </summary>
|
||||||
|
public void ChangeHandRequirement(EntityUid uid, bool needsHands, SharedPullerComponent? comp)
|
||||||
|
{
|
||||||
|
if (!Resolve(uid, ref comp, false))
|
||||||
|
return;
|
||||||
|
|
||||||
|
comp.NeedsHands = needsHands;
|
||||||
|
|
||||||
|
Dirty(uid, comp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user