From bb1e13afd8cff00eb3f926abcd4de5f08dced9e6 Mon Sep 17 00:00:00 2001 From: Kotolegokot Date: Mon, 15 Oct 2012 16:38:08 +0600 Subject: [PATCH 1/2] Buckets' craftitems added --- mods/anvil/init.lua | 36 ------- mods/bucket/README.txt | 26 ------ mods/bucket/depends.txt | 2 - mods/bucket/init.lua | 88 ------------------ mods/bucket/textures/bucket.png | Bin 329 -> 0 bytes mods/bucket/textures/bucket_lava.png | Bin 363 -> 0 bytes mods/bucket/textures/bucket_water.png | Bin 369 -> 0 bytes mods/metals/buckets.lua | 76 +++++++++++++++ mods/metals/depends.txt | 2 +- mods/metals/init.lua | 11 +-- .../textures/metals_aluminium_bucket.png | Bin 0 -> 354 bytes .../textures/metals_bismuth_bronze_bucket.png | Bin 0 -> 378 bytes .../metals/textures/metals_bismuth_bucket.png | Bin 0 -> 375 bytes .../textures/metals_black_bronze_bucket.png | Bin 0 -> 357 bytes .../textures/metals_black_steel_bucket.png | Bin 0 -> 337 bytes mods/metals/textures/metals_brass_bucket.png | Bin 0 -> 379 bytes mods/metals/textures/metals_bronze_bucket.png | Bin 0 -> 374 bytes mods/metals/textures/metals_copper_bucket.png | Bin 0 -> 378 bytes mods/metals/textures/metals_gold_bucket.png | Bin 0 -> 376 bytes mods/metals/textures/metals_lava.png | Bin 0 -> 458 bytes mods/metals/textures/metals_lead_bucket.png | Bin 0 -> 369 bytes mods/metals/textures/metals_nickel_bucket.png | Bin 0 -> 379 bytes .../textures/metals_pig_iron_bucket.png | Bin 0 -> 379 bytes .../textures/metals_platinum_bucket.png | Bin 0 -> 368 bytes .../textures/metals_rose_gold_bucket.png | Bin 0 -> 370 bytes mods/metals/textures/metals_silver_bucket.png | Bin 0 -> 367 bytes mods/metals/textures/metals_steel_bucket.png | Bin 0 -> 346 bytes .../metals_sterling_silver_bucket.png | Bin 0 -> 378 bytes mods/metals/textures/metals_tin_bucket.png | Bin 0 -> 359 bytes mods/metals/textures/metals_water.png | Bin 0 -> 436 bytes .../textures/metals_wrought_iron_bucket.png | Bin 0 -> 355 bytes mods/metals/textures/metals_zinc_bucket.png | Bin 0 -> 370 bytes 32 files changed, 79 insertions(+), 162 deletions(-) delete mode 100644 mods/bucket/README.txt delete mode 100644 mods/bucket/depends.txt delete mode 100644 mods/bucket/init.lua delete mode 100644 mods/bucket/textures/bucket.png delete mode 100644 mods/bucket/textures/bucket_lava.png delete mode 100644 mods/bucket/textures/bucket_water.png create mode 100644 mods/metals/buckets.lua create mode 100644 mods/metals/textures/metals_aluminium_bucket.png create mode 100644 mods/metals/textures/metals_bismuth_bronze_bucket.png create mode 100644 mods/metals/textures/metals_bismuth_bucket.png create mode 100644 mods/metals/textures/metals_black_bronze_bucket.png create mode 100644 mods/metals/textures/metals_black_steel_bucket.png create mode 100644 mods/metals/textures/metals_brass_bucket.png create mode 100644 mods/metals/textures/metals_bronze_bucket.png create mode 100644 mods/metals/textures/metals_copper_bucket.png create mode 100644 mods/metals/textures/metals_gold_bucket.png create mode 100644 mods/metals/textures/metals_lava.png create mode 100644 mods/metals/textures/metals_lead_bucket.png create mode 100644 mods/metals/textures/metals_nickel_bucket.png create mode 100644 mods/metals/textures/metals_pig_iron_bucket.png create mode 100644 mods/metals/textures/metals_platinum_bucket.png create mode 100644 mods/metals/textures/metals_rose_gold_bucket.png create mode 100644 mods/metals/textures/metals_silver_bucket.png create mode 100644 mods/metals/textures/metals_steel_bucket.png create mode 100644 mods/metals/textures/metals_sterling_silver_bucket.png create mode 100644 mods/metals/textures/metals_tin_bucket.png create mode 100644 mods/metals/textures/metals_water.png create mode 100644 mods/metals/textures/metals_wrought_iron_bucket.png create mode 100644 mods/metals/textures/metals_zinc_bucket.png diff --git a/mods/anvil/init.lua b/mods/anvil/init.lua index e6d8b27..db18afb 100644 --- a/mods/anvil/init.lua +++ b/mods/anvil/init.lua @@ -187,42 +187,6 @@ minetest.register_node("anvil:self", { hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) return - --moreores - elseif ingotstack:get_name()=="metals:gold_ingot" and minetest.get_modpath("moreores") ~= nil then - inv:add_item("res","moreores:gold_ingot") - ingotstack:take_item() - inv:set_stack("ingot",1,ingotstack) - hammerstack:add_wear(65535/30) - inv:set_stack("hammer",1,hammerstack) - return - elseif ingotstack:get_name()=="metals:silver_ingot" and minetest.get_modpath("moreores") ~= nil then - inv:add_item("res","moreores:silver_ingot") - ingotstack:take_item() - inv:set_stack("ingot",1,ingotstack) - hammerstack:add_wear(65535/30) - inv:set_stack("hammer",1,hammerstack) - return - elseif ingotstack:get_name()=="metals:tin_ingot" and minetest.get_modpath("moreores") ~= nil then - inv:add_item("res","moreores:tin_ingot") - ingotstack:take_item() - inv:set_stack("ingot",1,ingotstack) - hammerstack:add_wear(65535/30) - inv:set_stack("hammer",1,hammerstack) - return - elseif ingotstack:get_name()=="metals:copper_ingot" and minetest.get_modpath("moreores") ~= nil then - inv:add_item("res","moreores:copper_ingot") - ingotstack:take_item() - inv:set_stack("ingot",1,ingotstack) - hammerstack:add_wear(65535/30) - inv:set_stack("hammer",1,hammerstack) - return - elseif ingotstack:get_name()=="metals:bronze_ingot" and minetest.get_modpath("moreores") ~= nil then - ingotstack:take_item() - inv:add_item("res","moreores:bronze_ingot") - inv:set_stack("ingot",1,ingotstack) - hammerstack:add_wear(65535/30) - inv:set_stack("hammer",1,hammerstack) - return --[[elseif string.sub(ingotstack:get_name(), 1, 6)=="metals" and string.sub(ingotstack:get_name(),string.len(ingotstack:get_name())-9,9)=="_unshaped" then inv:add_item("res", "metals:"..string.sub(ingotstack:get_name(),7,string.len(ingotstack:get_name())-13).."_ingot") ingotstack:take_item() diff --git a/mods/bucket/README.txt b/mods/bucket/README.txt deleted file mode 100644 index 7dad641..0000000 --- a/mods/bucket/README.txt +++ /dev/null @@ -1,26 +0,0 @@ -Minetest 0.4 mod: bucket -========================= - -License of source code: ------------------------ -Copyright (C) 2011-2012 Kahrl -Copyright (C) 2011-2012 celeron55, Perttu Ahola - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -http://www.gnu.org/licenses/lgpl-2.1.html - -License of media (textures and sounds) --------------------------------------- -Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) -http://creativecommons.org/licenses/by-sa/3.0/ - -Authors of media files ------------------------ -Everything not listed in here: -Copyright (C) 2010-2012 celeron55, Perttu Ahola - - diff --git a/mods/bucket/depends.txt b/mods/bucket/depends.txt deleted file mode 100644 index 3a7daa1..0000000 --- a/mods/bucket/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default - diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua deleted file mode 100644 index 8afd47c..0000000 --- a/mods/bucket/init.lua +++ /dev/null @@ -1,88 +0,0 @@ --- Minetest 0.4 mod: bucket --- See README.txt for licensing and other information. - -minetest.register_alias("bucket", "bucket:bucket_empty") -minetest.register_alias("bucket_water", "bucket:bucket_water") -minetest.register_alias("bucket_lava", "bucket:bucket_lava") - -bucket = {} -bucket.liquids = {} - --- Register a new liquid --- source = name of the source node --- flowing = name of the flowing node --- itemname = name of the new bucket item (or nil if liquid is not takeable) --- inventory_image = texture of the new bucket item (ignored if itemname == nil) --- This function can be called from any mod (that depends on bucket). -function bucket.register_liquid(source, flowing, itemname, inventory_image) - bucket.liquids[source] = { - source = source, - flowing = flowing, - itemname = itemname, - } - bucket.liquids[flowing] = bucket.liquids[source] - - if itemname ~= nil then - minetest.register_craftitem(itemname, { - inventory_image = inventory_image, - stack_max = 1, - liquids_pointable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type ~= "node" then - return - end - -- Check if pointing to a liquid - n = minetest.env:get_node(pointed_thing.under) - if bucket.liquids[n.name] == nil then - -- Not a liquid - minetest.env:add_node(pointed_thing.above, {name=source}) - elseif n.name ~= source then - -- It's a liquid - minetest.env:add_node(pointed_thing.under, {name=source}) - end - return {name="bucket:bucket_empty"} - end - }) - end -end - -minetest.register_craftitem("bucket:bucket_empty", { - description = "Emtpy bucket", - inventory_image = "bucket.png", - stack_max = 1, - liquids_pointable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type ~= "node" then - return - end - -- Check if pointing to a liquid source - n = minetest.env:get_node(pointed_thing.under) - liquiddef = bucket.liquids[n.name] - if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then - minetest.env:add_node(pointed_thing.under, {name="air"}) - return {name=liquiddef.itemname} - end - end, -}) - -bucket.register_liquid( - "default:water_source", - "default:water_flowing", - "bucket:bucket_water", - "bucket_water.png" -) - -bucket.register_liquid( - "default:lava_source", - "default:lava_flowing", - "bucket:bucket_lava", - "bucket_lava.png" -) - -minetest.register_craft({ - type = "fuel", - recipe = "bucket:bucket_lava", - burntime = 60, -}) diff --git a/mods/bucket/textures/bucket.png b/mods/bucket/textures/bucket.png deleted file mode 100644 index f165fd209e9dc30282c963ee27dcd34eeb84b115..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)Zdra)<*XK-XFws@%#er@=ltB< z)VvZPmw~~#C^fMpHASI3vm`^o-P1Q9MK6^dD89hc#WBR<^x2@3yhjvxwuHYtv`E5h zA=7sU_7DfnDTkPM_B~-WI_NU-+eT~s6r0B%89!t{P^;Vb^g-W=Gnd`HPCj`!_sp3K zQO4fZ&$kH7Vv@c0+jYT|O*c`o^Za=JJUMpDMelNy3 P732v|S3j3^P6QL70(Y)*K0-AbW|YuPgg)Zdray@#n4E9dnI@*Z;FalP;AGr??^ zsSzu$bV2fkSxtf(XJsTCRfAlvZ)(!?Sma&Q=pmBua>?YU|Nrj)`tbVGuwUCmA75)I z(_FsdvT}EE@rJAND)*PGxaKKHHaX8^eqOtJ)yh?0vv>?v$MYKqZWL%*8dh$(Y*}W9 zAyWZ!-}Q!$lk$+n(bncyXCpI3FShQL70(Y)*K0-AbW|YuPgg)ZdrZ{;h&$K*nvW_nIRD+&iT2y zsd*(pE(3#eQEFmIYKlU6W=V#EyQgnJie4&6;R#O{#}JFtXD8Y69Wvl)jn~Q(Y_&{( zajVsMgXVIz}ew22cvdq8QG3!Ig zx5?eVw`#vS60;_Hf7hR?GU2r=5~ueV6>h9iQ&Lm%OXF!MeI2=d9^;0s(|Qf(sNbGy zFt@nFaM@ky>9^&s-AeNG?Mvy2w0ZHnE~Z_;!A1DbvL{l>EmMRT7EC$x@xuzU(nNy* z9@Qr-n!i^aT(sG1rC|MOh2Hy?@7<@x))=2+su!1Ud+XlZe8h1c$g`fVelF{r5}E)& CZi&JG diff --git a/mods/metals/buckets.lua b/mods/metals/buckets.lua new file mode 100644 index 0000000..269dd1b --- /dev/null +++ b/mods/metals/buckets.lua @@ -0,0 +1,76 @@ +bucket = {} +bucket.liquids = {} + +function bucket.register_liquid(source, flowing, itemname, inventory_image) + + bucket.liquids[source] = { + source = source, + flowing = flowing, + itemname = itemname, + } + bucket.liquids[flowing] = bucket.liquids[source] + + if itemname ~= nil then + for i = 1,#METALS_LIST do + minetest.register_craftitem(itemname.."_"..i, { + inventory_image = "metals_"..METALS_LIST[i].."_bucket.png^"..inventory_image, + stack_max = 1, + liquids_pointable = true, + on_use = function(itemstack, user, pointed_thing) + -- Must be pointing to node + if pointed_thing.type ~= "node" then + return + end + -- Check if pointing to a liquid + n = minetest.env:get_node(pointed_thing.under) + if bucket.liquids[n.name] == nil then + -- Not a liquid + --if minetest.env:get_node(pointed_thing.above) == "air" then + minetest.env:add_node(pointed_thing.above, {name=source}) + -- end + elseif n.name ~= source then + -- It's a liquid + minetest.env:add_node(pointed_thing.under, {name=source}) + end + return {name="metals:bucket_empty_"..i} + end + }) + end + end +end + +for i = 1,#METALS_LIST do + minetest.register_craftitem("metals:bucket_empty_"..i, { + description = "Emtpy " .. DESC_LIST[i] .. " Bucket", + inventory_image = "metals_"..METALS_LIST[i].."_bucket.png", + stack_max = 1, + liquids_pointable = true, + on_use = function(itemstack, user, pointed_thing) + -- Must be pointing to node + if pointed_thing.type ~= "node" then + return + end + -- Check if pointing to a liquid source + n = minetest.env:get_node(pointed_thing.under) + liquiddef = bucket.liquids[n.name] + if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then + minetest.env:add_node(pointed_thing.under, {name="air"}) + return {name=liquiddef.itemname.."_"..i} + end + end, + }) +end + +bucket.register_liquid( + "default:water_source", + "default:water_flowing", + "metals:bucket_water", + "metals_water.png" +) + +bucket.register_liquid( + "default:lava_source", + "default:lava_flowing", + "metals:bucket_lava", + "metals_lava.png" +) diff --git a/mods/metals/depends.txt b/mods/metals/depends.txt index c4c0f5f..0c25a43 100644 --- a/mods/metals/depends.txt +++ b/mods/metals/depends.txt @@ -1,2 +1,2 @@ +default minerals -default \ No newline at end of file diff --git a/mods/metals/init.lua b/mods/metals/init.lua index 41fd24f..5e4d8d5 100644 --- a/mods/metals/init.lua +++ b/mods/metals/init.lua @@ -75,6 +75,7 @@ DESC_SMALL_LIST={ dofile(minetest.get_modpath("metals").."/groupcaps.lua") +dofile(minetest.get_modpath("metals").."/buckets.lua") for i=1, #METALS_LIST do @@ -261,14 +262,6 @@ for i=1, #METALS_LIST do }, }) - minetest.register_craft({ - output = 'bucket:bucket_empty', - recipe = { - {"metals:"..METALS_LIST[i].."_ingot", '', "metals:"..METALS_LIST[i].."_ingot"}, - {'', "metals:"..METALS_LIST[i].."_ingot", ''}, - } - }) - minetest.register_craft({ output = 'sawing_table:self', recipe = { @@ -581,4 +574,4 @@ SPEAR_ENTITY.on_step = function(self, dtime) self.lastpos={x=pos.x, y=pos.y, z=pos.z} end -minetest.register_entity("metals:spear_entity", SPEAR_ENTITY) \ No newline at end of file +minetest.register_entity("metals:spear_entity", SPEAR_ENTITY) diff --git a/mods/metals/textures/metals_aluminium_bucket.png b/mods/metals/textures/metals_aluminium_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..b67f8074ab40bacbf6ad04805e1b182dce9f2219 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf<74y<$e6j1?$e^Ys~7EiFQ30|Yuc=3$&J%x-xwTIXj!1qb^Mh+uU%vMgTBO` uogL@j?thaYb3A_f_iyn9h3o#Q|6u$&FWk;1)m{?lTLw>8KbLh*2~7ZPmW}HG literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_bismuth_bronze_bucket.png b/mods/metals/textures/metals_bismuth_bronze_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..accf0c163b1e7b84aa034cb7ce9555848397df29 GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfxJY5_^EKVPt z?3i`PL88?@Sl5J6T+o|2k4se`rjqp_cZJ0J1>qk#cD-3-9lrI&qPr}MGF(~%O+0pa z%}|-VBH%^zS(|_V|Guw3e4u{u5~bC;+CAr{-U>eR`|*39+Q_RbZkx*Wcr6O3H)cGv zB_J}duEvn-?X0)q3{3we-l@lNI!s!T zalnU7@J_G$;VlMpsvdrcX{??gFyVTEd0biRl)o|TxB0(kRha*0m3;ZKzA0X6V~qE9 TmebP0l+XkKx964# literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_bismuth_bucket.png b/mods/metals/textures/metals_bismuth_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..1ecb8d42e400041adde9c029c6b4025a09298aae GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf6N&#^Jk!l*Xj&o0|SFU?&ck=k;e0P z$izK=WyJ~-GN`Hh{O5nOakZqRgoMP533GqFe5$T*xK5@^28;C5nmS4`jZSFp2gAX0&xKA+LEnCIFU>X^D$8U#18ZZbLJYD@< J);T3K0RWu7ib4PY literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_black_bronze_bucket.png b/mods/metals/textures/metals_black_bronze_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..6114527eb9fe583d0e333bed9fd47c200f9c0dae GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfU{eesryvDO*aqJGM$s4y7J;%lus z|AyJ2ZO)05pyq>8H<&Csm|l8m)h{}k6O-}iW!aI3yPT5}jxo!5@UmrXIP`KS%l#II w1M3xcyF}HkYr0zb^V**N|4i~PU)p!7KMjjjt#?{*5$ItCPgg&ebxsLQ0HrgFr2qf` literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_black_steel_bucket.png b/mods/metals/textures/metals_black_steel_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..9e56232699d09a2829ec7dbf888b01f6fd7a8a8c GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfGKp0guc5MXXZX7Xu4A?);Yskx`Icpb#o)wody@`-gOcpk>iz2L zU(XV~7$yHmiFZm+#rwi@soYzynfMmJbrfNgXnT0zdo6#%)^BkNQp=_slGt3V*z(59 zwQ5nJOup}yYe_wdQa_$KwiNRT-u%AzRh{MsaT%6NrbW{&`s*zZ+MJg^`}>#v5{vTx a;(HjDt%_scaajixMhu>=elF{r5}E*lFM$vM literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_brass_bucket.png b/mods/metals/textures/metals_brass_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..daa5b3ff3909e7d4cc8bda1e0fbd34ab5295f3e2 GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfM$35*?rYz7~m{mo?)bPQ#4 zO%2?$?XgLNNJA3CCi8oH_V+H7xck#0w&3F(;ig9Sk~jyp7u$ka85lnCM@zJDMQa0t Ofx*+&&t;ucLK6Ukn2gK- literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_bronze_bucket.png b/mods/metals/textures/metals_bronze_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..2d3988d5a40dc6ddcb1d1351977068d57faff8d7 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf3^vPkZ*2v{O9CH04-goMPu#nMNb)BezjlUNymKLE?>VvYE#~QSrI#7qve{X`yO81 zozJsfe(&*Bg?IN^^F(<$?KsSk#=*?Y?0k2Nv&N%;e5XJLNVIKEC|=gEgUdNsjQQ|f z_xuM*^85cBd8MlML}S*DHzxNS_WXTedw6U0dx-?b4na194-cQpvN0BlvWZ#>?%DR( zq(P)1iD8qu-JU(o3nlLUw1_SEb}P84(Y++jf$hb%U{(eORgUOrfmwf*fFZ!(>FVdQ I&MBb@07o#3O8@`> literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_copper_bucket.png b/mods/metals/textures/metals_copper_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..bfa136b994fe634b1dc3d4e59aad12e6d3d64008 GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfvU4M3q^o-U3d7N?UF zBr*R`$jwUj z>T%E2UU`9p3~YXXdi?*{?tBSJ2?>cA6XsU^e_X!fQNMkCvgwkqKVn7fgpJaZLJbf9 z?Y}SSXZOD&H2L+%-8|cjnsyv!NaJ8;W_GTN*6*s=xl;+qWy|10b+I`<%hX zRWlwQZdESWn4ce?_*F=_NTk$nR+qUzzwO@x1wT$!vqdl@wJ_Q+=+94iaNRUrz+l6{ zY->Me4@M0(h3dzTpH7zOx;VH0GVA$o>y#xbT%NP0G~`)_GBEt#5!Eo8E6Erb3JjjE KelF{r5}E)fDUFE$ literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_gold_bucket.png b/mods/metals/textures/metals_gold_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..f0a0cea752c040c373973112f0b000f085cc6c05 GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfHOH{WybhH8OZ$6lUU ze0SSs;|>=Fw!>Qw^}CBQlvPjEXGplocbfIi`{Ofq-`%%GTk?}|t)JOW#dqJD-d66r<^5CPMzi0CKseixz;ol$e6qV)sS?o1VMHX^7 S{pSIO0fVQjpUXO@geCwjw3?p) literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_lava.png b/mods/metals/textures/metals_lava.png new file mode 100644 index 0000000000000000000000000000000000000000..51a35631b26c09545fd2faff72a45d691a4e3beb GIT binary patch literal 458 zcmV;*0X6=KP) zWnF)XL?r;vcs;Iid~-?qZa+X72@GhK^-bBOC(asl}oqu-J=j zmA?s?K{Bbrb&cpH8iqvP-CrlmQh|Hv@4S5S`@thN02=!W*({JQGi&p@pUgKI6uLG6 z_3%4j&O=p8e!$+d20Dp~K%-HI>l*(2k%wfOl0_~jZO8F?-6y!j^Vu|y1qhB|nuCdj zu1&-ABN-Hnp07KOHw+5M-$T4d6fW15{y&a!8W+n*aa+07*qoM6N<$g18#D Aw*UYD literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_lead_bucket.png b/mods/metals/textures/metals_lead_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..f4565563f7df6d8dd27cb99b2c468288c234e387 GIT binary patch literal 369 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfeWPOV620D*D~tt3lO}lilqhXF zc)_jf%Ir7GtG~aSoBAWa$LHvAgEg}^zutBI*YUjT4{tAX^XHH`ez9Yo07Gf?iLlx7 z$0j@O_77xnh@AE{d{PgC&ec~xLt;*bhDy3_D_nC|_v@yZwU+a_`hujSw-@>t%>J5w zp@U)1KAY^XKa&_6&TL9#Y;gFY6Q14sr&hC9JMxuq?!EhL&Ql`Y<}EW}EHlcOaGJUC zgW%Gdb<@*~z&og+s L`njxgN@xNAQL70(Y)*K0-AbW|YuPgfgT`z8&;2&9gpSG@qed;|+!0S< ziFvk_hYOxwvRxx3em4GmLc)?ZYo3HQkO@zoi!SIme&nYih!eB3h2IZ&H;<2RkJx*pMaFgQ+TIH0kEf$5{q5Eu*$ Mp00i_>zopr02Zo|6#xJL literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_pig_iron_bucket.png b/mods/metals/textures/metals_pig_iron_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..e557d14591c3ad1b69c707251f62c4f241a057c5 GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf-yLks|Lb&BMjjwYD%!+j zsVK<9Ki|H&yY}Bd-qq7*Ojw+8vTtn#^T&(b;ymBy*(NryD!54;II!BiU-HP46v-#5 zOF!J|yUY;8(8YM-Ud7iJhHXhD&mWf@oLXJZ!6tXHl2LNOZ9h>4hUYJ%9~%g*76JwX NgQu&X%Q~loCIIG&im(6x literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_platinum_bucket.png b/mods/metals/textures/metals_platinum_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..5061971e914cbbdd68449e01a39f6fa1f655eb02 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfqqMaX9I;kc)B=-Se!l@ zY|VAZL7=u%sy;!enE9(nqJMJYYtx*qf;u+78v;KtdG6BSC=_-)Dj$`5$M@O_g&(Wt z9zQd?(pcw1zJ}4J+pq86+#R!0?N5bCKoM)i!n_$8BHm7m7McsNIJ$W}>|VXqioxNs z$x4Ri_d93!wQ(`5__N~pVLQ)VvHC&h_dVy@c#6H{hK1a>4rMLfFSg=omxX>LSxpp> zW_Vy>+?c=Bnt{P9b05QJ?~Y!B8nyZ7ioCVz7yV3{SzYX<`NGUcY{pGSXOZ^_FL)!S z&Ak10=>ed%71DuwPDgq4{x52}TJ^cCQvN@y+{<_N2bo=%BEPNi(3$}BJAQL70(Y)*K0-AbW|YuPgfA2^&Zr*aZQup`o{J-% literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_silver_bucket.png b/mods/metals/textures/metals_silver_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..748c86d65ae8381861112b3d9d5a318241f9493a GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfO$csmw2=lYgUa9pU+_j-kD?&VkQ z{QvtVov!|Vx7_)`e#1=@PhVZN=G?m1*ZzDgcyXmax7Sg?V5XmR>%RBQQ*sw>y!oc` z-h#Vd)0iFRJ%9SONRrWFS?Jo**gsWvYn6UmXoH(9s zzWLxwT;u%(iV5o$PI)D={q1)vi@E3J5C8t9KO@8czwjPLA;HKcf-Eb0fL>?tboFyt I=akR{0O5$1*8l(j literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_steel_bucket.png b/mods/metals/textures/metals_steel_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..a2db363d1291ce357febd7680d0ec504bd6381f4 GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfkIxlg6iUE_c=N|STDHyNZ`MfO@%V| kXMO(||DkZsKVch&ZxvC8RQ2Ai2l|r1)78&qol`;+01gU({Qv*} literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_sterling_silver_bucket.png b/mods/metals/textures/metals_sterling_silver_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..00350c1fa8088729ba5c77b4fcc8da47286f1ee7 GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf%p47_)R3(bK=5y|^pU1Dkx?!J z>xREzHadp+PG1Pp zcsTpHU|iLIvDMROOjw*zRjqr^VNd;Eqr*36f0s;P>=0x#`0(ReDqEy!EL)|n^PX*w zO&UZRk{C9b%iZ7AvryvhPm9=sr!VB18r@6c9N1oL3ua|txM?0S^Q*)DXkaKXc)I$z JtaD0e0swj7jqv~g literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_tin_bucket.png b/mods/metals/textures/metals_tin_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..8bb5f59d71be0a0a3fb0211cd9ea4ce7020a12e4 GIT binary patch literal 359 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf4}ieI zV{KO%BrJ*_THO&)OL5hYuW#C1|Nmd_)$<172N=2-?ef0y00omOeth8#>rK~-Ne`GJ z>MWS<82;jM+If%(8&a=3iWDl_ma+js+xPePADcHcHa0p21WY)1{Or7kciZ_3Hp<)A zC43bUE)rRIyNmDM{`&I;|37L^iAXrKGytg1kwfa!j-2C}44Ms`wo4E0X_SlL;o*@u ocl>2jx_+DhkIky5tX+%@3irbJuCOhe3iL9Ar>mdKI;Vst0K1Zi4gdfE literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_water.png b/mods/metals/textures/metals_water.png new file mode 100644 index 0000000000000000000000000000000000000000..13da3cd83277e4a8794c326db4876c18f29af2c8 GIT binary patch literal 436 zcmV;l0ZaagP)|tq zAPm8WnIIt~goR|mtl}Zsm3C=C^s1Ztao)N2ohw>vikLw`GqZw@NbHvq@n!~FGpo@! zZfT_~07g;Hw&!srEJy;$WCxB2-}`k9FjAWs#!TuZWhs^y1^~RBZ;Kc8#Q?4dAHeIu zgPt`*Vo4BXDFEi`ivlnKNR8k*6`a##8JMYSK{Igpw=i$H%|vmt#Q4}IC1@aBGb5C0{V&h^M$m#2c0(T zYysephtwKnDWt@+>Px2PW%?Fe5t`8=0l2xv9}fYzAV|^AW#D^Pzkbx5XOeY|$y-Q$ eaYn5aJ?9@%s%<4H+ba+N0000QL70(Y)*K0-AbW|YuPgfdKJg#XTkUPS5L?D`DN5SKJ+k+mx-z_e;CsOsW zW$`l~jz8vc;VIKnPgn6ZB|Lt;%kJv_^-_;5j(z_dn<(PSa60hCTeJ4W9~tK7iy4j; z#@yOg%UH24H2ZCs&H2wuJA$&xzu)PeB9yIr*dWGCYpKWOFLuqLEDLl_%f^eaGDN*j zXJk-h3G({2@BWU=S$g50?x?R?^~%s?t!eD_jcgUC5?T$}6j?kc+4$`j{lR9hA{nmEJhB?-T?S8AKbLh*2~7YzsEgVF literal 0 HcmV?d00001 diff --git a/mods/metals/textures/metals_zinc_bucket.png b/mods/metals/textures/metals_zinc_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8be28d24d3b8a3c58e6ff0f10a9526a00cf7eb GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf-84iQ!sdtdL*^L*kJS3R&{|l#U1Pcm#Y}-IbT?9?kZ8A z+jFR4>#MpetHamNY719R*RK2aJF!G>n)ml#B{rTPK5sj=>&JqC3geEiQM?L0+)uwg zJ5_CZIdA=C)(1sa?VoSzus?Va*8ltP+?w67Yn6h$9>04red6=NJMuSHuH72w<+=H; z-+2WgMhTvFx4WgW4A=I}*JV&>NqADpX34?y+N8JA_+WrwQIkNmecO7Hj=ZNew)6U;O-!pi+ L`njxgN@xNAW2TvH literal 0 HcmV?d00001 From 306d8218b6aa5ce492bbd01bce26518bdc2726fa Mon Sep 17 00:00:00 2001 From: Kotolegokot Date: Mon, 15 Oct 2012 17:29:44 +0600 Subject: [PATCH 2/2] Forging buckets Now you can forge a bucket on anvil --- mods/anvil/init.lua | 13 +++++------ mods/metals/buckets.lua | 8 +++---- mods/metals/init.lua | 44 +++++++++++++----------------------- mods/scribing_table/init.lua | 7 ++++++ 4 files changed, 33 insertions(+), 39 deletions(-) diff --git a/mods/anvil/init.lua b/mods/anvil/init.lua index db18afb..6695795 100644 --- a/mods/anvil/init.lua +++ b/mods/anvil/init.lua @@ -144,49 +144,48 @@ minetest.register_node("anvil:self", { inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return elseif recipestack:get_name()=="metals:recipe_hammer" then inv:add_item("res","metals:tool_hammer_"..string.sub(s,8,string.len(s)-6).."_head") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return elseif recipestack:get_name()=="metals:recipe_pick" then inv:add_item("res","metals:tool_pick_"..string.sub(s,8,string.len(s)-6).."_head") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return elseif recipestack:get_name()=="metals:recipe_shovel" then inv:add_item("res","metals:tool_shovel_"..string.sub(s,8,string.len(s)-6).."_head") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return elseif recipestack:get_name()=="metals:recipe_spear" then inv:add_item("res","metals:tool_spear_"..string.sub(s,8,string.len(s)-6).."_head") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return elseif recipestack:get_name()=="metals:recipe_sword" then inv:add_item("res","metals:tool_sword_"..string.sub(s,8,string.len(s)-6).."_head") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return + elseif recipestack:get_name()=="metals:recipe_bucket" then + inv:add_item("res","metals:bucket_empty_"..string.sub(s,8,string.len(s)-6)) + ingotstack:take_item() + inv:set_stack("ingot",1,ingotstack) + hammerstack:add_wear(65535/30) + inv:set_stack("hammer",1,hammerstack) elseif ingotstack:get_name()=="metals:pig_iron_ingot" then inv:add_item("res","metals:wrought_iron_ingot") ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) hammerstack:add_wear(65535/30) inv:set_stack("hammer",1,hammerstack) - return --[[elseif string.sub(ingotstack:get_name(), 1, 6)=="metals" and string.sub(ingotstack:get_name(),string.len(ingotstack:get_name())-9,9)=="_unshaped" then inv:add_item("res", "metals:"..string.sub(ingotstack:get_name(),7,string.len(ingotstack:get_name())-13).."_ingot") ingotstack:take_item() diff --git a/mods/metals/buckets.lua b/mods/metals/buckets.lua index 269dd1b..543f785 100644 --- a/mods/metals/buckets.lua +++ b/mods/metals/buckets.lua @@ -12,7 +12,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image) if itemname ~= nil then for i = 1,#METALS_LIST do - minetest.register_craftitem(itemname.."_"..i, { + minetest.register_craftitem(itemname.."_"..METALS_LIST[i], { inventory_image = "metals_"..METALS_LIST[i].."_bucket.png^"..inventory_image, stack_max = 1, liquids_pointable = true, @@ -32,7 +32,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image) -- It's a liquid minetest.env:add_node(pointed_thing.under, {name=source}) end - return {name="metals:bucket_empty_"..i} + return {name="metals:bucket_empty_"..METALS_LIST[i]} end }) end @@ -40,7 +40,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image) end for i = 1,#METALS_LIST do - minetest.register_craftitem("metals:bucket_empty_"..i, { + minetest.register_craftitem("metals:bucket_empty_"..METALS_LIST[i], { description = "Emtpy " .. DESC_LIST[i] .. " Bucket", inventory_image = "metals_"..METALS_LIST[i].."_bucket.png", stack_max = 1, @@ -55,7 +55,7 @@ for i = 1,#METALS_LIST do liquiddef = bucket.liquids[n.name] if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then minetest.env:add_node(pointed_thing.under, {name="air"}) - return {name=liquiddef.itemname.."_"..i} + return {name=liquiddef.itemname.."_"..METALS_LIST[i]} end end, }) diff --git a/mods/metals/init.lua b/mods/metals/init.lua index 5e4d8d5..d565d2d 100644 --- a/mods/metals/init.lua +++ b/mods/metals/init.lua @@ -445,35 +445,23 @@ end -- Recipes -- -minetest.register_craftitem("metals:recipe_pick", { - description = "Pick recipe", - inventory_image = "metals_recipe.png", -}) +local recipes = { + {"metals:recipe_pick", "Pick recipe"}, + {"metals:recipe_axe", "Axe recipe"}, + {"metals:recipe_shovel", "Shovel recipe"}, + {"metals:recipe_sword", "Sword recipe"}, + {"metals:recipe_hammer", "Hammer recipe"}, + {"metals:recipe_spear", "Spear recipe"}, + {"metals:recipe_bucket","Bucket recipe"}, +} -minetest.register_craftitem("metals:recipe_axe", { - description = "Axe recipe", - inventory_image = "metals_recipe.png", -}) - -minetest.register_craftitem("metals:recipe_shovel", { - description = "Shovel recipe", - inventory_image = "metals_recipe.png", -}) - -minetest.register_craftitem("metals:recipe_sword", { - description = "Sword recipe", - inventory_image = "metals_recipe.png", -}) - -minetest.register_craftitem("metals:recipe_hammer", { - description = "Hammer recipe", - inventory_image = "metals_recipe.png", -}) - -minetest.register_craftitem("metals:recipe_spear", { - description = "Spear recipe", - inventory_image = "metals_recipe.png", -}) +for _, recipe in ipairs(recipes) do + minetest.register_craftitem(recipe[1], { + description = recipe[2], + inventory_image = "metals_recipe.png", + stack_max = 1, + }) +end -- -- Alloys diff --git a/mods/scribing_table/init.lua b/mods/scribing_table/init.lua index 7aefa8d..07fbf96 100644 --- a/mods/scribing_table/init.lua +++ b/mods/scribing_table/init.lua @@ -52,6 +52,13 @@ local recipes = { 0,1,1,0,0, 1,0,0,0,0,} }, + {"metals:recipe_bucket", + {1,0,0,0,1, + 1,0,0,0,1, + 1,0,0,0,1, + 1,0,0,0,1, + 0,1,1,1,0,} + }, } local function check_recipe(pos)