Fix transformer issues

This commit is contained in:
2023-11-20 22:08:32 +01:00
parent 8f4356db2a
commit c56c0a9c5c
3 changed files with 128 additions and 123 deletions

View File

@@ -63,7 +63,9 @@ machine.onConstruct=function(pos,config)
local inv=meta:get_inventory()
industrialtest.api.addPowerStorage(meta,config.capacity,config.flow,config.ioConfig)
meta:set_string("formspec",machine.getFormspec(pos,config))
if not config.withoutFormspec then
meta:set_string("formspec",machine.getFormspec(pos,config))
end
if config.groups then
if config.groups._industrialtest_hasPowerInput then
@@ -193,6 +195,9 @@ machine.allowMetadataInventoryPut=function(pos,listname,index,stack,player,confi
end
machine.updateFormspec=function(pos,config)
if config.withoutFormspec then
return
end
local meta=minetest.get_meta(pos)
meta:set_string("formspec",machine.getFormspec(pos,config))
end