|
|
|
@ -40,8 +40,8 @@ namespace DFHack {
|
|
|
|
|
struct EventHandler {
|
|
|
|
|
typedef void (*callback_t)(color_ostream&, void*); //called when the event happens
|
|
|
|
|
callback_t eventHandler;
|
|
|
|
|
int32_t freq;
|
|
|
|
|
int32_t when;
|
|
|
|
|
int32_t freq; //how often event is allowed to fire (in ticks) use 0 to always fire when possible
|
|
|
|
|
int32_t when; //when to fire event (global tick count)
|
|
|
|
|
|
|
|
|
|
EventHandler(callback_t eventHandlerIn, int32_t freqIn): eventHandler(eventHandlerIn), freq(freqIn) {
|
|
|
|
|
}
|
|
|
|
|