diff options
author | Calinou <Calinou@users.noreply.github.com> | 2015-06-06 11:05:47 +0200 |
---|---|---|
committer | Calinou <Calinou@users.noreply.github.com> | 2015-06-06 11:05:47 +0200 |
commit | 1fc2fd65f7c7fb0e64fd09cdc10ccb9a6d30abde (patch) | |
tree | 0bc186d74dc5d9531efcf30d64360cb6c4a5a707 | |
parent | cf2c7d0346966647ec6ff8230f9228bb293a4ee6 (diff) | |
parent | 6491d0be42e0d98afb1734732c7e2bd101156a8f (diff) | |
download | moreblocks-1fc2fd65f7c7fb0e64fd09cdc10ccb9a6d30abde.tar.gz moreblocks-1fc2fd65f7c7fb0e64fd09cdc10ccb9a6d30abde.tar.bz2 moreblocks-1fc2fd65f7c7fb0e64fd09cdc10ccb9a6d30abde.zip |
Merge pull request #1 from kilbith/master
Add mesh models into the circular saw
-rw-r--r-- | circular_saw.lua | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/circular_saw.lua b/circular_saw.lua index 98ddecb..1140920 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -25,7 +25,8 @@ circular_saw.cost_in_microblocks = { 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 4, 2, 4, 5, 6, 7, 1, 1, 2, 4, 6, 7, 8, - 3, 1, 1, 2, 4, 0, 0, 0, + 3, 1, 1, 2, 4, 4, 2, 7, + 7, 2, 7, 6, 4, 6, 5, 4, } circular_saw.names = { @@ -58,6 +59,17 @@ circular_saw.names = { {"stair", "_alt_2"}, {"stair", "_alt_4"}, {"stair", "_alt"}, + {"slope", ""}, + {"slope", "_half"}, + {"slope", "_half_raised"}, + {"slope", "_inner"}, + {"slope", "_inner_half"}, + {"slope", "_inner_half_raised"}, + {"slope", "_outer"}, + {"slope", "_outer_half"}, + {"slope", "_outer_half_raised"}, + {"slope", "_outer_cut"}, + {"slope", "_outer_cut_half"}, } function circular_saw:get_cost(inv, stackname) @@ -277,7 +289,8 @@ gui_slots = "listcolors[#606060AA;#808080;#101010;#202020;#FFF]" function circular_saw.on_construct(pos) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[11,9]" ..gui_slots.. + local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots + meta:set_string("formspec", "size[11,9]"..fancy_inv.. "label[0,0;" ..S("Input\nmaterial").. "]" .. "list[current_name;input;1.5,0;1,1;]" .. "label[0,1;" ..S("Left-over").. "]" .. @@ -286,8 +299,8 @@ function circular_saw.on_construct(pos) "list[current_name;recycle;1.5,2;1,1;]" .. "field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" .. "button[1,3.2;1,1;Set;" ..S("Set").. "]" .. - "list[current_name;output;2.8,0;8,4;]" .. - "list[current_player;main;1.5,5;8,4;]") + "list[current_name;output;2.8,0;8,5;]" .. + "list[current_player;main;1.5,5.25;8,4;]") meta:set_int("anz", 0) -- No microblocks inside yet. meta:set_string("max_offered", 99) -- How many items of this kind are offered by default? @@ -297,7 +310,7 @@ function circular_saw.on_construct(pos) inv:set_size("input", 1) -- Input slot for full blocks of material x. inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks. inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here. - inv:set_size("output", 4*8) -- 4x8 versions of stair-parts of material x. + inv:set_size("output", 5*8) -- 5x8 versions of stair-parts of material x. circular_saw:reset(pos) end |