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

Gun store eargear spawn fix #2551

Merged
merged 5 commits into from
Apr 4, 2023
Merged

Gun store eargear spawn fix #2551

merged 5 commits into from
Apr 4, 2023

Conversation

metalheimer
Copy link
Contributor

@metalheimer metalheimer commented Apr 3, 2023

Summary

SUMMARY: Bugfixes "Fixed loot spawn for a gun store locker"

Purpose of change

Sometimes you'd see earplugs or muffs spawn on the downspout outside the gun store. Presumably they were meant for the locker on the other side of the wall.

Describe the solution

Both the x and y coords were off by one. I can only imagine a thousand contributors going insane trying to figure out why the misplaced spawn happened. I almost did. At first I thought only the x coord was wrong, but after a few attempts and not being successful, I suspected the y was off. After changing y, and still having earplugs spawn on downspout, I started filling my apartment walls with rantings and strange symbols. Surely this was some conspiracy by gods or alien beings. In no way it was possible that I was going off my hinges. At one point I theorized the downspout and its counterpart on the roof messed with the spawn as I was plotting out strange math on the ceiling, way advanced and beyond my actual abilities. Some occultism later I had the major revelation.

"What if... what if... BOTH the x and y coordinates are off by one!?"

My hands and breath shaking, I counted the lines and columns in the file carefully (which I should've effing done in the first place), edited the file yet again, spawned a few gunstores, and approached the locker with baited breath.... and it was as if gods of sanity had given me a divine slap, thus wrinkling up my brain again. At long last the earplugs and muffs spawned in the locker, where they always belonged.

Describe alternatives you've considered

More cabin fever.

Testing

Spawned three (3) gun stores, all of which correctly spawned ear plugs inside the locker. Suck it, downspout.

Additional context

No animals were harmed, unless I count.

For the lone locker the coordinates for item spawn were off by one, both x and y, which caused ear plugs and/or muffs sometimes spawn outside on top of the downspout.
@github-actions github-actions bot added the data PRs related to datas. Won't crash game (probably) label Apr 3, 2023
police_station.json Outdated Show resolved Hide resolved
@metalheimer
Copy link
Contributor Author

I may have screwed up with my fork or branch or something... I really only edited two lines in s_gun,json, not sure why it says "add files via upload" etc. my previous actions. Sorry about that.

@scarf005
Copy link
Member

scarf005 commented Apr 3, 2023

the weird lint error is due to your windows machine using CRLF wheras BN uses LF for end of line character, could you please check https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings and change your file's line ending to LF?

@metalheimer
Copy link
Contributor Author

the weird lint error is due to your windows machine using CRLF wheras BN uses LF for end of line character, could you please check https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings and change your file's line ending to LF?

I'm scratching my head here because in this gun store case I edited the file on Github, not locally. The older police station edits however I did locally and uploaded. Not once did I hit Enter while editing the gun store. Idk what CRLF or LF even stand for. I speak only JSON, not C++, nor any command line syntax. Unless I'm drunk. Or very tired. Know that I am a caveman in an alien space ship.

@scarf005
Copy link
Member

scarf005 commented Apr 4, 2023

difference-between-cr-lf-lf-and-cr-line-break-types

i see the problem now. github web editor doesn't convert CRLF to LF. please wait a mo...

{
"type": "mapgen",
"method": "json",
"om_terrain": [ "police" ],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it in PR by mistake?

@scarf005
Copy link
Member

scarf005 commented Apr 4, 2023

@metalheimer, looks like you've added police_station.json by mistake in your pull request. since it's unrelated, would it be okay for me to remove the file? after that, i think the PR could be reviewed and approved.

@metalheimer
Copy link
Contributor Author

@metalheimer, looks like you've added police_station.json by mistake in your pull request. since it's unrelated, would it be okay for me to remove the file? after that, i think the PR could be reviewed and approved.

Yes, absolutely. Sorry, thought that was obvious mistake. It was my earlier contrib. Only the gun store edits should remain.

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

ear plugs spawn correctly, PR approved.
merging since previous build succeeded and it's just two lines of item position changes.

@scarf005 scarf005 merged commit 15ddc37 into cataclysmbnteam:upload Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data PRs related to datas. Won't crash game (probably)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants