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.
Player:
Fix some player state machine bugs preventing player from transitioning to
the correct state due to having multiple valid triggers, which in turn is
caused by not being specific enough when specifying trigger conditions
during state machine initialization. This reduces strange bugs where the
player gets stuck in a specific state or won't take a valid action like
reading a sign, or the player doesn't respond to a specific valid input.
Fix tile dropdown bug that was occurring, for example, when standing
on top of arrow signs, MoveAndSlide is detecting a collision between
the player and sign, but the player's Area2D animation collider rect
is not actually overlapping the sign tile, and the reported
collision point when converted to a tile cell coordinate confirms
this. Do not drop down when there is no actual tile being
intersected, even if a collision is being reported. Perhaps in the
future there could be a one tile cell margin added to detect overlap
to account for the player being very close to the tile..
Remove player idle back animation delay when finished reading a sign, at
least for now. It looked a bit awkward when finished reading a sign from too
far off center.
Editor / Scenes:
Simplify main scene by combining upper & lower cliffs to reduce level
complexity and duplication by almost 50%. Merge lower cliffs into upper
cliffs and rename upper cliffs to cliffs.
Restructure the ground colliders to make them more reliable & way less
buggy.
Reorganize & rename many nodes in Godot editor for simplicity & readability,
which was made possible by the merging of upper and lower cliffs.
Reorganize the 10 waterfall sections so that section 1 is the very top and
section 10 is the very bottom, respectively, which is a much more intuitive
layout.
Lock some nodes in the editor to prevent them from being accidentally
modified.
Tiles:
Heavily rework tile intersection code in Tools.cs to improve accuracy and
eliminate bugs. Allow units per tile aka cell size to vary from 1 to 16 for
precise placement of tiles without affecting collision and overlap
detection.
Greatly simplify player updates in Cliff.cs for detecting both cliff
enclosing & ice intersection code.
Signals:
Move ground detection signal callbacks for the player from Cliffs.cs to
Player.cs which greatly simplifies everything, including not having to add
duplicate callbacks in both classes.
Block more signals while changing player's animation-based collision shape
to prevent signal callbacks from being triggered more than they should be.
This is an ongoing workaround for
Changing node parent produces Area2D/3D signal duplicates godotengine/godot#14578 "Changing node parent
produces Area2D/3D signal duplicates".
Don't block sign signals anymore because it causes problems with reading the
sign because it doesn't consistently detect the player is in the sign, and
it's working fine without the blocking.
Improve naming of some signal callback methods.
Player.cs refactoring:
Remove the use of delta from Player.cs, where it mainly a hack; awaiting a
certain amount of idle frames has been more efficient.
Add more private convenience methods for energy meter management to simplify
the code & increase readability.
Add more private convenience methods for sign reading management to simplify
the code & increase readability.
Make fields whose value changes in async methods volatile to prevent the
wrong value from being read, causing hard to track down bugs.
General refactoring:
efficiency, code simplicity, readability, & less possibilities for bugs.
Tools:
except the specified one, when the specified input is invalid; just return
false to decrease game crashes.
Extensions:
operator to work with empty strings, which greatly simplifies
string-handling code, e.g., when using the ternary operator to return
strings from methods.
Cleanup: