Commit Graph

11 Commits

Author SHA1 Message Date
trans_soup f63f60a846 minor refactor of leveled node registration. 2023-10-22 22:39:58 +02:00
trans_soup 41aa5536b0 remove placement prediction for leveled nodes. 2023-10-22 22:39:10 +02:00
trans_soup 1084214c10 tweak leveled node placement.
they now stack regardless of face targetted, unless there's no space, or
player is sneaking.
2023-10-22 22:37:00 +02:00
trans_soup 512847f8f6 improve placement of leveled nodes.
they now stack when placed on top of each other, even if there's a node
in the position above the targetted stack.
2023-10-22 22:31:09 +02:00
trans_soup 249a698b52 refactor: stacking of leveled nodes.
extract level transfer between leveled nodes into own function, separate
from code that decides when and how to use that.
2023-10-22 22:13:28 +02:00
trans_soup 2de047d37a add utility alias for level-0 leveled nodes.
leveled nodes now have an alias from level 0 to air, meaning that code
that changes the level of a node doesn't have to differentiate between
setting its level, and removing the node when the level is supposed to
be 0.
2023-10-22 21:55:01 +02:00
trans_soup 4436b9068a make kindname comparison more reliable. 2023-10-22 21:44:47 +02:00
trans_soup c1bc0d18a5 fix alias for highest level of leveled nodes. 2023-10-21 22:43:39 +02:00
trans_soup a06b0a08af fully implement leveled nodes.
add API support for leveled nodes, used via these two functions:

`blockgame.register_leveled_node` registers leveled nodes for each level
up to a given maximum.

`blockgame.check_for_stacking` checks whether a given node is
supposed to stack with its vertical neighbors, and if so handles that.
2023-10-21 22:08:46 +02:00
trans_soup 8dfccdd315 remove unused variable. 2023-10-21 20:48:01 +02:00
trans_soup 01bbe58e45 start working on leveled nodes.
start working on generalizing registration of leveled nodes. currently
broken.
2023-10-21 11:41:33 +02:00