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

Street facing churches #51224

Merged
merged 12 commits into from
Sep 4, 2021
Merged

Street facing churches #51224

merged 12 commits into from
Sep 4, 2021

Conversation

RandDenner
Copy link
Contributor

@RandDenner RandDenner commented Aug 30, 2021

Reverse facing of churches so their entrance faces the street.

Summary

Bugfixes "Fix churches so the entrance is street facing"

Purpose of change

For some reason, the maps for churches had their entrance on the bottom of the map file instead of the top. This causes the game to always draw their entrances on the opposite side they should, given the map layout. This fixes that.

Describe the solution

I simply reversed top and bottom. It's technically a mirror image of the original, but it doesn't matter.

Describe alternatives you've considered

Swapping the left and right sides as well, so it's a true 180° rotation, but it's a lot more work for no significant difference.

Testing

Examined naturally spawned churches, then deliberately spawned a bunch. All face away from the intended direction of rotation. North faces south, east faces west, and so on.

Additional context

All were oriented to face the street in the overmap files, but all face away:
image

Reverse facing of churches so their entrance faces the street.
@RandDenner
Copy link
Contributor Author

RandDenner commented Aug 30, 2021

I just noticed that all the natural ground is generating as dirt instead of grass. I'm fixing that before final PR.

Missed a comma I should have moved
@RandDenner
Copy link
Contributor Author

And there's a problem with the roofs now.
I'm going to have to finish tomorrow.

@actual-nh actual-nh added <Bugfix> This is a fix for a bug (or closes open issue) [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Aug 30, 2021
Roof edges fixed
@RandDenner
Copy link
Contributor Author

Okay, this is weird. It's failing the JSON validation, but I can't figure out why. It passes the linter and the only changes were in the map grids, which were only rearranged line by line and obviously passed previously.

Test for fixing JSON validation issue
@RandDenner
Copy link
Contributor Author

Testing by putting a copy of the original back in to see if THAT passes the JSON validation...

Checking if the original even passes the JSON validation
Reverting to the fixed version after confirming that original couldn't pass the JSON style check either.
@RandDenner
Copy link
Contributor Author

Not even the original passes JSON validation for the style check, despite it working perfectly and the linter passing it with zero alterations.

It's the checker that's got the bug, not my file.

@RandDenner
Copy link
Contributor Author

Still have to fix the groundcover.

@RandDenner
Copy link
Contributor Author

Okay, so despite the check failures, all the churches generate with the correct facing and all the staircases line up perfectly.
image
But there's still an issue with the roof on one of them. The garden isn't generating correctly, and I think it's a coordinate issue.
Have to examine the file and see what the issue is.

@actual-nh
Copy link
Contributor

That sounds like spaces getting transformed into tabs invisibly - including in what you pasted back in. Are you using the web interface or git/equivalent on your machine? The former is, from my own experience, prone to JSON formatting bugs.

@RandDenner
Copy link
Contributor Author

RandDenner commented Aug 31, 2021

I'm just using a browser. I'll check for tabs and non-space blanks with N++. May have to look into getting the Git install.

All fixed and everything spawns correctly.
Let's see if this passes checks.
Seeing if uploading the json as a file solves the check failures.
@RandDenner
Copy link
Contributor Author

RandDenner commented Aug 31, 2021

Hmmm... not even uploading the file directly fixes the check issue.
To hell with it. This file works perfectly. I tested it locally, multiple times.
Something is wrong with the checker, not this file.

Edit: no it wasn't the checker's fault (except that it wouldn't actually point out the EOL error), the file was formatted wrong with CR LF line ends instead of just LF.
BTW, the game doesn't care. Only the checker does.

@RandDenner RandDenner marked this pull request as ready for review August 31, 2021 02:49
Uploading file with unix EOL formatting
@RandDenner
Copy link
Contributor Author

Note to all: it was an end of line (EOL) character problem.
The file was using Windows' CR LF format, instead of Unix LF only.
Thanks actual-nh!

@kevingranade kevingranade merged commit 3920142 into CleverRaven:master Sep 4, 2021
@RandDenner RandDenner deleted the street-facing-churches branch September 4, 2021 00:11
Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
* Street facing churches

Reverse facing of churches so their entrance faces the street.

* Update church.json

Missed a comma I should have moved

* Update church.json

Roof edges fixed

* Update church.json

Test for fixing JSON validation issue

* Update church.json

Checking if the original even passes the JSON validation

* Update church.json

Reverting to the fixed version after confirming that original couldn't pass the JSON style check either.

* Update church.json

All fixed and everything spawns correctly.
Let's see if this passes checks.

* Add files via upload

Seeing if uploading the json as a file solves the check failures.

* Add files via upload

Uploading file with unix EOL formatting

* Update church.json to re-initialize the stuck checker

Just extended the hedges a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants