From 4b87c9e11432f3abedc5c4f18118a48c98d9a9d3 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Sun, 2 Dec 2018 21:00:00 -0500 Subject: [PATCH] cleanup obsolete files, consitent syntax and forms, new keypad texture --- _material/basic_machines_battery.xcf | Bin 9950 -> 0 bytes _material/basic_machines_constructor.xcf | Bin 5167 -> 0 bytes _material/basic_machines_dust.xcf | Bin 1181 -> 0 bytes _material/basic_machines_generator.xcf | Bin 3379 -> 0 bytes _material/basic_machines_grinder.xcf | Bin 3449 -> 0 bytes _material/basic_machines_icons.xcf | Bin 27355 -> 0 bytes ball.lua | 5 +- constructor.lua | 97 ++++++++-------- enviro.lua | 135 +++++++++++----------- grinder.lua | 141 ++++++++++++----------- mover.lua | 63 ++++++++-- recycler.lua | 117 ++++++++++--------- technic_power.lua | 19 ++- textures/basic_machine_side.png | Bin 2099 -> 0 bytes textures/compass_top.png | Bin 239 -> 0 bytes textures/constructor.png | Bin 258 -> 0 bytes textures/keypad.png | Bin 486 -> 350 bytes 17 files changed, 325 insertions(+), 252 deletions(-) delete mode 100644 _material/basic_machines_battery.xcf delete mode 100644 _material/basic_machines_constructor.xcf delete mode 100644 _material/basic_machines_dust.xcf delete mode 100644 _material/basic_machines_generator.xcf delete mode 100644 _material/basic_machines_grinder.xcf delete mode 100644 _material/basic_machines_icons.xcf delete mode 100644 textures/basic_machine_side.png delete mode 100644 textures/compass_top.png delete mode 100644 textures/constructor.png diff --git a/_material/basic_machines_battery.xcf b/_material/basic_machines_battery.xcf deleted file mode 100644 index 42ea863ebe1a621ccea47fee361544d1bfddb805..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9950 zcmeHNdvp_LcAqhULNI|YaR`g08A&6{4;ch`7_en&W+aVXe%qLrAF?gWvJEEKKn#9K zwq!$+Cc8B2&~39P-fo<1MPlzRn{=~ff!LN`U|TXylPoRUq^GBU^z;><9Li#Pzj+YD zdUKL&%i)jx&Kcc%f8Y1r`+axrz4K`#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ocT`9YIy1?c$=;&%yL@Ic5_CC{zUSi&{I|Au5YTZF58`3kjv#4 z^Dd|sT);BcJ1!`8a+z6Q!v#*;T`sT)F34Z(g6#%2+fi9ih+F{aCb-~ISy6Uwc2+i+ zvt&H|)E4cbBXtdR?tQs=R@S%;Ua^(#%P-5zFLXMXw6xTu6is1nj@6lCg))<_(e5#`f*0+AS)DOkP`8*Lb|6rTO^LrUSJV#bxdaSIvROqettj!3l*0Mc(Qf z&%t92-pYMNdkY*$o_+iG6z%zv^Y&JG>+4HOT_wBh7LyZq zUdt*fuc_I+YhPiGIaAN-SuQWzv%5IoZq3QIWjk0lKdWGgJYRdL;h6hyS*5$ae)FM& z9+WT-LZ(Zu;>DsVXno#UUx*=dIY2@32_6At}pOU0Uei%+^$pZa7+8 zyYuW&zZafBofSt*_d-f?76+2bj~75-vY9)#Bgvle)K)_#{NSX9zarh)!VtfOH?P-X z*x+?9+Jfakc5?DIYg&97nw9^z!DB5aTAQEUfuy}XCA$kC-Ln)(O7F@m%C;H|%(swa zYd`)>t;btl%FoN|JaVwsU0zab<+b>0EA|vPIh(KrzX!Hp{jx1^i??7k>4h!WGM?0B z>R}6%u!YvQY#8?ELj~wA{P>f43_E+R9&N#XC~tGh&a8A|Co*32cPEdxw|BO;@mnZ4 z<$~Jj$jV2rCFTu1MSBb20cm{{Nm;(uBM0jaR8^!SsUYy|GY7m?uKhM%OW>fVba$RJ zo8Mk;pssRHZk9a@ZRkdJdv(dK97v7@-qY^p%Cfys*c`cNVnu6lZno3L8uUnV8q%I* z82DS32DSisf|?X?YYW`XM;47i>X*R< g4Sge(rt$!WCHx#1X$7D%VO;DGv4oG1j57Lv0nAXH-~a#s diff --git a/_material/basic_machines_constructor.xcf b/_material/basic_machines_constructor.xcf deleted file mode 100644 index 76f05681cbfe174e79106b0bef093276c2ae3353..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5167 zcmd5=e@t7~6@K?Y$Pe0vv@6N9EW0%$qZ#BG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 z=4kUQYzWY7(y7h5WZj(JWYTRhn$+gZ)tM-R&ZO0IAPiy{O&StbR=B7JmNt`f@Naoq B8m|BV diff --git a/_material/basic_machines_dust.xcf b/_material/basic_machines_dust.xcf deleted file mode 100644 index 69f4d4ae952a78edf121a3a037c9ad1eb90f6196..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1181 zcmZ{i&u-d45XNUINeCf-s-`{lV5wCFLPUv_&BeE(=#p+owAGVps ztKIdzk>&MUpW8n74>}#cJz4{D_rKQC`MZ_RVb^W;dQEd8bb5YvDKDj5{^#uXf@@}p zuPcT7>ecW`AKf(l_NUuBe{`n$E^p#@!D|=6??xjEMsvr$(YVpu4PD&O2OGMyp$|9o zF*MIztvv{S9oFE z%sD%xuo)K{bycsE%8V(hNENfeFe$Tz%obv{sDljy7)UYOG+eWVYROgsn{Cm1Jf#P(>=44TedX&1Ngm>u%;}_qvsIuj{X3C ChEgd2 diff --git a/_material/basic_machines_generator.xcf b/_material/basic_machines_generator.xcf deleted file mode 100644 index cd88924c71d2b651064fda87ac3d32d88d9a34b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3379 zcmeHJO=ufO6rPbROLh|K{-pHKf~b8+;<`@oMaQ-j(x!zLdaDn`@sA?MiGt`G?g{OGx*^n7+DyP7=bO;fAst8>YV zpI-FF3E)z&bRJ5to=_UDCtnV*^mgvn+@S!S!3&IG zFx1`!O9UA6M*<8J!DoOuI7Y!jd};un9>8Y?@LPa!-*ChMg!SQbPlk(dtjhro&knhf z+2gUub@b1Y;c9~Ps_kgISB2Z?R@;vwj{(NXzW^US>ZAQCoZuP8s*&n2`3KSd{-eiL z5+l*-0iZT!98^6p0;w1X=TUN41@{!8)iXdxK0syxn1$WwZcjjFVV6fZKwt*wIDKRZ z$c!-|A^>c!#q0lUBpw?xO?&l1q5hw+aRAPkJK zm$0wLzMspjEiNR#om*dAO^(mt`s?rx;JXxz*f#+P&kgTD?5E?gSQdS{+|4cLXs)-M zi})8xek1$&WkNj5!R*&NFX?$2A0Gib-^aj#rZzZ~u}PzUQ_tzQ@B!0gpR?hEJf z>-{qw)%*Jl)CcF^LXL1Rnx|Xc{8pakd%=a|-{^p1ywSmL3X&glDWT6<41BcbqT!aMtNCRW%*z{B1kp24@@smTK6HvcH^SnRToVV;#q~RmRlKjSk~1 z${75V+Dbz#ai*9yxQ^Adwrj-#ESQ!9*<4X2sdU%29K*1w{kvf`Bt;dA7DPU4C; zFdCahwa%EW>XxpmmM)dnOVOoWFl4EuZMUkWjQmtO! z7Vp_cLy~F_$~CDWZEu$gtf@2_+qHYOx+Ez|p(IlAX-O=Lcf>+bEZh}+4Jx4qm5SJD z!Tm8!(?bnftc4nAaATeZl_L!_#x&HR)z?4~OD(4C`5GA3j<11^8nBk4$+D+`X@UkD zrlrV==4-I0TdbqYrm1WeHPk=@4K&TtK zg9baGfeB9SVWlQ3^3G1Bzzl^dPj^rRSw0e>@|*~RjnHm!r_EKh*%yJg+HH=Fz$wQ@ z;O%Cc^ENgD=gN0}=X-Age(mfCx@o zmxD&&yx$0c2*9t)M~$G_d(a4K& diff --git a/_material/basic_machines_grinder.xcf b/_material/basic_machines_grinder.xcf deleted file mode 100644 index fa8d4a117fa47580415f6ea5754c53dc8b32de4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3449 zcmeHKL2ul~72e^l>^O-UM@@UNcT2>zBpaj>22cnB^e#l1UPhD&R$Cj1Q-RWw!{O`< zXC*eecbCZ-(#V zatY0k)UV=HO)19>7?-Ol<@aGC1RuYI`IhtNMng^*AHZzEd<*8UD_Q#e3jF)j9ZV3 zAk=Z|7O8bGDMjU2*9|u1Pv6Iszes(>M$W6g@ArM=&j-F^+fE!~hL}R1FiL&f_H&!D z>WcfeJt%UP7kLgoh@MFRdXFuE^0KtrjItJcW@A`8$Qi@AZRZrxd0YYob8N+)IXEgE z3Y+<$zi^l>lMNm|EPTaB&K&1#Ad@{TTE!GHf*XXh^TI9`)s#9IAT(lUIF6xq{{eb{ z2FQQicaXDUuUM$}YTNU+J><jz(l=KNnQ_r%zkwr*#McbAYiV+!!(FlA{ zdM1I?vaC^x(s@(@g7hrKn)QZ%C>?}FJkVeCh$WMS zMIk)JL%sQML_(RY5G^rA+3wg8stBrc4%$$J|w1WY41v2Qt~1 zxA+t?f*XW0Gj8%lHKh&)2#xSrw7(Cvy92my0dik&*~nfozeXjM>h_hiTRu-a*}97S zfbk~o$pt?q_nKuT<;T*~O0J6s?p>&Bt*{F#(x+*(RK-AQ%K#2~zV87CXM4V5sFH)6 zu?%I8S(f>#>I;MO>WV$p*ee8w?h(={^Hga=v!eRbROZUZ%Eq1V+rU7#i< z1e)_P!Px6`Jf>4xUD5519twD}2*#unzTN4Bj138)O^WceH0uO|P6^eA9=L4Q0mTBXp#QDI}&)QOI;A zbg?L^jL3)#|CCUmXt$$#_ddTDhOnzH>R!~F#ao&NGNZ^*uJ9=&PNAZJYLshy zQB)a`Vj2D^P9<~Onmf2R2m;s@5ci_iEO&~u|01w#_jjDbn2}<9DiW#w6lh!163V&s zS6LK{nzlgcOW!P@8oTrlssC$DyLof<`t@s9H?*7Aesgn8`{Yxr>w2Es@B4TCtu^)5 z!9fgN3J>qcBuVS1b!}H{l4Q}!n{ofj z#x93e=Bmn*G>Q6GKHBADa%=s@jqA|Jaereq7;ln(sgupb-}r4%6vsQt4%(7^yt}Fe z)|T(tAXmSu d^((G~tFin$5NfUhzFhvN`VLz@m5%Z;^dBT&B})JR diff --git a/_material/basic_machines_icons.xcf b/_material/basic_machines_icons.xcf deleted file mode 100644 index 3cfd9ca405794838ba4cb6cb7087adefc3dc399c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27355 zcmeHv3qVs>w)Q?JArKNmc!Y-!P+lU5N%D4-oXPG>ruzt{gx>$HN1LX!VmCnpH4Gxy&4|LOSu ze-E5}_F8+bz1QAnuf5k^d*>`MFUuXaE<0yfj@h!9;Zln?#eHyd90EV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ueYV^A3F zX|a4PpW=bLJ2uT|OpS>LgFO~2T16xWEb+J-ZAjydohT5XF)bz5m?BN-(x;`R#H6Oh z8YAVA*m{lRW4j<2@<>gKr))(Ddt-s+jrW-m+#aMI`DU?a>xLew-VeFj!H%ozdLDc4!qsoOd;X(=xaXS)rV94I{}(RA B^u+)G diff --git a/ball.lua b/ball.lua index 1add215..6626e57 100644 --- a/ball.lua +++ b/ball.lua @@ -46,7 +46,10 @@ local ball_spawner_update_form = function (pos) local scale = meta:get_int("scale"); local form = - "size[4.25,4.75]" .. -- width, height + "size[4.25,4.75]".. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[0.25,0.5;1,1;x0;target;"..x0.."] field[1.25,0.5;1,1;y0;;"..y0.."] field[2.25,0.5;1,1;z0;;"..z0.."]".. "field[3.25,0.5;1,1;speed;speed;"..speed.."]".. --speed, jump, gravity,sneak diff --git a/constructor.lua b/constructor.lua index 1c79944..c96cfc1 100644 --- a/constructor.lua +++ b/constructor.lua @@ -39,24 +39,24 @@ basic_machines.craft_recipe_order = { -- order in which nodes appear "keypad","light","grinder","mover", "battery","generator","detector", "distributor", "clock_generator","recycler","autocrafter","ball_spawner", "power_block", "power_cell", "coal_lump", } - -local constructor_process = function(pos) - + +local constructor_process = function(pos) + local meta = minetest.get_meta(pos); local craft = basic_machines.craft_recipes[meta:get_string("craft")]; if not craft then return end local item = craft.item; local craftlist = craft.craft; - + local inv = meta:get_inventory(); for _,v in pairs(craftlist) do - if not inv:contains_item("main", ItemStack(v)) then + if not inv:contains_item("main", ItemStack(v)) then meta:set_string("infotext", "#CRAFTING: you need " .. v .. " to craft " .. craft.item) - return + return end end - + for _,v in pairs(craftlist) do inv:remove_item("main", ItemStack(v)); end @@ -66,45 +66,48 @@ end local constructor_update_meta = function(pos) local meta = minetest.get_meta(pos); - local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z + local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z local craft = meta:get_string("craft"); - + local description = basic_machines.craft_recipes[craft]; local tex; - - if description then + + if description then tex = description.tex; local i = 0; local itex; - + local inv = meta:get_inventory(); -- set up craft list for _,v in pairs(description.craft) do i=i+1; - inv:set_stack("recipe", i, ItemStack(v)) + inv:set_stack("recipe", i, ItemStack(v)) end - + for j = i+1,6 do inv:set_stack("recipe", j, ItemStack("")) end - - description = description.description - - else - description = "" + + description = description.description + + else + description = "" tex = "" end - - + + local textlist = " "; - + local selected = meta:get_int("selected") or 1; for _,v in ipairs(basic_machines.craft_recipe_order) do textlist = textlist .. v .. ", "; - + end - - local form = + + local form = "size[8,10]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "textlist[0,0;3,1.5;craft;" .. textlist .. ";" .. selected .."]".. "button[3.5,1;1.25,0.75;CRAFT;CRAFT]".. "image[3.65,0;1,1;".. tex .. ".png]".. @@ -137,14 +140,14 @@ minetest.register_node("basic_machines:constructor", { local inv = meta:get_inventory();inv:set_size("main", 24);--inv:set_size("dst",6); inv:set_size("recipe",8); end, - + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos); local privs = minetest.get_player_privs(player:get_player_name()); if minetest.is_protected(pos, player:get_player_name()) and not privs.privs then return end -- only owner can interact with recycler constructor_update_meta(pos); end, - + allow_metadata_inventory_put = function(pos, listname, index, stack, player) if minetest.is_protected(pos, player:get_player_name()) then @@ -158,7 +161,7 @@ minetest.register_node("basic_machines:constructor", { if meta:get_string("owner") ~= player:get_player_name() and not privs.privs then return 0 end return stack:get_count(); end, - + allow_metadata_inventory_take = function(pos, listname, index, stack, player) if listname == "recipe" then return 0 end @@ -171,8 +174,8 @@ minetest.register_node("basic_machines:constructor", { return stack:get_count(); end, - - on_metadata_inventory_put = function(pos, listname, index, stack, player) + + on_metadata_inventory_put = function(pos, listname, index, stack, player) if listname == "recipe" then return 0 end local privs = minetest.get_player_privs(player:get_player_name()); @@ -183,59 +186,59 @@ minetest.register_node("basic_machines:constructor", { return stack:get_count(); end, - + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) return 0; end, - - mesecons = {effector = { - action_on = function (pos, node,ttl) + + mesecons = {effector = { + action_on = function (pos, node,ttl) if type(ttl)~="number" then ttl = 1 end if ttl<0 then return end -- machines_TTL prevents infinite recursion constructor_process(pos); end } }, - - on_receive_fields = function(pos, formname, fields, sender) - + + on_receive_fields = function(pos, formname, fields, sender) + if minetest.is_protected(pos, sender:get_player_name()) then minetest.record_protection_violation(pos, sender:get_player_name()) return end local meta = minetest.get_meta(pos); - + if fields.craft then if string.sub(fields.craft,1,3)=="CHG" then local sel = basic_machines.tonumber(string.sub(fields.craft,5)) or 1 meta:set_int("selected",sel); - + local i = 0; for _,v in ipairs(basic_machines.craft_recipe_order) do i=i+1; if i == sel then meta:set_string("craft",v); break; end end - else + else return end end - + if fields.CRAFT then constructor_process(pos); end - + constructor_update_meta(pos); end, - + can_dig = function(pos) local meta = minetest.get_meta(pos); local inv = meta:get_inventory(); - + if not (inv:is_empty("main")) then return false end -- main inv must be empty to be dug - + return true - + end @@ -248,6 +251,6 @@ minetest.register_craft({ {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, {"default:steel_ingot","default:copperblock","default:steel_ingot"}, {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, - + } }) \ No newline at end of file diff --git a/enviro.lua b/enviro.lua index 337224b..fc9c3f8 100644 --- a/enviro.lua +++ b/enviro.lua @@ -5,18 +5,18 @@ local enviro = {}; enviro.skyboxes = { - ["default"]={type = "regular", tex = {}}, + ["default"]={type = "regular", tex = {}}, ["space"]={type="skybox", tex={"sky_pos_y.png","sky_neg_y.png","sky_pos_z.png","sky_neg_z.png","sky_neg_x.png","sky_pos_x.png",}}, -- need textures installed! ["caves"]={type = "cavebox", tex = {"black.png","black.png","black.png","black.png","black.png","black.png",}}, }; - + local space_start = 1100; local ENABLE_SPACE_EFFECTS = false -- enable damage outside protected areas - + local enviro_update_form = function (pos) - + local meta = minetest.get_meta(pos); - + local x0,y0,z0; x0=meta:get_int("x0");y0=meta:get_int("y0");z0=meta:get_int("z0"); @@ -34,9 +34,12 @@ local enviro_update_form = function (pos) speed = meta:get_float("speed");jump = meta:get_float("jump"); g = meta:get_float("g"); sneak = meta:get_int("sneak"); local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z; - - local form = + + local form = "size[8,8.5]".. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[0.25,0.5;1,1;x0;target;"..x0.."] field[1.25,0.5;1,1;y0;;"..y0.."] field[2.25,0.5;1,1;z0;;"..z0.."]".. "field[3.25,0.5;1,1;r;radius;"..r.."]".. --speed, jump, gravity,sneak @@ -54,7 +57,7 @@ local enviro_update_form = function (pos) "listring[current_player;main]" meta:set_string("formspec",form) end - + -- enviroment changer minetest.register_node("basic_machines:enviro", { description = "Changes enviroment for players around target location", @@ -86,51 +89,51 @@ minetest.register_node("basic_machines:enviro", { local inv = meta:get_inventory(); inv:set_size("fuel",1*1); - + enviro_update_form(pos); end, - - mesecons = {effector = { - action_on = function (pos, node,ttl) + + mesecons = {effector = { + action_on = function (pos, node,ttl) local meta = minetest.get_meta(pos); local machines = meta:get_int("machines"); if not machines == 1 then meta:set_string("infotext","Error. You need machines privs.") return end - + local admin = meta:get_int("admin"); - + local inv = meta:get_inventory(); local stack = ItemStack("default:diamond 1"); - + if inv:contains_item("fuel", stack) then inv:remove_item("fuel", stack); else - meta:set_string("infotext","Error. Insert diamond in fuel inventory") + meta:set_string("infotext","Error. Insert diamond in fuel inventory") return end - + local x0,y0,z0,r,skybox,speed,jump,g,sneak; x0=meta:get_int("x0"); y0=meta:get_int("y0");z0=meta:get_int("z0"); -- target r= meta:get_int("r",5); skybox=meta:get_string("skybox"); speed=meta:get_float("speed");jump= meta:get_float("jump"); g=meta:get_float("g");sneak=meta:get_int("sneak"); if sneak~=0 then sneak = true else sneak = false end - + local players = minetest.get_connected_players(); for _,player in pairs(players) do local pos1 = player:getpos(); local dist = math.sqrt((pos1.x-pos.x)^2 + (pos1.y-pos.y)^2 + (pos1.z-pos.z)^2 ); if dist<=r then - + player:set_physics_override({speed=speed,jump=jump,gravity=g,sneak=sneak}) - + if admin == 1 then -- only admin can change skybox local sky = enviro.skyboxes[skybox]; player:set_sky(0,sky["type"],sky["tex"]); end end end - + -- attempt to set acceleration to balls, if any around local objects = minetest.get_objects_inside_radius(pos, r) - + for _,obj in pairs(objects) do if obj:get_luaentity() then local obj_name = obj:get_luaentity().name or "" @@ -138,26 +141,26 @@ minetest.register_node("basic_machines:enviro", { obj:setacceleration({x=0,y=-g,z=0}); end end - + end - - - - + + + + end } }, - - + + on_receive_fields = function(pos, formname, fields, sender) - + if minetest.is_protected(pos, sender:get_player_name()) then minetest.record_protection_violation(pos, sender:get_player_name()) return end local name = sender:get_player_name(); - + if fields.OK then local privs = minetest.get_player_privs(sender:get_player_name()); local meta = minetest.get_meta(pos); @@ -167,40 +170,40 @@ minetest.register_node("basic_machines:enviro", { if fields.y0 then y0 = tonumber(fields.y0) or 0 end if fields.z0 then z0 = tonumber(fields.z0) or 0 end if not privs.privs and (math.abs(x0)>10 or math.abs(y0)>10 or math.abs(z0) > 10) then return end - + meta:set_int("x0",x0);meta:set_int("y0",y0);meta:set_int("z0",z0); if privs.privs then -- only admin can set sky if fields.skybox then meta:set_string("skybox", fields.skybox) end end - if fields.r then + if fields.r then local r = tonumber(fields.r) or 0; if r > 10 and not privs.privs then return end - meta:set_int("r", r) + meta:set_int("r", r) end - if fields.g then + if fields.g then local g = tonumber(fields.g) or 1; if (g<0.1 or g>40) and not privs.privs then return end - meta:set_float("g", g) + meta:set_float("g", g) end - if fields.speed then + if fields.speed then local speed = tonumber(fields.speed) or 1; if (speed>1 or speed < 0) and not privs.privs then return end - meta:set_float("speed", speed) + meta:set_float("speed", speed) end - if fields.jump then + if fields.jump then local jump = tonumber(fields.jump) or 1; if (jump<0 or jump>2) and not privs.privs then return end - meta:set_float("jump", jump) + meta:set_float("jump", jump) end - if fields.sneak then - meta:set_int("sneak", tonumber(fields.sneak) or 0) + if fields.sneak then + meta:set_int("sneak", tonumber(fields.sneak) or 0) end - - + + enviro_update_form(pos); end end, - + allow_metadata_inventory_take = function(pos, listname, index, stack, player) if minetest.is_protected(pos, player:get_player_name()) then @@ -213,7 +216,7 @@ minetest.register_node("basic_machines:enviro", { if meta:get_string("owner")~=player:get_player_name() and not privs.privs then return 0 end return stack:get_count(); end, - + allow_metadata_inventory_put = function(pos, listname, index, stack, player) if minetest.is_protected(pos, player:get_player_name()) then @@ -226,13 +229,13 @@ minetest.register_node("basic_machines:enviro", { if meta:get_string("owner")~=player:get_player_name() and not privs.privs then return 0 end return stack:get_count(); end, - + can_dig = function(pos, player) -- dont dig if fuel is inside, cause it will be destroyed local meta = minetest.get_meta(pos); local inv = meta:get_inventory(); return inv:is_empty("fuel") end, - + }) @@ -275,7 +278,7 @@ minetest.register_on_joinplayer(enviro_adjust_physics) -- SERVER GLOBAL SPACE CODE: uncomment to enable it local round = math.floor; -local protector_position = function(pos) +local protector_position = function(pos) local r = 20; local ry = 2*r; return {x=round(pos.x/r+0.5)*r,y=round(pos.y/ry+0.5)*ry,z=round(pos.z/r+0.5)*r}; @@ -297,13 +300,13 @@ minetest.register_globalstep(function(dtime) enviro_space[name] = inspace; enviro_adjust_physics(player); end - + if ENABLE_SPACE_EFFECTS and inspace==1 then -- special space code - - + + if pos.y<1500 and pos.y>1120 then local hp = player:get_hp(); - + if hp>0 then minetest.chat_send_player(name,"WARNING: you entered DEADLY RADIATION ZONE"); local privs = minetest.get_player_privs(name) @@ -311,13 +314,13 @@ minetest.register_globalstep(function(dtime) end return else - + local ppos = protector_position(pos); local populated = (minetest.get_node(ppos).name=="basic_protect:protector"); - if populated then + if populated then if minetest.get_meta(ppos):get_int("space") == 1 then populated = false end end - + if not populated then -- do damage if player found not close to protectors local hp = player:get_hp(); local privs = minetest.get_player_privs(name); @@ -327,7 +330,7 @@ minetest.register_globalstep(function(dtime) end end end - + end end end @@ -341,7 +344,7 @@ end) -- description = "enables breathing in space", -- drawtype = "liquid", -- tiles = {"default_water_source_animated.png"}, - + -- drawtype = "glasslike", -- paramtype = "light", -- alpha = 150, @@ -352,7 +355,7 @@ end) -- buildable_to = true, -- drop = "", -- groups = {not_in_creative_inventory=1}, - -- after_place_node = function(pos, placer, itemstack, pointed_thing) + -- after_place_node = function(pos, placer, itemstack, pointed_thing) -- local r = 3; -- for i = -r,r do -- for j = -r,r do @@ -365,10 +368,10 @@ end) -- end -- end -- end - + -- }) --- minetest.register_abm({ +-- minetest.register_abm({ -- nodenames = {"basic_machines:air"}, -- neighbors = {"air"}, -- interval = 10, @@ -378,23 +381,23 @@ end) -- end -- }); - + minetest.register_on_punchplayer( -- bring gravity closer to normal with each punch function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage) - + if player:get_physics_override() == nil then return end local pos = player:getpos(); if pos.y>= space_start then return end - + local gravity = player:get_physics_override().gravity; if gravity<1 then gravity = 1; player:set_physics_override({gravity=gravity}) end end - + ) - + -- RECIPE: extremely expensive diff --git a/grinder.lua b/grinder.lua index 28e6ab6..006274d 100644 --- a/grinder.lua +++ b/grinder.lua @@ -24,7 +24,7 @@ basic_machines.grinder_recipes = { -- es gems dust cooking local es_gems = function() local es_gems = { - {name = "emerald", cooktime = 1200},{name = "ruby", cooktime = 1500},{name = "purpellium", cooktime = 1800}, + {name = "emerald", cooktime = 1200},{name = "ruby", cooktime = 1500},{name = "purpellium", cooktime = 1800}, {name = "aikerum", cooktime = 2000}} for _,v in pairs(es_gems) do @@ -32,53 +32,53 @@ local es_gems = function() type = "cooking", recipe = "es:"..v.name.."_dust", output = "es:"..v.name .."_crystal", - cooktime = v.cooktime + cooktime = v.cooktime }) end end minetest.after(0,es_gems); -local grinder_process = function(pos) - +local grinder_process = function(pos) + local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name; local meta = minetest.get_meta(pos);local inv = meta:get_inventory(); - - + + -- PROCESS: check out inserted items local stack = inv:get_stack("src",1); if stack:is_empty() then return end; -- nothing to do local src_item = stack:to_string(); - local p=string.find(src_item," "); if p then src_item = string.sub(src_item,1,p-1) else p = 0 end -- take first word to determine what item was - + local p=string.find(src_item," "); if p then src_item = string.sub(src_item,1,p-1) else p = 0 end -- take first word to determine what item was + local def = basic_machines.grinder_recipes[src_item]; - if not def then + if not def then meta:set_string("infotext", "please insert valid materials"); return end-- unknown node - + if stack:get_count()< def[3] then meta:set_string("infotext", "Recipe requires at least " .. def[3] .. " " .. src_item); return end - - + + -- FUEL CHECK local fuel = meta:get_float("fuel"); - + if fuel-def[1]<0 then -- we need new fuel, check chest below - local fuellist = inv:get_list("fuel") + local fuellist = inv:get_list("fuel") if not fuellist then return end - - local fueladd, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) - + + local fueladd, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + local supply=0; if fueladd.time == 0 then -- no fuel inserted, try look for outlet -- No valid fuel in fuel list supply = basic_machines.check_power({x=pos.x,y=pos.y-1,z=pos.z} , def[1]) or 0; -- tweaked so 1 coal = 1 energy - if supply>0 then + if supply>0 then fueladd.time = supply -- same as 10 coal else meta:set_string("infotext", "Please insert fuel"); @@ -90,51 +90,54 @@ local grinder_process = function(pos) fueladd.time=fueladd.time*0.1/4 -- thats 1 for coal --minetest.chat_send_all("FUEL ADD TIME " .. fueladd.time) end - end - if fueladd.time>0 then + end + if fueladd.time>0 then fuel=fuel + fueladd.time meta:set_float("fuel",fuel); meta:set_string("infotext", "added fuel furnace burn time " .. fueladd.time .. ", fuel status " .. fuel); end - if fuel-def[1]<0 then - meta:set_string("infotext", "need at least " .. def[1]-fuel .. " fuel to complete operation "); return + if fuel-def[1]<0 then + meta:set_string("infotext", "need at least " .. def[1]-fuel .. " fuel to complete operation "); return end - + end - - + + -- process items - + -- TO DO: check if there is room for item yyy local addstack = ItemStack(def[2]); if inv:room_for_item("dst", addstack) then inv:add_item("dst",addstack); else return end - + --take 1 item from src inventory for each activation stack=stack:take_item(1); inv:remove_item("src", stack) - + -- minetest.sound_play("grinder", {pos=pos,gain=0.5,max_hear_distance = 16,}) - + fuel = fuel-def[1]; -- burn fuel meta:set_float("fuel",fuel); meta:set_string("infotext", "fuel " .. fuel); - + end local grinder_update_meta = function(pos) local meta = minetest.get_meta(pos); - local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z - local form = + local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z + local form = "size[8,8]".. -- width, height --"size[6,10]".. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "label[0,0;IN] label[1,0;OUT] label[0,2;FUEL] ".. - "list["..list_name..";src;0.,0.5;1,1;]".. + "list["..list_name..";src;0.,0.5;1,1;]".. "list["..list_name..";dst;1.,0.5;3,3;]".. - "list["..list_name..";fuel;0.,2.5;1,1;]".. + "list["..list_name..";fuel;0.,2.5;1,1;]".. "list[current_player;main;0,4;8,4;]".. "button[6.5,0.5;1,1;OK;OK]".. "button[6.5,1.5;1,1;help;help]".. @@ -160,14 +163,14 @@ minetest.register_node("basic_machines:grinder", { meta:set_float("fuel",0); local inv = meta:get_inventory();inv:set_size("src", 1);inv:set_size("dst",9);inv:set_size("fuel",1); end, - + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos); local privs = minetest.get_player_privs(player:get_player_name()); if minetest.is_protected(pos, player:get_player_name()) and not privs.privs then return end -- only owner can interact with recycler grinder_update_meta(pos); end, - + allow_metadata_inventory_put = function(pos, listname, index, stack, player) if minetest.is_protected(pos, player:get_player_name()) then @@ -180,7 +183,7 @@ minetest.register_node("basic_machines:grinder", { if meta:get_string("owner")~=player:get_player_name() and not privs.privs then return 0 end return stack:get_count(); end, - + allow_metadata_inventory_take = function(pos, listname, index, stack, player) if minetest.is_protected(pos, player:get_player_name()) then @@ -193,25 +196,25 @@ minetest.register_node("basic_machines:grinder", { if meta:get_string("owner")~=player:get_player_name() and not privs.privs then return 0 end return stack:get_count(); end, - - on_metadata_inventory_put = function(pos, listname, index, stack, player) + + on_metadata_inventory_put = function(pos, listname, index, stack, player) if listname =="dst" then return end grinder_process(pos); end, - + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) return 0; end, - - mesecons = {effector = { - action_on = function (pos, node,ttl) + + mesecons = {effector = { + action_on = function (pos, node,ttl) if type(ttl)~="number" then ttl = 1 end if ttl<0 then return end -- machines_TTL prevents infinite recursion grinder_process(pos); end } }, - + on_receive_fields = function(pos, formname, fields, sender) if minetest.is_protected(pos, sender:get_player_name()) then @@ -221,30 +224,34 @@ minetest.register_node("basic_machines:grinder", { if fields.quit then return end local meta = minetest.get_meta(pos); - + if fields.help then --recipe list: [in] ={fuel cost, out, quantity of material required for processing} - --basic_machines.grinder_recipes + --basic_machines.grinder_recipes local text = "RECIPES\n\n"; for key,v in pairs(basic_machines.grinder_recipes) do text = text .. "INPUT ".. key .. " " .. v[3] .. " OUTPUT " .. v[2] .. "\n" end - - local form = "size [6,7] textarea[0,0;6.5,8.5;grinderhelp;GRINDER RECIPES;".. text.."]" + + local form = "size[6,7]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "textarea[0,0;6.5,8.5;grinderhelp;GRINDER RECIPES;".. text.."]" minetest.show_formspec(sender:get_player_name(), "grinderhelp", form) - + end grinder_update_meta(pos); end, - + can_dig = function(pos) local meta = minetest.get_meta(pos); local inv = meta:get_inventory(); - + if not (inv:is_empty("fuel")) or not (inv:is_empty("src")) or not (inv:is_empty("dst")) then return false end -- all inv must be empty to be dug - + return true - + end }) @@ -256,7 +263,7 @@ minetest.register_craft({ {"default:diamond","default:mese","default:diamond"}, {"default:mese","default:diamondblock","default:mese"}, {"default:diamond","default:mese","default:diamond"}, - + } }) @@ -265,13 +272,13 @@ minetest.register_craft({ local function register_dust(name,input_node_name,ingot,grindcost,cooktime,R,G,B) - - if not R then R = "FF" end - if not G then G = "FF" end - if not B then B = "FF" end - + + if not R then R = "FF" end + if not G then G = "FF" end + if not B then B = "FF" end + local purity_table = {"33","66"}; - + for i = 1,#purity_table do local purity = purity_table[i]; minetest.register_craftitem("basic_machines:"..name.."_dust_".. purity, { @@ -279,11 +286,11 @@ local function register_dust(name,input_node_name,ingot,grindcost,cooktime,R,G,B inventory_image = "basic_machines_dust.png^[colorize:#"..R..G..B..":"..purity * 2, }) end - + basic_machines.grinder_recipes[input_node_name] = {grindcost,"basic_machines:"..name.."_dust_".. purity_table[1].." 2",1} -- register grinder recipe - + if ingot~="" then - + for i = 1,#purity_table-1 do minetest.register_craft({ type = "cooking", @@ -292,7 +299,7 @@ local function register_dust(name,input_node_name,ingot,grindcost,cooktime,R,G,B cooktime = cooktime }) end - + minetest.register_craft({ type = "cooking", recipe = "basic_machines:"..name.."_dust_".. purity_table[#purity_table], @@ -300,7 +307,7 @@ local function register_dust(name,input_node_name,ingot,grindcost,cooktime,R,G,B output = ingot, cooktime = cooktime }) - + end end @@ -319,11 +326,11 @@ basic_machines.grinder_recipes["default:tin_ingot"] = {4,"basic_machines:tin_dus -- are moreores (tin, silver, mithril) present? -local table = minetest.registered_items["moreores:tin_lump"]; if table then +local table = minetest.registered_items["moreores:tin_lump"]; if table then -- register_dust("tin","moreores:tin_lump","moreores:tin_ingot",4,8,"FF","FF","FF") register_dust("silver","moreores:silver_lump","moreores:silver_ingot",5,15,"BB","BB","BB") register_dust("mithril","moreores:mithril_lump","moreores:mithril_ingot",16,750,"00","00","FF") - + basic_machines.grinder_recipes["moreores:tin_ingot"] = {4,"basic_machines:tin_dust_33 2",1}; basic_machines.grinder_recipes["moreores:silver_ingot"] = {5,"basic_machines:silver_dust_33 2",1}; basic_machines.grinder_recipes["moreores:mithril_ingot"] = {16,"basic_machines:mithril_dust_33 2",1}; diff --git a/mover.lua b/mover.lua index f79e384..107ef3d 100644 --- a/mover.lua +++ b/mover.lua @@ -265,6 +265,9 @@ local get_mover_form = function(pos,player) form = "size[8,8.25]" .. -- width, height --"size[6,10]" .. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "tabheader[0,0;tabs;MODE OF OPERATION,WHERE TO MOVE;".. seltab .. ";true;true]".. "label[0.,0;MODE selection]".."button[3,0.25;1,1;help;help]".. "dropdown[0.,0.35;3,1;mode;normal,dig,drop,object,inventory,transport;".. mode .."]".. @@ -294,6 +297,9 @@ local get_mover_form = function(pos,player) form = "size[6,5.5]" .. -- width, height --"size[6,10]" .. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "tabheader[0,0;tabs;MODE OF OPERATION,WHERE TO MOVE;".. seltab .. ";true;true]".. "label[0.,0;" .. minetest.colorize("lawngreen","INPUT AREA - mover will dig here").."]".. @@ -1002,7 +1008,7 @@ minetest.register_node("basic_machines:mover", { if prefer ~= node1.name and not source_chest and mode ~= "inventory" then - return + return end -- take stuff from chest @@ -1493,6 +1499,9 @@ local function check_keypad(pos,name,ttl) -- called only when manually activated if meta:get_string("text") == "@" then -- keypad works as a keyboard local form = "size[3,1]" .. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[0.25,0.25;3,1;pass;Enter text: ;".."".."] button_exit[0.,0.5;1,1;OK;OK]"; minetest.show_formspec(name, "basic_machines:check_keypad_"..minetest.pos_to_string(pos), form) return @@ -1501,11 +1510,12 @@ local function check_keypad(pos,name,ttl) -- called only when manually activated pass = "" local form = "size[3,1.25]" .. -- width, height - "bgcolor[#FF8888BB; false]" .. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[0.25,0.25;3,1;pass;Enter Password: ;".."".."] button_exit[0.,0.75;1,1;OK;OK]"; minetest.show_formspec(name, "basic_machines:check_keypad_"..minetest.pos_to_string(pos), form) return - end minetest.register_node("basic_machines:keypad", { @@ -1550,7 +1560,9 @@ minetest.register_node("basic_machines:keypad", { pass = meta:get_string("pass"); local form = "size[4.25,3.75]" .. -- width, height - "bgcolor[#888888BB; false]" .. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[2.25,0.25;2.25,1;pass;Password: ;"..pass.."]" .. "field[0.25,2.5;3.25,1;text;text;".. text .."]" .. "field[0.25,0.25;1,1;mode;mode;"..mode.."]".. "field[1.25,0.25;1,1;iter;repeat;".. iter .."]".. @@ -1638,6 +1650,9 @@ minetest.register_node("basic_machines:detector", { local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z local form = "size[4,6.25]" .. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "field[0.25,0.5;1,1;x0;source1;"..x0.."] field[1.25,0.5;1,1;y0;;"..y0.."] field[2.25,0.5;1,1;z0;;"..z0.."]".. "dropdown[3,0.25;1,1;op; ,AND,OR;".. op .."]".. "field[0.25,1.5;1,1;x1;source2;"..x1.."] field[1.25,1.5;1,1;y1;;"..y1.."] field[2.25,1.5;1,1;z1;;"..z1.."]".. @@ -1949,6 +1964,9 @@ local get_distributor_form = function(pos,player) local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z local form = "size[7,"..(0.75+(n)*0.75).."]" .. -- width, height + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. "label[0,-0.25;" .. minetest.colorize("lawngreen","target: x y z, MODE -2=only OFF, -1=NOT input/0/1=input, 2 = only ON") .. "]"; for i =1,n do form = form.."field[0.25,"..(0.5+(i-1)*0.75)..";1,1;x"..i..";;"..p[i].x.."] field[1.25,"..(0.5+(i-1)*0.75)..";1,1;y"..i..";;"..p[i].y.."] field[2.25,"..(0.5+(i-1)*0.75)..";1,1;z"..i..";;"..p[i].z.."] field [ 3.25,"..(0.5+(i-1)*0.75)..";1,1;active"..i..";;" .. active[i] .. "]" @@ -1958,7 +1976,6 @@ local get_distributor_form = function(pos,player) form=form.."button_exit[4.25,"..(0.25+(n)*0.75)..";1,1;ADD;ADD]".."button_exit[3.,"..(0.25+(n)*0.75)..";1,1;OK;OK]".."field[0.25,"..(0.5+(n)*0.75)..";1,1;delay;delay;"..delay .. "]"; form = form.."button[6.25,"..(0.25+(n)*0.75)..";1,1;help;help]"; return form - end @@ -2164,7 +2181,11 @@ minetest.register_node("basic_machines:light_on", { local meta = minetest.get_meta(pos); local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z local deactivate = meta:get_int("deactivate"); - local form = "size[2,2] field[0.25,0.5;2,1;deactivate;deactivate after ;"..deactivate.."]".."button_exit[0.,1;1,1;OK;OK]"; + local form = "size[2,2]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "field[0.25,0.5;2,1;deactivate;deactivate after ;"..deactivate.."]".."button_exit[0.,1;1,1;OK;OK]"; meta:set_string("formspec", form); end, on_receive_fields = function(pos, formname, fields, player) @@ -2179,7 +2200,11 @@ minetest.register_node("basic_machines:light_on", { local deactivate = basic_machines.tonumber(fields.deactivate) or 0; if deactivate <0 or deactivate > 600 then deactivate = 0 end meta:set_int("deactivate",deactivate); - local form = "size[2,2] field[0.25,0.5;2,1;deactivate;deactivate after ;"..deactivate.."]".."button_exit[0.,1;1,1;OK;OK]"; + local form = "size[2,2]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "field[0.25,0.5;2,1;deactivate;deactivate after ;"..deactivate.."]".."button_exit[0.,1;1,1;OK;OK]"; meta:set_string("formspec", form); end @@ -2535,7 +2560,11 @@ minetest.register_on_player_receive_fields(function(player,formname,fields) "\n\n FUEL CONSUMPTION depends on blocks to be moved and distance. For example, stone or tree is harder to move than dirt, harvesting wheat is very cheap and and moving lava is very hard.".. "\n\n UPGRADE mover by moving mese blocks in upgrade inventory. Each mese block increases mover range by 10, fuel consumption is divided by (number of mese blocks)+1 in upgrade. Max 10 blocks are used for upgrade. Dont forget to click OK to refresh after upgrade. ".. "\n\n Activate mover by keypad/detector signal or mese signal (if mesecons mod) ."; - local form = "size [6,7] textarea[0,0;6.5,8.5;help;MOVER HELP;".. text.."]" + local form = "size [6,7]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "textarea[0,0;6.5,8.5;help;MOVER HELP;".. text.."]" minetest.show_formspec(name, "basic_machines:help_mover", form) return end @@ -2700,7 +2729,11 @@ minetest.register_on_player_receive_fields(function(player,formname,fields) "\ntext replacement : Suppose keypad A is set with text \"@some @. text @!\" and there are blocks on top of keypad A with infotext '1' and '2'. Suppose we target B with A and activate A. Then text of keypad B will be set to \"some 1. text 2!\"".. "\nword extraction: Suppose similiar setup but now keypad A is set with text \"%1\". Then upon activation text of keypad B will be set to 1.st word of infotext"; - local form = "size [6,7] textarea[0,0;6.5,8.5;help;KEYPAD HELP;".. text.."]" + local form = "size[6,7]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "textarea[0,0;6.5,8.5;help;KEYPAD HELP;".. text.."]" minetest.show_formspec(name, "basic_machines:help_keypad", form) return end @@ -2805,7 +2838,11 @@ minetest.register_on_player_receive_fields(function(player,formname,fields) "If source position is chest it will look into it and check if there are items inside. If mode is inventory it will check for items in specified inventory of source node.".. "\n\nADVANCED: you can select second source and then select AND/OR from the right top dropdown list to do logical operations. You can also filter output signal:\n -2=only OFF,-1=NOT/0/1=normal,2=only ON, 3 only if changed".. " 4 = if target keypad set its text to detected object name" ; - local form = "size [5.5,5.5] textarea[0,0;6,7;help;DETECTOR HELP;".. text.."]" + local form = "size[5.5,5.5]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "textarea[0,0;6,7;help;DETECTOR HELP;".. text.."]" minetest.show_formspec(name, "basic_machines:help_detector", form) end @@ -2954,7 +2991,11 @@ minetest.register_on_player_receive_fields(function(player,formname,fields) "delay option adds delay to activations, in seconds. With negative delay activation is randomized with probability -delay/1000.\n\n".. "ADVANCED: you can use distributor as an event handler. First you must deactivate first target by putting 0 at\n".. "last place in first line. Meanings of first 2 numbers are as follows: first number 0/1 controls if node/n".. "listens to failed interact attempts around it, second number -1/1 listens to chat and can mute it"; - local form = "size [5.5,5.5] textarea[0,0;6,7;help;DISTRIBUTOR HELP;".. text.."]" + local form = "size[5.5,5.5]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "textarea[0,0;6,7;help;DISTRIBUTOR HELP;".. text.."]" minetest.show_formspec(name, "basic_machines:help_distributor", form) end diff --git a/recycler.lua b/recycler.lua index c2555fb..827d41c 100644 --- a/recycler.lua +++ b/recycler.lua @@ -13,25 +13,25 @@ local no_recycle_list = { } -local recycler_process = function(pos) - +local recycler_process = function(pos) + local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name; local meta = minetest.get_meta(pos);local inv = meta:get_inventory(); - + -- FUEL CHECK local fuel = meta:get_float("fuel"); - + if fuel-1<0 then -- we need new fuel, check chest below - local fuellist = inv:get_list("fuel") + local fuellist = inv:get_list("fuel") if not fuellist then return end - - local fueladd, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) - + + local fueladd, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + local supply=0; if fueladd.time == 0 then -- no fuel inserted, try look for outlet -- No valid fuel in fuel list supply = basic_machines.check_power({x=pos.x,y=pos.y-1,z=pos.z},1) or 0; - if supply>0 then + if supply>0 then fueladd.time = 40*supply -- same as 10 coal else meta:set_string("infotext", "Please insert fuel."); @@ -42,8 +42,8 @@ local recycler_process = function(pos) inv:set_stack("fuel", 1, afterfuel.items[1]) fueladd.time = fueladd.time*0.1; -- thats 4 for coal end - end - if fueladd.time>0 then + end + if fueladd.time>0 then fuel=fuel + fueladd.time meta:set_float("fuel",fuel); meta:set_string("infotext", "added fuel furnace burn time " .. fueladd.time .. ", fuel status " .. fuel); @@ -51,15 +51,15 @@ local recycler_process = function(pos) if fuel-1<0 then return end end - - + + -- RECYCLING: check out inserted items local stack = inv:get_stack("src",1); if stack:is_empty() then return end; -- nothing to do local src_item = stack:to_string(); - local p=string.find(src_item," "); if p then src_item = string.sub(src_item,1,p-1) end -- take first word to determine what item was - + local p=string.find(src_item," "); if p then src_item = string.sub(src_item,1,p-1) end -- take first word to determine what item was + -- look if we already handled this item local known_recipe=true; if src_item~=meta:get_string("node") then-- did we already handle this? if yes read from cache @@ -68,56 +68,56 @@ local recycler_process = function(pos) meta:set_int("reqcount",0); known_recipe=false; end - + local itemlist, reqcount; reqcount = 1; -- needed count of materials for recycle to work - + if not known_recipe then - + if no_recycle_list[src_item] then meta:set_string("node","") return end -- dont allow recycling of forbidden items - + local recipe = minetest.get_all_craft_recipes( src_item ); local recipe_id = basic_machines.tonumber(meta:get_int("recipe")) or 1; - - if not recipe then + + if not recipe then return - else + else itemlist = recipe[recipe_id]; if not itemlist then meta:set_string("node","") return end; itemlist=itemlist.items; end local output = recipe[recipe_id].output or ""; - if string.find(output," ") then + if string.find(output," ") then local par = string.find(output," "); --if (basic_machines.tonumber(string.sub(output, par)) or 0)>1 then itemlist = {} end - + if par then reqcount = basic_machines.tonumber(string.sub(output, par)) or 1; end - - end - + + end + meta:set_string("itemlist",minetest.serialize(itemlist)); -- read cached itemlist meta:set_int("reqcount",reqcount); - else + else itemlist=minetest.deserialize(meta:get_string("itemlist")) or {}; reqcount = meta:get_int("reqcount") or 1; end - + if stack:get_count()Q&+#a`uy3( z?sNHvo7J;t8ZJE5dhwaIiHV8v@$s>-vC+}dk&%(%;o+g7p~1nyfq{Yk{(k3J*L}Iq z!2i#{xz|7E*}$2%`+8pCw)`)G@4tHd0YKjG?tJ0WdkU@CaB?z?lmy$GEfODu2jY&J zN({?=URgaInH|})MhRdcFxGd@)kiVsQI%xFAQ8RE;6+=IL~^BAaw6L5Xro@olGrGZ&B%z(GgsaT zKEb=nsVZ4VEZXX%tF_84(mR7|U4PEqTB{4acn>Zv*ikOIr)HWK`2}bd# zXc31<)`G<4i8x?#wU1QCpSl%9STPy}<;n$P<)K8P5KU?;A%{qGDZ`f>gW83-UB)zj z9hYZ92`y85t}5cRY=`kCT3iv$%413z_jTTC8v#|6$Zez#>a!vAx<@UB-%zeb&=qtN zaYiW>*CB3EL=h8f2DBNjmxzJDAp@sFzVH}}GEgw9!BNmgbP$U;29u(SktlY8_6}HM ziAafcOsL%&+BFen2^|XTroe`XNQ?C!cUMlaf3h0IXwq9&PQs^6=u%>GQ`tU__Kp>J zdc;-0r#7fjPm}eDLoqxzaf)A9Ssi%7#KH<d(o?tjHlVW%l3y z)!e&sFI|*iI-__>YTmT8i4XZ=>jNZa%;ekUaA-FpV_rLtTF++1*}pZiX8frZ+Q?qB zj)C=kZjIv-kC!Kzs}fIq{nUR%>j+Qex^wqfrxs5B__j&L)qDkq?U{fdNzZ=wYsxS_ nkm&3wToAJLim6G^;jhde4>BK``TUR=&^ZjAu6{1-oD!M%pnhc$1FD3`#YM&*MBx4rL(Hs2 zJ*zp$ifVx>4khX+8b^%Ur%vsv4;{nu(&lW3H9ZOnt_w&q9Oscr3cUBVy54#xd&M?e z%d*je;lY^$$0xrg)F;Ec8Ncr=6gljjBaSvunYl9Y=HWbu|43Q}Gm5|7Y5)KL07*qo IM6N<$g1NeGEdT%j diff --git a/textures/keypad.png b/textures/keypad.png index da80efefc3bbd82e5310d9c5d17fe92445cfd91e..d32fb718abe0d6d9d0054d24bf2f7cba5259a263 100644 GIT binary patch delta 323 zcmV-J0lfa^1Kt9VB!68{OjJc9BO@P$hLx3-D=RCktgI&|Cmw%)KtMnp9UUKlg0Zl% z*Vo=kN=m1vr!FoonVFdp5fKdy4L3J8-rnIJgMy->q8)mA;^O4i*4x|L+n%1D)YR1q z3JT55)VR2~V2_lV0002INkljdpA8?(0dhcFO>hs6f#S)gm^0G_j5C+5lRAfyAl`*OZK zPjA#f?hQ-D+^g{Gkr16oynS77T;7Uggbi2qw!Gzo4=n_E@nG|KY%bvr7PD9jwvTC& zq@I^^|IFp{m^?-#2bfYzl`X6Y-_W+zteadx6_J%vQZ00+q@&A7M3gAfO?gm`^aHo) V3hfuqJyiez002ovPDHLkV1h=`nLhvk delta 460 zcmV;-0W<#I0_FpdB!81oOjJbx000OG2n-Ai6B82^6%`p786O`XBqSs(EG#fEFgG_h zJv}``LqkeRN=!^lVPRpDlarN|m6w;7nVFfMo}QwjqNk^)tgNiBudlGNu(-ImyS%!- zzP`Z0z{0}9#KpzN$HvFU$jHga%F4>j%FfQq$;-^k%+1Zu&wtL(&(F}%(9zM+(9+G) z($m(`(bLq_*4EW?Xl8N%0004EOGiWihy@);00009a7bBm000ie000ie0hKEb8vpVi^XEtN=_px+rqQHX0R&cIoN<>TjIK5|NdISkMr zTmf^1IV$NF0<&|g5?3Nel+#1Q$T>b^&gpme!8rr>6s6cwiCa8<_&}gzy5MV-<*}Bq zEd%H