Update random dungeon chest spawning conditions #723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Someone mentioned that dungeon chests may sometimes spawned in walls or overlapped another chest. Spawning in walls may not be an issue, but overlapping could bother gameplay experience by the chest interactions since one of them may not be usable at the same time.
This only updates the world generation system afterwards, so the worlds generated before this may have introduced this overlapping issue. However, the fix is simple that, unlocked and empty dungeon chest should be able to be picked up into inventory or moved elsewhere to access the overlapped chest.
Now, it skips if the checked tile exists a dungeon chest and replaces the wall with raw obsidian if it was. Actually the arbitrary numbers in the code confused me about the logics.
By the way, it seems like that dungeon chests would be regenerated to desired number of chests each time loading the world (so new chests appear if some chests were removed), but I am not sure if it is intended, since I think it could break balancing.