-
Notifications
You must be signed in to change notification settings - Fork 256
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
Gun store eargear spawn fix #2551
Conversation
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.
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. |
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. |
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... |
police_station.json
Outdated
{ | ||
"type": "mapgen", | ||
"method": "json", | ||
"om_terrain": [ "police" ], |
There was a problem hiding this comment.
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?
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.