6#include "nlua_asteroid.h"
7#include "nlua_faction.h"
11#include "nlua_system.h"
13#define HOOK_MAX_PARAM \
19typedef enum HookParamType_e {
40typedef struct HookParam_s {
66unsigned int hook_addMisn(
unsigned int parent,
const char *func,
68unsigned int hook_addEvent(
unsigned int parent,
const char *func,
70unsigned int hook_addFunc(
int ( *func )(
void * ),
void *data,
79int pilot_runHookParam(
Pilot *p,
int hook_type,
const HookParam *param,
81nlua_env
hook_env(
unsigned int hook );
134unsigned int hook_addDateMisn(
unsigned int parent,
const char *func,
135 ntime_t resolution );
136unsigned int hook_addDateEvt(
unsigned int parent,
const char *func,
137 ntime_t resolution );
unsigned int hook_addTimerEvt(unsigned int parent, const char *func, double ms)
Adds a new event type hook timer.
int hook_runIDparam(unsigned int id, const HookParam *param)
Runs a single hook by id.
int hooks_runParam(const char *stack, const HookParam *param)
Runs all the hooks of stack.
void hook_rmMisnParent(unsigned int parent)
Removes all hooks belonging to parent mission.
void hooks_update(double dt)
Updates all the hook timer related stuff.
int hook_runID(unsigned int id)
Runs a single hook by id.
unsigned int hook_addTimerFunc(int(*func)(void *), void *data, double ms)
Adds a function hook to be run.
int hook_hasEventParent(unsigned int parent)
Checks to see how many hooks there are with the same event parent.
void hook_clear(void)
Clears the hooks.
void hook_cleanup(void)
Gets rid of all current hooks.
int hooks_runParamDeferred(const char *stack, const HookParam *param)
Runs all the hooks of stack in the next frame. Does not trigger right away.
nlua_env hook_env(unsigned int hook)
Gets the lua env for a hook.
void hooks_updateDate(ntime_t change)
Updates the time to see if it should be updated.
unsigned int hook_addEvent(unsigned int parent, const char *func, const char *stack)
Adds a new event type hook.
void hook_rm(unsigned int id)
Removes a hook.
void hook_clearEventTimers(unsigned int parent)
Clears the timer hooks for an event.
void hook_exclusionEnd(double dt)
Ends exclusion zone and runs all the queued hooks.
int hooks_run(const char *stack)
Runs all the hooks of stack.
void hook_rmEventParent(unsigned int parent)
Removes all hooks belonging to parent event.
unsigned int hook_addFunc(int(*func)(void *), void *data, const char *stack)
Adds a function hook to be run.
int hook_hasMisnParent(unsigned int parent)
Checks to see how many hooks there are with the same mission parent.
void hook_exclusionStart(void)
Starts the hook exclusion zone, this makes hooks queue until exclusion is done.
unsigned int hook_addTimerMisn(unsigned int parent, const char *func, double ms)
Adds a new mission type hook timer hook.
unsigned int hook_addMisn(unsigned int parent, const char *func, const char *stack)
Adds a new mission type hook.
void hook_clearMissionTimers(unsigned int parent)
Clears the timer hooks for a mission.
The actual hook parameter.
A ship outfit, depends radically on the type.
The representation of an in-game pilot.