diff options
author | Sebastien Ponce <Sebastien.Ponce@cern.ch> | 2015-09-13 11:31:47 +0200 |
---|---|---|
committer | Sebastien Ponce <Sebastien.Ponce@cern.ch> | 2015-09-13 22:08:04 +0200 |
commit | 5f9efb1205fe9802f859548fc9220f98dd0fd12e (patch) | |
tree | 39d5bd7cf4cb71b2f7eac71465199d881f797d68 /worldedit_gui | |
parent | fc037e9c82f34a6bf441dd738c1b10a510eb8b4d (diff) |
Added hollow pyramids
Diffstat (limited to 'worldedit_gui')
-rw-r--r-- | worldedit_gui/functionality.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/worldedit_gui/functionality.lua b/worldedit_gui/functionality.lua index 989c9eb..d3b78f6 100644 --- a/worldedit_gui/functionality.lua +++ b/worldedit_gui/functionality.lua @@ -295,18 +295,21 @@ worldedit.register_gui_function("worldedit_gui_pyramid", { or "image[5.5,1.1;1,1;unknown_node.png]") ..
string.format("field[0.5,2.5;4,0.8;worldedit_gui_pyramid_length;Length;%s]", minetest.formspec_escape(length)) ..
string.format("dropdown[4,2.18;2.5;worldedit_gui_pyramid_axis;X axis,Y axis,Z axis,Look direction;%d]", axis) ..
- "button_exit[0,3.5;3,0.8;worldedit_gui_pyramid_submit;Pyramid]"
+ "button_exit[0,3.5;3,0.8;worldedit_gui_pyramid_submit_hollow;Hollow Pyramid]" ..
+ "button_exit[3.5,3.5;3,0.8;worldedit_gui_pyramid_submit_solid;Solid Pyramid]"
end,
})
worldedit.register_gui_handler("worldedit_gui_pyramid", function(name, fields)
- if fields.worldedit_gui_pyramid_search or fields.worldedit_gui_pyramid_submit then
+ if fields.worldedit_gui_pyramid_search or fields.worldedit_gui_pyramid_submit_solid or fields.worldedit_gui_pyramid_submit_hollow or fields.worldedit_gui_pyramid_axis then
gui_nodename1[name] = tostring(fields.worldedit_gui_pyramid_node)
gui_axis1[name] = axis_indices[fields.worldedit_gui_pyramid_axis]
gui_distance1[name] = tostring(fields.worldedit_gui_pyramid_length)
worldedit.show_page(name, "worldedit_gui_pyramid")
- if fields.worldedit_gui_pyramid_submit then
+ if fields.worldedit_gui_pyramid_submit_solid then
minetest.chatcommands["/pyramid"].func(name, string.format("%s %s %s", axis_values[gui_axis1[name]], gui_distance1[name], gui_nodename1[name]))
+ elseif fields.worldedit_gui_pyramid_submit_hollow then
+ minetest.chatcommands["/hollowpyramid"].func(name, string.format("%s %s %s", axis_values[gui_axis1[name]], gui_distance1[name], gui_nodename1[name]))
end
return true
end
|