Dating sim codes consolidating entries
name - The name of the stat, used to caption it when the stat is displayed.
var - A string containing the name of the variable that contains the stat.
The events are always kept in priority order, with lower numbers being higher priority.
The first event in the list is recorded as being executed, and then executed.
The event function takes one keyword argument, priority which gives the priority of the event. If any condition is false, the event is discarded, otherwise it is added to the event list.
Events with a smaller priority number are considered before those with a larger priority number, with the default priority being 100. Then, the list is filtered and random elements chosen such that only one event is in each choice group, for the events that are in choice groups.
The variables are registered using the register_stat function.
This should be called from init code to declare a stat.
Jumping to will both end the current period, and cause the next period to be skipped.
Events are declared by calling the event(name, ...) function from inside an init block.
There are a few entry points that are used in main to call the event dispatcher.
First of all, there is the function check_skip_period(), that should be called to determine if a period should be run at all.