-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Every zone's "area.json" should have custom settings to determine how it should refresh.
The following rules should be available:
-
"min_reset_age": int
The minimum number of area ticks necessary before an update is considered.
Default:AREA_RESET_MINIMUM_AGE(3) -
"always_reset_age": int
The maximum number of area ticks that can pass before an update occurs.
Default:AREA_RESET_ALWAYS_AGE(31) -
"active_reset_age": int
The maximum number of area ticks that can pass before an update occurs If players have been in (or are currently in) this zone before a reset occurs.
Default:AREA_RESET_AFTER_PLAYERS_AGE(15)
To implement this, we'll need some new fields for struct area_data in structs.h:
int min_reset_age;
int always_reset_age;
int active_reset_age;
When creating new areas, area_init() in recycle.c should set the defaults to the #defines listed in the JSON description.
The area_should_update() function in areas.c should be modified to use the new fields instead of the hard-coded #defines.