Toy Box filled with toys (ready for merge) (#16252)
This commit is contained in:
@@ -106,13 +106,15 @@ public abstract partial class SharedVehicleSystem : EntitySystem
|
||||
// Add Rider
|
||||
if (args.Buckling)
|
||||
{
|
||||
// Add a virtual item to rider's hand, unbuckle if we can't.
|
||||
if (!_virtualItemSystem.TrySpawnVirtualItemInHand(uid, args.BuckledEntity))
|
||||
if (component.UseHand == true)
|
||||
{
|
||||
_buckle.TryUnbuckle(uid, uid, true);
|
||||
return;
|
||||
// Add a virtual item to rider's hand, unbuckle if we can't.
|
||||
if (!_virtualItemSystem.TrySpawnVirtualItemInHand(uid, args.BuckledEntity))
|
||||
{
|
||||
_buckle.TryUnbuckle(uid, uid, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Set up the rider and vehicle with each other
|
||||
EnsureComp<InputMoverComponent>(uid);
|
||||
var rider = EnsureComp<RiderComponent>(args.BuckledEntity);
|
||||
@@ -148,7 +150,9 @@ public abstract partial class SharedVehicleSystem : EntitySystem
|
||||
|
||||
// Clean up actions and virtual items
|
||||
_actionsSystem.RemoveProvidedActions(args.BuckledEntity, uid);
|
||||
_virtualItemSystem.DeleteInHandsMatching(args.BuckledEntity, uid);
|
||||
|
||||
if (component.UseHand == true)
|
||||
_virtualItemSystem.DeleteInHandsMatching(args.BuckledEntity, uid);
|
||||
|
||||
|
||||
// Entity is no longer riding
|
||||
|
||||
Reference in New Issue
Block a user