From f27429cab114a422926059f6c3b40114d75b7b86 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Thu, 15 Feb 2024 20:37:37 -0300 Subject: [PATCH] added more options to carry --- forms.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/forms.lua b/forms.lua index 813f678..f7932a9 100755 --- a/forms.lua +++ b/forms.lua @@ -60,12 +60,15 @@ end function ap_airship.external_attach(name) local basic_form = table.concat({ "formspec_version[3]", - "size[6,3]", + "size[6,4]", }, "") + local entities = "albatros_d5:albatros_d5,sopwith_f1_camel:sopwith_f1_camel,supercub:supercub" + basic_form = basic_form.."label[1,1.0;Attach Outside:]" - basic_form = basic_form.."button[1,1.2;2,1;attach;Attach]" - basic_form = basic_form.."button[3,1.2;2,1;dettach;Dettach]" + basic_form = basic_form.."dropdown[1,1.6;4,0.6;entity;"..entities..";1;false]" + basic_form = basic_form.."button[1,2.4;2,1;attach;Attach]" + basic_form = basic_form.."button[3,2.4;2,1;dettach;Dettach]" minetest.show_formspec(name, "ap_airship:attach_main", basic_form) end @@ -166,7 +169,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local ent = plane_obj:get_luaentity() if ent then if fields.attach then - airutils.simple_external_attach(ent, ent._simple_attach_pos, "albatros_d5:albatros_d5", 22) + airutils.simple_external_attach(ent, ent._simple_attach_pos, fields.entity, 22) end if fields.dettach then airutils.dettach_entity(ent)