@@ -103,13 +103,14 @@ public abstract class SharedVirtualItemSystem : EntitySystem
|
||||
/// <param name="blockingEnt">The entity we will make a virtual entity copy of</param>
|
||||
/// <param name="user">The entity that we want to insert the virtual entity</param>
|
||||
/// <param name="dropOthers">Whether or not to try and drop other items to make space</param>
|
||||
public bool TrySpawnVirtualItemInHand(EntityUid blockingEnt, EntityUid user, bool dropOthers = false)
|
||||
/// <param name="silent">If true this won't show a popup when dropping other items</param>
|
||||
public bool TrySpawnVirtualItemInHand(EntityUid blockingEnt, EntityUid user, bool dropOthers = false, bool silent = false)
|
||||
{
|
||||
return TrySpawnVirtualItemInHand(blockingEnt, user, out _, dropOthers);
|
||||
return TrySpawnVirtualItemInHand(blockingEnt, user, out _, dropOthers, silent: silent);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="TrySpawnVirtualItemInHand(Robust.Shared.GameObjects.EntityUid,Robust.Shared.GameObjects.EntityUid,bool)"/>
|
||||
public bool TrySpawnVirtualItemInHand(EntityUid blockingEnt, EntityUid user, [NotNullWhen(true)] out EntityUid? virtualItem, bool dropOthers = false, string? empty = null)
|
||||
public bool TrySpawnVirtualItemInHand(EntityUid blockingEnt, EntityUid user, [NotNullWhen(true)] out EntityUid? virtualItem, bool dropOthers = false, string? empty = null, bool silent = false)
|
||||
{
|
||||
virtualItem = null;
|
||||
if (empty == null && !_handsSystem.TryGetEmptyHand(user, out empty))
|
||||
@@ -128,7 +129,7 @@ public abstract class SharedVirtualItemSystem : EntitySystem
|
||||
if (!_handsSystem.TryDrop(user, hand))
|
||||
continue;
|
||||
|
||||
if (!TerminatingOrDeleted(held))
|
||||
if (!silent && !TerminatingOrDeleted(held))
|
||||
_popup.PopupClient(Loc.GetString("virtual-item-dropped-other", ("dropped", held)), user, user);
|
||||
|
||||
empty = hand;
|
||||
|
||||
Reference in New Issue
Block a user