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

[Swim] Update to 1.6 #133

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

[Swim] Update to 1.6 #133

wants to merge 12 commits into from

Conversation

FlyingTNT
Copy link

This is a partial update. It fixes swimming, but does not fix diving. I will continue to update this pull request.

This is a partial update. It fixes swimming, but does not fix diving.
Updates JsonAssets api to get strings, and the item ids to be strings.
Fixes ambiguous GameLocation.performTouchAction harmony patch, and adds new parameter to GameLocation.isCollidingPosition patch.
Changes the scuba tank to be loaded with Content Manager rather than json assets (json assets isn't working well with shirts rn)
Moves in water but not swimming and on land but swimming checks earlier in the update tick so they don't get skipped by a return statement.
Adds a harmony patch to Game1.warpFarmer to prevent the farmer from being stuck in terrain after going down out of the mountain lake.
Accidentally forgot to remove this
Previously, when using manual swim, the game would only check in the direction the player was facing, and if they were clicking, would only do that if they were clicking on the opposite of their current terrain i.e. if they were in water, would only attempt to leave if they were clicking on land.
Now when using manual swim, it checks the direction in which the player is clicking (or rather, the direction of the mouse relative to the player) and then the direction in which they're facing (in that order). Also, adds a config option to allow the player to choose whether they should be required to click on the opposite terrain.
Previously, edge warps were only checked if the player had auto swim enabled or were pressing the manual swim button (allowing them to swim out of bounds if those conditions weren't met).
Adds new helper methods and updates the item ids to use the new qualified ids.
Also specifies Gil as the Mariner's portrait. This should never be shown, but it makes angry yellow text not appear when entering the Mariner's cave.
Now also checks if the player can move before jumping to prevent them jumping when using a tool. This obsoletes all of the old checks for if they were holding a pan, fishing rod..., and removes a bug where if the player was using any tool that wasn't being checked for (like a pickaxe), they would get stuck in an infinite loop.
Additionally, this makes a specific function to preform all of the checks that it is safe for the player to jump. This encompasses all the checks for the old ModEntry.myButtonDown, so that has been removed, plus a couple extras to clean up the UpdateTicked function. To this end, the update for the player's oxygen level was moved to a function in SwimUtils (still called at the same place in UpdateTicked).
Finally, tries to jump in the direction the player is facing before the direction of their cursor (was the other way), and only tries to jump in the direction of their cursor if the manual jump button is a mouse button.
In SwimUtils.CanSwimHere, checks if the player's current tile is a pool entrance or a swimsuit change tile, and disables the mod in that location if so. This is to detect mod-introduced bathhouse-like areas (it already checks for the bathhouse directly), which otherwise caused the mod to believe the player was swimming on land when they entered the water and created an infinite loop.
Json assets isn't working well with clothes right now, so adds the scuba gear through content patcher.
Adds a Spanish translation for the scuba items.
Fixes the Abigail projectile texture (used to be a white box). Based on a video I saw of past gameplay, I believe it's supposed to be coal, so that's what I changed it to. I also set the parent sheet index to 3 as a fallback of the item isn't defined for some reason (the parent sheet index is ignored if it is defined). I chose 3 because item 3 in the projectiles texture sheet looks the most like coal.
Previously, if the mod was disabled in the config, the config options would not be added to the generic mod config mod, so players would have to manually edit the config files to re-enable the mod.
Now, the config options are initialized on game launch no matter what.
Moves all warp data to the swim-map-content.json class.
Resizes a handful of warps so there aren't 'dead spots' at the corners.
Removes a warp that causes the right of the beach to warp back to the right of the beach.
Allows swimming during the Night Market (players were warping in through the river and getting stuck in the water)
Fixes a bug where wearing the scuba gear while swimming would cause the player's torso to be displayed.
Adds a config option to allow the player to wear their hat while wearing their bathing suit.
To facilitate the above, adds a tranpiler to FarmerRenderer.drawHairAndAccessories.
Previously, the scuba fin speed buff was not being applied. Updates the logic to reflect the changes in 1.6.
Updates the scuba fin shoe colors so that they are black, rather than white.
Renames the drawHairAndAccessories transpiler because its name was not the same as the class and method it was modifying.
Makes it so that shooting a projectile in the Prairie King game causes the player to face in the direction they shot.
Fixes an error where the Earth Crystal item id was incorrect in SwimMaps.
In SwimUtils.CanSwimHere, changes Game1.currentLocation to Game1.player.currentLocation because the former caused a null pointer exception on exit to menu.
I don't know if this is the right place to upload this, but I couldn't find another.
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.

1 participant