destroys the entire codebase for golf #20658
Merged
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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Document the changes in your pull request
This PR started as me trying to replace instances of
initial(icon_state)
withbase_icon_state
, but the more I looked into Golf stuff the worse it got.I started with replacing attackby with wrench_act, then it was kinda fucked, so I ported TG's improved tool_act system, which in the future can be used to log instances of people using tools on stuff (so admins can easily tell who used a screwdriver and multitool to hack a door without the need for buggy replay, for example).
I also tried to implement custom wrench/unwrench sounds because I saw the machine used one, then noticed that it uses
Ratchet.ogg
instead ofratchet.ogg
, which isn't a problem if you're running on Windows but Linux cares for case sensitivity (https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity) and we should probably try to support people who host there, so now it's been replaced.I also saw a bunch of texts being sent to your chat for minor golf stuff like missing a hole, which I think is stupid because Golf is a multiplayer game, so instead it's now all balloon alerts that plays to everyone nearby. With this, I've also added some more feedback to playing, and you now have to rest to get golf balls out of the hole.
While testing, I saw the closet also didn't come with golf clubs. Looking at the code, it was all being spawned in New(), which
PopulateContents()
specifically says to use that instead of New() or Initialize() to populate contents. I also took the opportunity to cut down on some spam copy paste there too.After finding this terrible thing, I decided to look into any other instances of crates loading things in New/Initialize. You know, the thing you're not supposed to do. I found one other instance of this- abandoned crates. I've removed it from there, then decided I might as well clean up things there as well. I tried testing it in-game and, varediting it being locked doesn't update its appearanaces. Awesome, now we have stealthily locked crates that can't blow up. I fixed that too, and now it uses multitool_act too.
I checked other case of
vv_edit_var
just for fun and saw the entire ARMOR FILES USES SPACES INSTEAD OF TABSso I fixed that too.
I also removed the golf machine's power reliance, since it doesn't use any and is barely even a machine.
I also fixed golf working like, at all. Golf machine now uses Crossed instead of Cross, which isn't generally supposed to be used and caused it to not properly move the ball into the hole.
Why is this good for the game?
Golf works
Better and more consistent code overall
Removes unused climb stuff that's now an Element.
Testing
trust me bro
Spriting
Wiki Documentation
Changelog
🆑
bugfix: Golf now works.
bugfix: Different golf holes can now be differentiated.
bugfix: Golf doesn't need power anymore.
bugfix: Golf closets now come with all golf equipment.
/:cl: