Closed wsalvucci closed 6 months ago
Thanks for the report. I know about the bug, but didn't know how to reproduce it. I will check, it should be pretty easy to fix.
If reproducing is still difficult, being able to toggle the capital off from these burgs would help. Right now the check looks for if the burg belongs to a state when the capital property is toggled on or off rather than just checking when it's toggled on.
editors.js
const state = pack.burgs[burg].state;
if (!state) {
tip("Neutral lands cannot have a capital", false, "error");
return;
}
Made a fix to detect wrong capitals on map load and auto-set their status to towns. Then, if the burgs are wrong, they can be removed manually.
In some cases after altering the heightmap (risky), capital burgs can detach from their state and become capitals of neutral territories. Attempting to delete the burg is not allowed because it's a capital, and attempting to un-select the capital property throws the "Neutral lands cannot have a capital" error. Therefore the burg is stuck and can only be moved around and edited, but never deleted.
I have had intermittent success reproducing this bug, so there might be other contributing factors.
I did notice in testing that when the capital detached and became a neutral city, I could not find it among the burgs printed by the following print statement I placed in the
restoreRiskedData
function inheightmap-editor.js
Steps to reproduce
Expected behavior
Land is regenerated since it still has a burg on it.
^ This is where I noticed the burg wasn't appearing in the printed data, possibly being the reason the land wasn't reset to above sea level.
.map file
BuggedMap.zip
Screenshots
System