Closed RedRafe closed 5 months ago
On previous version, these chests spawning too close to chunk's intersection could be troublesome as they were too close to empty chunks even when invalid. So it's now not possible to spawn chests too close to the intersections, as per defined radius (RADIUS = 3
) used to search for nearby empty chunks
Yes, looking at how your system is implemented, I think I could change it to that since I don't need the table to stay ordered and I'm actively traversing it rather than reacting to events.
But I would probably need to get rid of the chest removing at on_chunk_unlocked
since I couldn't go back to the data from the entity.unit_number
(well, I could simply iterate the list and compare IDs but at that point, I'd just wait for on_tick
to catch up and do the cleaning itself)
But I would probably need to get rid of the chest removing at
on_chunk_unlocked
...
Why would you need to remove chests when a chunk is unloaded? Unless you can have multiple chests that unlock the same chunk?
My naïve thinking of how this would work is, you would look to add chests when a new chunk is unlocked and remove completed chests on_tick and generate the chunk. (I haven't properly read through the code yet, so I might be missing something obvious.)
Unless you can have multiple chests that unlock the same chunk?
Yes, when 2+ active chunks form an angle, the hidden chunk in between them can be unlocked by any of the adjacent chunks. So when a new chunk is unlocked, I search the nearby chunks for those "obvious invalid chests" to remove them promptly instead of waiting for the on_tick
cleaner to loop them
@grilledham can I get an update on this thread? Since this map seems to be the next one coming up on S13, would be better to integrate the 1st round of fixes & eventually leave this open for further improvements/code refactors thanks to the 2nd round of play testing Let me know 😄
Ok, let's merge it now.
Scenario changes:
max_ore_multiplier
dropped from 0.33 to 0.20 (meaning 20% resources will be devolved into expansion)peaceful = true
Then mainly bugfixes for incorrect chest behaviors & chunk position computation that lead into map locks during 1st run