|
|
@ -98,6 +98,7 @@ DEFINE_LUA_EVENT_NH_1(onBuildingCreatedDestroyed, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobInitiated, df::job*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobInitiated, df::job*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobStarted, df::job*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobStarted, df::job*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobCompleted, df::job*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onJobCompleted, df::job*);
|
|
|
|
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onNewUnitActive, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onUnitDeath, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onUnitDeath, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onItemCreated, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onItemCreated, int32_t);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onConstructionCreatedDestroyed, df::construction*);
|
|
|
|
DEFINE_LUA_EVENT_NH_1(onConstructionCreatedDestroyed, df::construction*);
|
|
|
@ -125,6 +126,7 @@ DFHACK_PLUGIN_LUA_EVENTS {
|
|
|
|
DFHACK_LUA_EVENT(onJobInitiated),
|
|
|
|
DFHACK_LUA_EVENT(onJobInitiated),
|
|
|
|
DFHACK_LUA_EVENT(onJobStarted),
|
|
|
|
DFHACK_LUA_EVENT(onJobStarted),
|
|
|
|
DFHACK_LUA_EVENT(onJobCompleted),
|
|
|
|
DFHACK_LUA_EVENT(onJobCompleted),
|
|
|
|
|
|
|
|
DFHACK_LUA_EVENT(onNewUnitActive),
|
|
|
|
DFHACK_LUA_EVENT(onUnitDeath),
|
|
|
|
DFHACK_LUA_EVENT(onUnitDeath),
|
|
|
|
DFHACK_LUA_EVENT(onItemCreated),
|
|
|
|
DFHACK_LUA_EVENT(onItemCreated),
|
|
|
|
DFHACK_LUA_EVENT(onSyndrome),
|
|
|
|
DFHACK_LUA_EVENT(onSyndrome),
|
|
|
@ -152,6 +154,11 @@ void ev_mng_jobCompleted(color_ostream& out, void* job)
|
|
|
|
df::job* ptr=reinterpret_cast<df::job*>(job);
|
|
|
|
df::job* ptr=reinterpret_cast<df::job*>(job);
|
|
|
|
onJobCompleted(out,ptr);
|
|
|
|
onJobCompleted(out,ptr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ev_mng_newUnitActive(color_ostream& out, void* ptr)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int32_t myId=(int32_t)(intptr_t)ptr;
|
|
|
|
|
|
|
|
onNewUnitActive(out,myId);
|
|
|
|
|
|
|
|
}
|
|
|
|
void ev_mng_unitDeath(color_ostream& out, void* ptr)
|
|
|
|
void ev_mng_unitDeath(color_ostream& out, void* ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int32_t myId=(int32_t)(intptr_t)ptr;
|
|
|
|
int32_t myId=(int32_t)(intptr_t)ptr;
|
|
|
|