2021-03-07 09:54:42 +00:00
|
|
|
#include "../../src/Battling/ScriptHandling/ItemUseScript.hpp"
|
|
|
|
#include "../Core.hpp"
|
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
|
|
|
export void CreatureLib_ItemUseScript_Destruct(ItemUseScript* p) { delete p; }
|
2022-03-23 12:56:45 +00:00
|
|
|
export u8 CreatureLib_ItemUseScript_IsItemUsable(ItemUseScript* p, u8& out) { Try(out = p->IsItemUsable()) }
|
|
|
|
export u8 CreatureLib_ItemUseScript_IsCreatureUseItem(ItemUseScript* p, u8& out) { Try(out = p->IsCreatureUseItem()) }
|
2021-03-07 09:54:42 +00:00
|
|
|
|
2022-03-23 12:56:45 +00:00
|
|
|
export u8 CreatureLib_ItemUseScript_IsUseValidForCreature(ItemUseScript* p, Creature* creature, u8& out) {
|
2021-03-07 09:54:42 +00:00
|
|
|
Try(out = p->IsUseValidForCreature(creature))
|
|
|
|
}
|
|
|
|
|
2022-03-23 12:56:45 +00:00
|
|
|
export u8 CreatureLib_ItemUseScript_IsHoldable(ItemUseScript* p, u8& out) { Try(out = p->IsHoldable()) }
|
2021-03-07 09:54:42 +00:00
|
|
|
|
2022-03-23 12:56:45 +00:00
|
|
|
export u8 CreatureLib_ItemUseScript_OnUse(ItemUseScript* p, Battle* battle) { Try(p->OnUse(battle)) }
|
|
|
|
export u8 CreatureLib_ItemUseScript_OnCreatureUse(ItemUseScript* p, Creature* creature, bool isBattle) {
|
2022-02-13 12:40:33 +00:00
|
|
|
Try(p->OnCreatureUse(creature, isBattle))
|
2021-03-07 09:54:42 +00:00
|
|
|
}
|