Fix misaligned generator formspec in MCL

This commit is contained in:
2023-03-05 13:48:29 +01:00
parent d39fc81bb8
commit c8d69e514b
2 changed files with 36 additions and 34 deletions

View File

@@ -462,17 +462,6 @@ if industrialtest.mclAvailable then
})
end
industrialtest.gameTexturePrefix="mcl"
-- FIXME: Formspecs when used with MCL are misaligned, to fix that and also preserve compatibilty
-- with MTG MCL has to stop using legacy formspec coordinates ~mrkubax10
industrialtest.formspecVersion=function()
return ""
end
industrialtest.formspecList=function(ctx,name,x,y,w,h)
return "list["..ctx..";"..name..";"..x..","..y..";"..w..","..h.."]"..mcl_formspec.get_itemslot_bg(x,y,w,h)
end
industrialtest.formspecPlayerInv=function()
return "list[current_player;main;0.5,5.5;9,3;9]"..mcl_formspec.get_itemslot_bg(0.5,5.5,9,3).."list[current_player;main;0.5,8.74;9,1]"..mcl_formspec.get_itemslot_bg(0.5,8.74,9,1)
end
-- assign element keys for elements that are required later
industrialtest.elementKeys.stick="mcl_core:stick"
industrialtest.elementKeys.ironIngot="mcl_core:iron_ingot"
@@ -624,15 +613,6 @@ elseif industrialtest.mtgAvailable then
}
})
end
industrialtest.formspecVersion=function()
return "formspec_version[4]"
end
industrialtest.formspecList=function(ctx,name,x,y,w,h)
return "list["..ctx..";"..name..";"..x..","..y..";"..w..","..h.."]"
end
industrialtest.formspecPlayerInv=function()
return "list[current_player;main;0.5,6.25;8,1]list[current_player;main;0.5,7.5;8,3;8]"
end
industrialtest.gameTexturePrefix="mtg"
industrialtest.elementKeys.tinIngot="default:tin_ingot"
industrialtest.elementKeys.bronzeIngot="default:bronze_ingot"