Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFix town buildings #22723
Conversation
codemime
force-pushed the
codemime:fix_town_buildings
branch
to
410bfdf
Jan 13, 2018
kevingranade
merged commit 410bfdf
into
CleverRaven:master
Jan 16, 2018
codemime
deleted the
codemime:fix_town_buildings
branch
Jan 23, 2018
This was referenced Feb 12, 2018
ralreegorganon
referenced this pull request
Sep 24, 2018
Merged
Check if basement map special can be placed before placing #25811
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
codemime commentedJan 9, 2018
Closes #22358.
Closes #21497.
Overview
@kevingranade was right in his suspicions regarding the first issue. The @Coolthulhu's idea of unifying town buildings with overmap specials is really great, the implementation, however, has a minor bug which caused #22358.
find_max_size()performs checks after it increments its counters, so the result value isn't always correct. #21497 is fixed by allowing buildings to override marshlands. Also, buildings can't spawn by themselves like other overmap specials do. This was definitely possible, but I didn't find a corresponding issue.Implementation details
can_place_special()) which obsoletesbuilding_sizealong with the functions that operate on it. So they all were removed (find_max_size()was among them).locationsand a check for max occurrences to the fake overmap specials (zeromax_occurrencesprevents their spawn "in the wild").overmap::get_default_terrain()which allows minor code deduplication and localization of a couple hard-coded terrain ids.