nakedmudv3.3/
nakedmudv3.3/lib/
nakedmudv3.3/lib/logs/
nakedmudv3.3/lib/misc/
nakedmudv3.3/lib/players/
nakedmudv3.3/lib/txt/
nakedmudv3.3/lib/world/
nakedmudv3.3/lib/world/examples/
nakedmudv3.3/lib/world/examples/mproto/
nakedmudv3.3/lib/world/examples/oproto/
nakedmudv3.3/lib/world/examples/reset/
nakedmudv3.3/lib/world/examples/rproto/
nakedmudv3.3/lib/world/examples/trigger/
nakedmudv3.3/lib/world/limbo/
nakedmudv3.3/lib/world/limbo/room/
nakedmudv3.3/lib/world/limbo/rproto/
nakedmudv3.3/src/alias/
nakedmudv3.3/src/char_vars/
nakedmudv3.3/src/editor/
nakedmudv3.3/src/example_module/
nakedmudv3.3/src/help/
nakedmudv3.3/src/set_val/
nakedmudv3.3/src/socials/
nakedmudv3.3/src/time/
#ifndef __ACTION_H
#define __ACTION_H
//*****************************************************************************
//
// action.h
//
// this is the interface for the action handler. Actions are temporally
// delayed events (e.g. preparing a spell, swinging a sword, etc). Players
// may only be taking 1 action at a time, and any time a new action for a
// character is added, the previous one is terminated.
//
//*****************************************************************************




//
// must called before actions can be used
//
void init_actions();


//
// Pulse all of the actions 
//
void pulse_actions(int time);


//
// Interrupt whatever action the character is taking. Do nothing if
// the character is not taking an action currently. "where" is used
// in conjunction with the faculties module. If you have not installed
// the faculties module, pass in 1.
//
void interrupt_action(void *ch, bitvector_t where);


//
// Returns TRUE if the character is performing an action with "where". If
// the faculty module is not installed, "where" should be 1.
//
bool is_acting(void *ch, bitvector_t where);


//
// Start a character performing an action. If the delay reaches 0, on_complete
// is run. If the action is terminated prematurely, on_interrupt is run.
//
// on_complete must be a pointer to a function that takes the character as
// its first argument, the data as its second argument, a bitvector for
// faculties (even if you don't have that module installed ... it must take
// this argument, even if it doesn't use it) and the char arg as its 
// fourth argument.
//
// on_interrupt must take the same arguments as on_complete.
//
// "where" is used in conjunection with the faculties module. If you have not
// installed the faculties module, pass in 1.
//
// for an example of how start_action works, see admin.c (cmd_dsay)
//
void start_action(void           *ch, 
		  int          delay,
		  bitvector_t  where,
		  void  *on_complete,
		  void *on_interrupt,
		  void         *data,
		  const char    *arg);

#endif // __ACTION_H