Simplify underwater crouch jump helpers#2261
Conversation
| ] | ||
| }, | ||
| { | ||
| "name": "h_underwaterMaxHeightSpringBallJumpWithFlashSuit", |
There was a problem hiding this comment.
It's a shame to see this one go. It was such a great name. lol
| "name": "h_underwaterCrouchJumpWithFlashSuit", | ||
| "name": "h_underwaterCrouchJump", | ||
| "requires": [ | ||
| {"tech": "canCrouchJump"} |
There was a problem hiding this comment.
I don't like how it looks like no tech is involved, when we can slot canCarryFlashSuit in here.
The note and purpose are based on flash suit, but the important parts of the helper do not reference flash suits. The value is in the lack of NoFlashSuit which you look somewhere else to see.
So I suggest adding OR:[ NoFlashSuit, canCarryFlashSuit]
There was a problem hiding this comment.
The way I look at it is that essentially canCarryFlashSuit is implicitly required on every strat that carries a flash suit, so it would be redundant to add it as a requirement here. Although, since it would be inefficient to check for the canCarryFlashSuit tech on every strat, more specifically the way it's working is that we're checking it at the time the flash suit is gained: every method of gaining a flash suit will come with a canCarryFlashSuit requirement. This means that in any scenario where you could possibly have a flash suit, the canCarryFlashSuit tech will already be satisfied, so we should not need to add it as a requirement anywhere except as a dependency on the tech for gaining a flash suit.
I made an attempt at updating the dev note; does this resolve the problem?
The existing helper name
h_underwaterCrouchJumpWithFlashSuitseems misleading because it suggests a requirement to have a flash suit, when all it means is that you may have a flash suit. It is defined as{"tech": "canCrouchJump"}, i.e. simply the crouch-jump tech without the{"noFlashSuit": {}}requirement that normally comes along with it. This seems to have led to some confusion where we are using redundant blocks like this:which expands to
where it becomes clear that the first case of the
oris unnecessary.This PR proposes that we rename the helper to
h_underwaterCrouchJumpand replace blocks like this with simple uses of the helper. It also adds ah_underwaterCrouchJumpDownGraband likewise replaces overly complicated blocks with simple uses of the helper.This PR only addresses existing uses of the helper
h_underwaterCrouchJumpWithFlashSuit. We will need to go through all the crouch jump uses, to classify them as underwater or not, but that can be done in a separate PR; I wanted to make sure first that everything is all right with the proposed helpers.