Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor city building and special issues #1135

Merged
merged 1 commit into from
Nov 27, 2021

Conversation

chaosvolt
Copy link
Member

Summary

SUMMARY: Bugfixes "Fix some buildings/specials having wrong rotation, fix mine entrance parking"

Purpose of change

While playing recently, I noticed a few city buildings, overmap specials, and even in once case part of a larger special were twisted up and facing the wrong way. For that last one, it turned out to be a case of using old hardcoded parking lots in the middle of a map special where it wouldn't generate right.

Describe the solution

  1. Fixed churches facing backwards. Both variants were affected, and can be explained by them having their entrance on the south side, when it seems most city mapgens are north-facing instead.
  2. Fixed road connection of the basic radio tower being on the wrong side, making it backward. This seems to be because the other radio tower variant is facing the opposite direction and thus has its road connection on that side.
  3. Fixed mine entrances using generic s_lot which lacks facing, instead defining an appropriate parking lot mapgen for that to use.

Describe alternatives you've considered

Unhardcoding basic parking lots to generate with proper support for rotations. That'd be a fair bit of work and only really benefit locations that should be using old-school parking lots. Mines probably shouldn't be one of them.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Ported file changes to test build and load-tested.
  3. Visited churches, radio towers, and mine parking lots, confirming they didn't look wonky.

Additional context

Pinging @Night-Pryanik as they may wish to port these fixes to DDA, and they were involved in JSONization of mine entrances.

@Night-Pryanik
Copy link
Contributor

Night-Pryanik commented Nov 20, 2021

Thanks for pinging, but I jsonified parking lot a long time ago (CleverRaven/Cataclysm-DDA#44933).

Issues with churches and radio towers were also fixed some time ago.

@chaosvolt
Copy link
Member Author

Ah, thanks for linking me that, I wasn't sure if any of those changes had been made over there yet.

Did I miss any buildings that need rotations fixed?

@Night-Pryanik
Copy link
Contributor

CleverRaven/Cataclysm-DDA#51904
CleverRaven/Cataclysm-DDA#51703
Maybe some other, I'm not sure, there were lots of PRs related to mapgen.

@Coolthulhu Coolthulhu self-assigned this Nov 20, 2021
@Coolthulhu
Copy link
Member

From what I know, all specials point north in their default version.
I'll have to check if there isn't anything weird going on with rotations. If there is, fixing it could un-rotate the changed buildings and it would need to be fixed once again.

@chaosvolt
Copy link
Member Author

The issue with radio towers was in where the road connection was, basically. It made it look like the special itself was rotated backwards basically because the road ended on the back side of the special, because the fence gates were on the opposite side in the mapgen file compared to the other radio tower.

Compare radio_tower: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/mapgen/radio_tower.json#L5
With radio_tower_1: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/mapgen/radio_tower.json#L51

One has the gates to the north, the other has the gates to the south. It only got turned around to look backwards because both specials defined the road connection from the same position, when they need different road hookups to look right.

Meanwhile with churches, you can see how the entrance for both variants is on the south side of the mapgen file: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/mapgen/church.json

Compare most shops, like this random example, where the entrance is on the north side: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/mapgen/s_grocery.json

@Coolthulhu Coolthulhu merged commit c91865e into cataclysmbnteam:upload Nov 27, 2021
@chaosvolt chaosvolt deleted the mapgen-rotation-stuff branch November 27, 2021 17:37
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.

3 participants