20 lines
961 B
C++
20 lines
961 B
C++
|
#include "../../src/Battling/ScriptHandling/ItemUseScript.hpp"
|
||
|
#include "../Core.hpp"
|
||
|
using namespace CreatureLib::Battling;
|
||
|
|
||
|
export void CreatureLib_ItemUseScript_Destruct(ItemUseScript* p) { delete p; }
|
||
|
export uint8_t CreatureLib_ItemUseScript_IsItemUsable(ItemUseScript* p, uint8_t& out) { Try(out = p->IsItemUsable()) }
|
||
|
export uint8_t CreatureLib_ItemUseScript_IsCreatureUseItem(ItemUseScript* p, uint8_t& out) {
|
||
|
Try(out = p->IsCreatureUseItem())
|
||
|
}
|
||
|
|
||
|
export uint8_t CreatureLib_ItemUseScript_IsUseValidForCreature(ItemUseScript* p, Creature* creature, uint8_t& out) {
|
||
|
Try(out = p->IsUseValidForCreature(creature))
|
||
|
}
|
||
|
|
||
|
export uint8_t CreatureLib_ItemUseScript_IsHoldable(ItemUseScript* p, uint8_t& out) { Try(out = p->IsHoldable()) }
|
||
|
|
||
|
export uint8_t CreatureLib_ItemUseScript_OnUse(ItemUseScript* p) { Try(p->OnUse()) }
|
||
|
export uint8_t CreatureLib_ItemUseScript_OnCreatureUse(ItemUseScript* p, Creature* creature) {
|
||
|
Try(p->OnCreatureUse(creature))
|
||
|
}
|