Revert EventManager to previous behavior, but keep new events

Fixes #2031
develop
Josh Cooper 2022-03-29 09:42:24 -07:00 committed by GitHub
parent b1dafe3a6a
commit b18eff9ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 436 additions and 503 deletions

@ -22,7 +22,7 @@ namespace DFHack {
JOB_INITIATED,
JOB_STARTED, //has a worker
JOB_COMPLETED,
NEW_UNIT_ACTIVE,
UNIT_NEW_ACTIVE,
UNIT_DEATH,
ITEM_CREATED,
BUILDING,
@ -42,7 +42,6 @@ namespace DFHack {
typedef void (*callback_t)(color_ostream&, void*); //called when the event happens
callback_t eventHandler;
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) {
}

File diff suppressed because it is too large Load Diff