From e9009b4e6fab6d4fbbb6f6cb2ac8e9f10444b66d Mon Sep 17 00:00:00 2001 From: DonBatman Date: Sun, 15 Mar 2015 06:28:26 -0700 Subject: [PATCH] Better Machine --- README.md | 35 +++++++++- machines.lua | 85 +++++++++++++++---------- textures/mymillwork_machine_back.png | Bin 138 -> 144 bytes textures/mymillwork_machine_bottom.png | Bin 0 -> 141 bytes textures/mymillwork_machine_front.png | Bin 173 -> 188 bytes textures/mymillwork_machine_side1.png | Bin 0 -> 148 bytes textures/mymillwork_machine_side2.png | Bin 0 -> 147 bytes textures/mymillwork_machine_top.png | Bin 124 -> 189 bytes 8 files changed, 83 insertions(+), 37 deletions(-) create mode 100644 textures/mymillwork_machine_bottom.png create mode 100644 textures/mymillwork_machine_side1.png create mode 100644 textures/mymillwork_machine_side2.png diff --git a/README.md b/README.md index 4984ea7..706816c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,34 @@ -mymillwork +millwork ======== -This is a complete rewrite of millwork. Adds 24 different nodes including crown mould, base boards, columns and beams. It includes a machine to make the nodes. Supports over a dozen default nodes. -Please not that this rewrite does not support the old millwork mod. +Crown Mold, Baseboards, Columns and more + +Latest update adds different textures to the millwork. + +If you want to add or remove a texture simply edit the table at the top of millwork.lua file. + +Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out. + +Each texture has 28 nodes so careful that you don't add too many textures. + + +local material = {--{Name for description}, {image without .png}, {item name}, {mod name} + + { "White", "crownmold_white","white","wool"}, + +-- { "Cobble", "default_cobble","cobble","default"}, + + { "Sandstone", "default_sandstone","sandstone","default"}, + +-- { "Desert Stone", "default_desert_stone","desert_stone","default"}, + +-- { "Stone", "default_stone","stone","default"}, + +-- { "Tree", "default_tree","tree","default"}, + + { "Desert Sand", "default_desert_sand","desert_sand","default"}, + + { "Clay", "default_clay","clay","default"}, + +-- { "Dirt", "default_dirt","dirt","default"}, +} diff --git a/machines.lua b/machines.lua index ee4b2bc..4cdf7fc 100644 --- a/machines.lua +++ b/machines.lua @@ -7,17 +7,34 @@ local anzahl = {} minetest.register_node("mymillwork:machine", { description = "Millwork Machine", - tiles = {"mymillwork_machine_top.png", + tiles = { "mymillwork_machine_top.png", - "mymillwork_machine_side.png", - "mymillwork_machine_side.png", + "mymillwork_machine_bottom.png", + "mymillwork_machine_side2.png", + "mymillwork_machine_side1.png", "mymillwork_machine_back.png", - "mymillwork_machine_front.png", + "mymillwork_machine_front.png" }, - drawtype = "normal", + drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", groups = {oddly_breakable_by_hand=2, cracky=3, dig_immediate=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.1875, -0.5, 0.5, -0.0625, 0.5}, -- Table + {-0.5, -0.5, -0.5, -0.3125, -0.1875, -0.3125}, -- leg + {-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5}, -- leg + {0.3125, -0.5, 0.3125, 0.5, -0.1875, 0.5}, -- leg + {0.3125, -0.5, -0.5, 0.5, -0.1875, -0.3125}, -- leg + {0, -0.0625, 0.25, 0.0625, 0.375, 0.5}, -- verticle + {-0.125, -0.0625, 0.25, -0.0625, 0.375, 0.5}, -- verticle + {-0.1875, 0.125, -0.3125, 0.125, 0.5, 0.0625}, -- motor + {-0.125, 0.375, 0.0625, 0.0625, 0.5, 0.5}, -- arm + {-0.0625, 0.0625, -0.3125, 0, 0.125, 0.0625}, -- blade + {-0.0625, 0, -0.25, 0, 0.125, 0}, -- blade + } + }, -- Set owner of Millwork Machine after_place_node = function(pos, placer) @@ -41,44 +58,44 @@ on_construct = function(pos) local meta = minetest.env:get_meta(pos) meta:set_string("formspec", "invsize[10,11;]".. "background[-0.15,-0.25;10.40,11.75;mymillwork_background.png]".. - "list[current_name;ingot;8.5,7.5;1,1;]".. - "list[current_name;res;8.5,10;1,1;]".. - "label[8.5,7;Input:]".. - "label[8.5,9.5;Output:]".. + "list[current_name;ingot;7,5.5.5;1,1;]".. + "list[current_name;res;8.5,5.5;1,1;]".. + "label[7,5;Input:]".. + "label[8.5,5;Output:]".. "label[0,0;Choose Millwork:]".. "label[0.5,0.5;Crown Mould]".. - "image_button[1,1;1,1;mymillwork_mach1.png;crownmould; ]".. - "image_button[2,1;1,1;mymillwork_mach2.png;crownmould_ic; ]".. - "image_button[3,1;1,1;mymillwork_mach3.png;crownmould_oc; ]".. - "image_button[4,1;1,1;mymillwork_mach4.png;crownmould_beam; ]".. + "image_button[0.5,1;1,1;mymillwork_mach1.png;crownmould; ]".. + "image_button[1.5,1;1,1;mymillwork_mach2.png;crownmould_ic; ]".. + "image_button[2.5,1;1,1;mymillwork_mach3.png;crownmould_oc; ]".. + "image_button[3.5,1;1,1;mymillwork_mach4.png;crownmould_beam; ]".. "label[0.5,2;Columns]".. - "image_button[1,2.5;1,1;mymillwork_mach5.png;column; ]".. - "image_button[2,2.5;1,1;mymillwork_mach6.png;column_base; ]".. - "image_button[3,2.5;1,1;mymillwork_mach7.png;column_half; ]".. - "image_button[4,2.5;1,1;mymillwork_mach8.png;column_half_base; ]".. - "image_button[5,2.5;1,1;mymillwork_mach9.png;column_half_wbeam; ]".. - "image_button[6,2.5;1,1;mymillwork_mach10.png;column_quarter; ]".. - "image_button[7,2.5;1,1;mymillwork_mach11.png;column_quarter_base; ]".. - "image_button[8,2.5;1,1;mymillwork_mach12.png;column_quarter_wbase; ]".. - "image_button[9,2.5;1,1;mymillwork_mach13.png;column_quarter_fancybase; ]".. + "image_button[0.5,2.5;1,1;mymillwork_mach5.png;column; ]".. + "image_button[1.5,2.5;1,1;mymillwork_mach6.png;column_base; ]".. + "image_button[2.5,2.5;1,1;mymillwork_mach7.png;column_half; ]".. + "image_button[3.5,2.5;1,1;mymillwork_mach8.png;column_half_base; ]".. + "image_button[4.5,2.5;1,1;mymillwork_mach9.png;column_half_wbeam; ]".. + "image_button[5.5,2.5;1,1;mymillwork_mach10.png;column_quarter; ]".. + "image_button[6.5,2.5;1,1;mymillwork_mach11.png;column_quarter_base; ]".. + "image_button[7.5,2.5;1,1;mymillwork_mach12.png;column_quarter_wbase; ]".. + "image_button[8.5,2.5;1,1;mymillwork_mach13.png;column_quarter_fancybase; ]".. "label[0.5,3.5;Ceiling and Beams]".. - "image_button[1,4;1,1;mymillwork_mach14.png;ceiling; ]".. - "image_button[2,4;1,1;mymillwork_mach15.png;ceiling_post; ]".. - "image_button[3,4;1,1;mymillwork_mach16.png;beam; ]".. - "image_button[4,4;1,1;mymillwork_mach17.png;beam_t; ]".. - "image_button[5,4;1,1;mymillwork_mach18.png;beam_ceiling_t; ]".. + "image_button[0.5,4;1,1;mymillwork_mach14.png;ceiling; ]".. + "image_button[1.5,4;1,1;mymillwork_mach15.png;ceiling_post; ]".. + "image_button[2.5,4;1,1;mymillwork_mach16.png;beam; ]".. + "image_button[3.5,4;1,1;mymillwork_mach17.png;beam_t; ]".. + "image_button[4.5,4;1,1;mymillwork_mach18.png;beam_ceiling_t; ]".. "label[0.5,5;Base]".. - "image_button[1,5.5;1,1;mymillwork_mach19.png;base; ]".. - "image_button[2,5.5;1,1;mymillwork_mach20.png;base_ic; ]".. - "image_button[3,5.5;1,1;mymillwork_mach21.png;base_oc; ]".. - "image_button[4,5.5;1,1;mymillwork_mach22.png;base_fancy; ]".. - "image_button[5,5.5;1,1;mymillwork_mach23.png;base_fancy_ic; ]".. - "image_button[6,5.5;1,1;mymillwork_mach24.png;base_fancy_oc; ]".. - "list[current_player;main;0,7;8,4;]") + "image_button[0.5,5.5;1,1;mymillwork_mach19.png;base; ]".. + "image_button[1.5,5.5;1,1;mymillwork_mach20.png;base_ic; ]".. + "image_button[2.5,5.5;1,1;mymillwork_mach21.png;base_oc; ]".. + "image_button[3.5,5.5;1,1;mymillwork_mach22.png;base_fancy; ]".. + "image_button[4.5,5.5;1,1;mymillwork_mach23.png;base_fancy_ic; ]".. + "image_button[5.5,5.5;1,1;mymillwork_mach24.png;base_fancy_oc; ]".. + "list[current_player;main;1,7;8,4;]") meta:set_string("infotext", "Millwork Machine") local inv = meta:get_inventory() inv:set_size("ingot", 1) diff --git a/textures/mymillwork_machine_back.png b/textures/mymillwork_machine_back.png index 38cf29b3cecd93511b0af979e91270726f0e653a..cf7065bc39169f5b98ab0430fe55578246106e98 100644 GIT binary patch delta 126 zcmeBToWM9ivYY`3tY$3O3#2#;JR*x37`TN%nDNrxx<5cc_7YEDSN8kN{5)0$R-%=; zKp}lk7sn8Z%gH5a4y-;rTSQ(QT-qdfS5~K=L-N$5GspIFohwd#tadn2Cx2pPzN7@h Yp?j?9e!-fnfLa+mUHx3vIVCg!0KLa2DgXcg delta 120 zcmbQh*u^+OvXG5|fkFQB|3o0gS>O>_%)r1c48n{Iv*t(u1#LWC978NlC#NJN{5bEx zn2?x|kZ|Jcc_r`9PdYD4%$Q(#Bg3i4hexC-klBq_LWa%2$iU#waus94pjmSnm$?a7 Uy6gXV2Q-Jl)78&qol`;+0A7eD6#xJL diff --git a/textures/mymillwork_machine_bottom.png b/textures/mymillwork_machine_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..e0a9014041c6a2e983063743cead9db65e9ad532 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UAI14-?iy0WWg+Q3`(%rg0Ktc8r zPhVH|`^@}2)+|iB_RItd>3F(0hDcmajycf4HA8}fbAtg0=%l^SOzcn%;+ACU;a+gf fL3d%Vt^^ZG53rVpgsmqS3j3^P6rM literal 0 HcmV?d00001 diff --git a/textures/mymillwork_machine_front.png b/textures/mymillwork_machine_front.png index 8c125f1451d61a66127ce128b0121d310253e397..2960e4f8d50a4cd67b0d592849abf3a79f06df17 100644 GIT binary patch delta 171 zcmZ3>xQB6qWIYoD1H*)g8D>C=v%n*=n1O*?2!t6g-L3lr6l5>)^mS#w&&qW?^Ge>IpLAZ9m?5FTqH|(S_Vx8bOFg}VrOz$9!OEP^z^%7G@JSO;bPYJ))yG|CgJx+3dodZAsz=L9^zHG72x2QeBv`#RF&;gQu&X%Q~lo FCIBpNI3xf7 diff --git a/textures/mymillwork_machine_side1.png b/textures/mymillwork_machine_side1.png new file mode 100644 index 0000000000000000000000000000000000000000..5f24c907ab21840b8e605424e81bc56f1e442da0 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UAI14-?iy0WWg+Q3`(%rg0Ktc8r zPhVH|`^@}2RwlL;drN>q#-1*YArhC9OVS)zeRxa+5*h<+4eB`CxZFz0H`pj;WEe?* o*RnW2wRg5m`(D>)ds7pD1}d`NUAH--9H^ba)78&qol`;+0Eo3GbpQYW literal 0 HcmV?d00001 diff --git a/textures/mymillwork_machine_side2.png b/textures/mymillwork_machine_side2.png new file mode 100644 index 0000000000000000000000000000000000000000..7be9d915f2fea04988b2ae72f38f26682a71c7de GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UAI14-?iy0WWg+Q3`(%rg0Ktc8r zPhVH|`^@}2Ru(4bKE?xuj67W&LnJOIm!vtc`tXDu!{j_pZo7(2W p^-Z5+Ztgf)cq2OHUNjpUgMcFI-RY*cWPrLEJYD@<);T3K0Ra4mDe?dS literal 0 HcmV?d00001 diff --git a/textures/mymillwork_machine_top.png b/textures/mymillwork_machine_top.png index 40ee3cb1605d8087edb4098c6111255218fa0ef0..065b7843124c2d70eb2d572c589e456ea4ff40e6 100644 GIT binary patch delta 171 zcmb=~%Q!)@o{52hVZy`=Ga$uT;1OBOz`!j8!i<;h*8KqrvX^-Jy0YJA=I60yV7*?^ z02GSxba4#PIG-F68k*|BT2xddaBQ)Azk~q;H#2i{UmxG53(NiIEAW^Uvaz*khp#g@ z7|Bz?7{e&6clZJWkYes^_$T$ivE`VYgF3IO9Pfu2&z)IAJfwPNoRqd_U|1L`bN%0A Szk5K77(8A5T-G@yGywoTDm2gl delta 105 zcmdnXSTjK~nT>&gLH_gqL?Fdk;1OBOz`!jG!i)^F=12eq^*mi1Lo7}wrz9l&IPbui zkeHB=aN_KFCGXEqIxkDikkDXR%+@1ikj21a5HxEpV^1ineBinZtAIKgJYD@<);T3K F0RT+3AgKTV