Add EventHook parameter to item use scripts
All checks were successful
Build / Build (push) Successful in 47s
All checks were successful
Build / Build (push) Successful in 47s
Items can be used on Pokemon outside of battle, and we want the user of the library to be able to check for what changed. This allows for example a heal event to be sent back to the user of the library after using an item.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using PkmnLib.Dynamic.Events;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Utils;
|
||||
@@ -55,15 +56,14 @@ public abstract class ItemScript : IDeepCloneable
|
||||
/// <summary>
|
||||
/// Handles the use of the item.
|
||||
/// </summary>
|
||||
public virtual void OnUse()
|
||||
public virtual void OnUse(EventHook eventHook)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the use of the item on the given target.
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
public virtual void OnUseWithTarget(IPokemon target)
|
||||
public virtual void OnUseWithTarget(IPokemon target, EventHook eventHook)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user