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:
Clyybber
2021-02-18 21:43:46 +01:00
committed by GitHub
parent 3766410178
commit c996021b5d
6 changed files with 50 additions and 33 deletions

View File

@@ -110,7 +110,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <param name="mobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
/// <returns>True on success, false if something blocked the drop.</returns>
bool Drop(string slot, bool mobChecks = true, bool doDropInteraction = true);
bool Drop(string slot, bool mobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Drops an item held by one of our hand slots to the same position as our owning entity.
@@ -125,7 +125,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <exception cref="ArgumentException">
/// Thrown if <see cref="entity"/> is not actually held in any hand.
/// </exception>
bool Drop(IEntity entity, bool mobChecks = true, bool doDropInteraction = true);
bool Drop(IEntity entity, bool mobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Drops the item in a slot.
@@ -135,7 +135,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <param name="doMobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
/// <returns>True if an item was dropped, false otherwise.</returns>
bool Drop(string slot, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true);
bool Drop(string slot, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Drop the specified entity in our hands to a certain position.
@@ -158,7 +158,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <exception cref="ArgumentException">
/// Thrown if <see cref="entity"/> is not actually held in any hand.
/// </exception>
bool Drop(IEntity entity, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true);
bool Drop(IEntity entity, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Drop the item contained in a slot into another container.
@@ -173,7 +173,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// but practical remove or insert returned false anyways.
/// This is an edge-case that is currently unhandled.
/// </exception>
bool Drop(string slot, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true);
bool Drop(string slot, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Drops an item in one of the hands into a container.
@@ -194,7 +194,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <exception cref="ArgumentException">
/// Thrown if <see cref="entity"/> is not actually held in any hand.
/// </exception>
bool Drop(IEntity entity, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true);
bool Drop(IEntity entity, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
/// <summary>
/// Checks whether the item in the specified hand can be dropped.