Refactor machines.lua (reduced ~300 lines of code)

This commit is contained in:
2023-04-07 19:50:39 +02:00
parent dbb83ba6e3
commit 40d0e578c4
3 changed files with 523 additions and 600 deletions

View File

@@ -75,7 +75,7 @@ minetest.register_on_player_receive_fields(function(player,formname,fields)
meta:set_string("industrialtest.powerIOConfig",fields.powerIOConfig)
local def=minetest.registered_nodes[minetest.get_node(context).name]
if def and def._industrialtest_updateFormspec then
def._industrialtest_updateFormspec(meta)
def._industrialtest_updateFormspec(context)
end
minetest.close_formspec(player:get_player_name(),formname)
elseif fields.triggerNeighbours then