mirror of
https://github.com/APercy/ap_airship.git
synced 2025-03-15 07:51:20 +00:00
added more options to carry
This commit is contained in:
parent
27c1988d4c
commit
f27429cab1
1 changed files with 7 additions and 4 deletions
11
forms.lua
11
forms.lua
|
@ -60,12 +60,15 @@ end
|
||||||
function ap_airship.external_attach(name)
|
function ap_airship.external_attach(name)
|
||||||
local basic_form = table.concat({
|
local basic_form = table.concat({
|
||||||
"formspec_version[3]",
|
"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.."label[1,1.0;Attach Outside:]"
|
||||||
basic_form = basic_form.."button[1,1.2;2,1;attach;Attach]"
|
basic_form = basic_form.."dropdown[1,1.6;4,0.6;entity;"..entities..";1;false]"
|
||||||
basic_form = basic_form.."button[3,1.2;2,1;dettach;Dettach]"
|
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)
|
minetest.show_formspec(name, "ap_airship:attach_main", basic_form)
|
||||||
end
|
end
|
||||||
|
@ -166,7 +169,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local ent = plane_obj:get_luaentity()
|
local ent = plane_obj:get_luaentity()
|
||||||
if ent then
|
if ent then
|
||||||
if fields.attach 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
|
end
|
||||||
if fields.dettach then
|
if fields.dettach then
|
||||||
airutils.dettach_entity(ent)
|
airutils.dettach_entity(ent)
|
||||||
|
|
Loading…
Add table
Reference in a new issue