Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[timestream] more tick triggers according to reverse engineering #1254

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Template for new versions:
- `open-legends`: don't intercept text bound for vanilla search widgets
- `gui/unit-info-viewer`: correctly display skill levels when rust is involved
- `timestream`: fix dwarves spending too long eating and drinking
- `timestream`: accelerate job creation in proportion to calendar time advancement
- `locate-ore`: fix sometimes selecting an incorrect tile when there are multiple mineral veins in a single map block
- `gui/settings-manager`: fix position of "settings restored" message on embark when the player has no saved embark profiles
- `build-now`: fix error when building buildings that (in previous DF versions) required the architecture labor
Expand Down
12 changes: 11 additions & 1 deletion timestream.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,17 @@ end

-- ensure we never skip over cur_year_tick values that match this list
local TICK_TRIGGERS = {
{mod=10, rem={0}}, -- season ticks and (mod=100) crop growth
{mod=10, rem={0}}, -- 0: season ticks (and lots of other stuff)
-- 0 mod 100: crop growth, strange mood, minimap update, rot
-- 20 mod 100: building updates
-- 40 mod 100: assign tombs to newly tomb-eligible corpses
-- 80 mod 100: incarceration updates
-- 40 mod 1000: remove excess seeds
{mod=50, rem={25, 35, 45}}, -- 25: stockpile updates
-- 35: check bags
-- 35 mod 100: job auction
-- 45: stockpile updates
{mod=100, rem={99}}, -- 99: new job creation
}

-- "owed" ticks we would like to skip at the next opportunity
Expand Down