Skip to content

quickfix: repair unassigned site_id on reclaimed fortresses - #5948

Open
Alistair-Afton wants to merge 1 commit into
DFHack:developfrom
Alistair-Afton:quickfix-site-id
Open

Alistair-Afton wants to merge 1 commit into
DFHack:developfrom
Alistair-Afton:quickfix-site-id

Conversation

@Alistair-Afton

Copy link
Copy Markdown
Contributor

Summary

Implements the mitigation discussed in #5937: on map load, if plotinfo.site_id is still -1 (a vanilla defect on reclaimed fortresses until the first save), it is restored from plotinfo.main.fortress_site, which is set at embark.

Lives in quickfix alongside the existing entity race repair, called from onMapLoad.default.init. Silent unless it actually repairs something.

Testing

  • New test/modules/quickfix_fortress.lua: fabricates the defect (site_id = -1), verifies the repair restores fortress_site.id, and verifies a no-op when site_id is already assigned.
  • 2/2 tests, 3/3 checks pass in-game on 53.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant