Spill hand contents when dropping them in a fall (#3304)
* Spill hand contents when dropping them due to falling down * Better approach * cleanup * grammar * stupid
This commit is contained in:
@@ -716,11 +716,11 @@ namespace Content.Server.GameObjects.EntitySystems.Click
|
||||
/// Activates the Dropped behavior of an object
|
||||
/// Verifies that the user is capable of doing the drop interaction first
|
||||
/// </summary>
|
||||
public bool TryDroppedInteraction(IEntity user, IEntity item)
|
||||
public bool TryDroppedInteraction(IEntity user, IEntity item, bool intentional)
|
||||
{
|
||||
if (user == null || item == null || !ActionBlockerSystem.CanDrop(user)) return false;
|
||||
|
||||
DroppedInteraction(user, item);
|
||||
DroppedInteraction(user, item, intentional);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -728,9 +728,9 @@ namespace Content.Server.GameObjects.EntitySystems.Click
|
||||
/// Calls Dropped on all components that implement the IDropped interface
|
||||
/// on an entity that has been dropped.
|
||||
/// </summary>
|
||||
public void DroppedInteraction(IEntity user, IEntity item)
|
||||
public void DroppedInteraction(IEntity user, IEntity item, bool intentional)
|
||||
{
|
||||
var dropMsg = new DroppedMessage(user, item);
|
||||
var dropMsg = new DroppedMessage(user, item, intentional);
|
||||
RaiseLocalEvent(dropMsg);
|
||||
if (dropMsg.Handled)
|
||||
{
|
||||
@@ -742,7 +742,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click
|
||||
// Call Land on all components that implement the interface
|
||||
foreach (var comp in comps)
|
||||
{
|
||||
comp.Dropped(new DroppedEventArgs(user));
|
||||
comp.Dropped(new DroppedEventArgs(user, intentional));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user