Commit graph

8 commits

Author SHA1 Message Date
trans_soup
f228dcac53 fix name validations in register_node wrapper.
`blockgame.register_node` now works both when the provided name includes
a mod name, and when it doesn't.

previously, including a mod name would break things, making the actual
name used for registration include the mod name twice.
2023-10-21 11:56:50 +02:00
trans_soup
bab117c98c add comment. 2023-10-21 11:15:25 +02:00
trans_soup
5df44d2b24 rework loose node registration.
loose nodes are now automatically registrered when their settled
counterparts are. also rewrite a small amount of wrapper code and node
registration to work with this.
2023-10-17 20:52:06 +02:00
trans_soup
968ae04b3a make blockgame.register_node wrapper emit events.
the api function `blockgame.register_node` will now emit events before
and after registering a node, allowing for other code to react to and
affect node registration.
2023-10-17 20:39:13 +02:00
trans_soup
75e66075d0 simplify node registration.
make the wrapper `blockgame.register_node` make reasonable assumptions
that make node registration more convenient.

change other code to take advantage of that change.

also remove the `blockgame.reg_simple_node` utility since it's now
redundant.
2023-10-17 20:20:42 +02:00
trans_soup
2e32ca82ba add register_lbm wrapper. 2023-10-13 09:55:09 +02:00
trans_soup
568e8059f9 refactor: more wrappers
create more wrappers for built-in functions and use them instead.
2023-10-13 09:31:55 +02:00
trans_soup
ccd059aa29 generalize creating wrappers for built-ins.
create utility for creating wrapper functions for `minetest` methods.
2023-10-13 09:19:13 +02:00