From 28884cc784626544871bd28032130899393c74e9 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 11 Mar 2016 18:27:22 +0100 Subject: [PATCH 01/11] Add flint and flint-and-steel --- mods/default/README.txt | 1 + mods/default/craftitems.lua | 6 +++++ mods/default/nodes.lua | 8 +++++- mods/default/textures/default_flint.png | Bin 0 -> 3038 bytes mods/fire/README.txt | 4 +++ mods/fire/init.lua | 31 ++++++++++++++++++++++-- mods/fire/textures/fire_flint_steel.png | Bin 0 -> 3108 bytes 7 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 mods/default/textures/default_flint.png create mode 100644 mods/fire/textures/fire_flint_steel.png diff --git a/mods/default/README.txt b/mods/default/README.txt index 048b4c0a..975f58a1 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -178,6 +178,7 @@ Gambit (WTFPL): default_diamond_block.png default_ladder_steel.png default_sign_wall_wood.png + default_flint.png asl97 (WTFPL): default_ice.png diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index 09ebeccf..31d85c9b 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -190,3 +190,9 @@ minetest.register_craftitem("default:obsidian_shard", { description = "Obsidian Shard", inventory_image = "default_obsidian_shard.png", }) + +minetest.register_craftitem("default:flint", { + description = "Flint", + inventory_image = "default_flint.png" +}) + diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index a7fd43fa..47d344fd 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -353,9 +353,15 @@ minetest.register_node("default:gravel", { footstep = {name = "default_gravel_footstep", gain = 0.5}, dug = {name = "default_gravel_footstep", gain = 1.0}, }), + drop = { + max_items = 1, + items = { + {items = {'default:flint'}, rarity = 16}, + {items = {'default:gravel'}} + } + } }) - minetest.register_node("default:clay", { description = "Clay", tiles = {"default_clay.png"}, diff --git a/mods/default/textures/default_flint.png b/mods/default/textures/default_flint.png new file mode 100644 index 0000000000000000000000000000000000000000..3211db1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g2q20x6F`6g08sN`g*vuQ7ytkO07*qoM6N<$f;?ZsBLDyZ literal 0 HcmV?d00001 diff --git a/mods/fire/README.txt b/mods/fire/README.txt index bf143e5c..14022f03 100644 --- a/mods/fire/README.txt +++ b/mods/fire/README.txt @@ -30,3 +30,7 @@ fire_large.ogg sampled from: fire_basic_flame_animated.png: Muadtralk + +fire_flint_steel.png + Gambit (WTFPL) + diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 28f68e98..ce53ed1e 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -8,7 +8,6 @@ fire = {} -- Register flame nodes minetest.register_node("fire:basic_flame", { - description = "Basic Flame", drawtype = "firelike", tiles = { { @@ -28,7 +27,7 @@ minetest.register_node("fire:basic_flame", { buildable_to = true, sunlight_propagates = true, damage_per_second = 4, - groups = {igniter = 2, dig_immediate = 3}, + groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1}, drop = "", on_construct = function(pos) @@ -71,6 +70,34 @@ minetest.register_node("fire:permanent_flame", { end, }) +minetest.register_tool("fire:flint_and_steel", { + description = "Flint and Steel", + inventory_image = "fire_flint_steel.png", + on_use = function(itemstack, user, pointed_thing) + local player_name = user:get_player_name() + local pt = pointed_thing + + if pt.type == "node" and minetest.get_node(pt.above).name == "air" then + if not minetest.is_protected(pt.above, player_name) then + minetest.set_node(pt.above, {name="fire:basic_flame"}) + else + minetest.chat_send_player(player_name, "This area is protected") + end + end + + if not minetest.setting_getbool("creative_mode") then + itemstack:add_wear(1000) + return itemstack + end + end +}) + +minetest.register_craft({ + output = "fire:flint_and_steel", + recipe = { + {"default:flint", "default:steel_ingot"} + } +}) -- Get sound area of position diff --git a/mods/fire/textures/fire_flint_steel.png b/mods/fire/textures/fire_flint_steel.png new file mode 100644 index 0000000000000000000000000000000000000000..624f5565dd3029b7f3fc0ce0de374bb8977e301d GIT binary patch literal 3108 zcmV+<4BPXGP)uJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg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u3%4b9605ii3Ep)@`TAmhs0fpQ%O!ql}XcFH*PieWwLj2ZSq`7 zV9Mc?h17`D)-+sNT-qs~3@?S(ldh7UlRlVXkWrK|vf6I-?$tAVKYn8-l({mqQ$Q8{ zO!WzMg`0(=S&msXS#Pt$vrpzo=kRj+a`kh!z=6$;cwT88(J6|n-WB%w`m$h~4 zpmp)YIh_3ETV2tjiAU!0h1dxU-n=E9e!)6|Z;4?!H=SSy{V>ut&IOq{_dlbFb#!9eY1iCsp6Bajj|H zr?hX|zPbJE{X++w546-O*Ot`2Kgd0Jx6Z4syTu9enWavU5N9)I?I-1m1* z_?_rJ$vD~agVqoG+9++s?NEDe`%Fht$4F;X=in*dQ{7$mU2Q)a|9JSc+Uc4zvS-T9 z63!N$T{xF_ZuWe}`RNOZ7sk3{yB}PPym+f8xTpV;-=!;;JuhGEb?H5K#o@~7t9DmU zU1MD9xNd#Dz0azz?I)|B+WM{g+Xrk0I&awC=o(x)cy`EX=)z6+o0o6-+`4{y+3mqQ z%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@>;2q1Vm)$Z)P1z?N$8UY zW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHsy69KwU-!MxeeuI@&cF4| zM9z%ARI+y?e7jKeZ#YO-C0clA@K~#90V*LOAKLaHIAb^-C(hURv z0mK4hSeob|1UdQt|M~ur5yU=z<`P~500IcZ1t87xQX*iQ7#9Ep5Q+gHO}ZM2VD^n0 zH;B>C01!Yd=mLCv{0t8tJOs13_(d6zg7u;r$UqOC`ss}3ug#*w~uoyr9!NUOPXU0<(uKkBO9cD9 Date: Sat, 12 Mar 2016 17:50:09 -0800 Subject: [PATCH 02/11] Fire: Optimize spreading ABM. No need to find_node_near twice with the same params. --- mods/fire/init.lua | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mods/fire/init.lua b/mods/fire/init.lua index ce53ed1e..1fc942b8 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -254,22 +254,20 @@ else catch_up = false, action = function(p0, node, _, _) -- If there are no flammable nodes around flame, remove flame - if not minetest.find_node_near(p0, 1, {"group:flammable"}) then + local p = minetest.find_node_near(p0, 1, {"group:flammable"}) + if not p then minetest.remove_node(p0) return end if math.random(1, 4) == 1 then -- remove flammable nodes around flame - local p = minetest.find_node_near(p0, 1, {"group:flammable"}) - if p then - local node = minetest.get_node(p) - local def = minetest.registered_nodes[node.name] - if def.on_burn then - def.on_burn(p) - else - minetest.remove_node(p) - nodeupdate(p) - end + local node = minetest.get_node(p) + local def = minetest.registered_nodes[node.name] + if def.on_burn then + def.on_burn(p) + else + minetest.remove_node(p) + nodeupdate(p) end end end, From 7c966db4bc90f2e38431084873dc8bafd64d7e90 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sun, 13 Mar 2016 13:42:24 -0700 Subject: [PATCH 03/11] Fencegate: prevent y-fighting at top. We raise the height of the fencegate node by 0.0001 to make the fencegate post stop fighting with node blocks. This makes the gate pole appear to be cut through the node, and doesn't leave a gap when stacking fencegates, which would look odd. --- mods/doors/models/doors_fencegate_closed.obj | 16 ++++++++-------- mods/doors/models/doors_fencegate_open.obj | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mods/doors/models/doors_fencegate_closed.obj b/mods/doors/models/doors_fencegate_closed.obj index 60eb4d74..0050f70e 100644 --- a/mods/doors/models/doors_fencegate_closed.obj +++ b/mods/doors/models/doors_fencegate_closed.obj @@ -3,21 +3,21 @@ mtllib gate_closed.mtl o Cube_Cube.001 v -0.625000 -0.500000 0.125000 -v -0.625000 0.500000 0.125000 +v -0.625000 0.500100 0.125000 v -0.625000 -0.500000 -0.125000 -v -0.625000 0.500000 -0.125000 +v -0.625000 0.500100 -0.125000 v -0.375000 -0.500000 0.125000 -v -0.375000 0.500000 0.125000 +v -0.375000 0.500100 0.125000 v -0.375000 -0.500000 -0.125000 -v -0.375000 0.500000 -0.125000 +v -0.375000 0.500100 -0.125000 v 0.375000 -0.500000 0.125000 -v 0.375000 0.500000 0.125000 +v 0.375000 0.500100 0.125000 v 0.375000 -0.500000 -0.125000 -v 0.375000 0.500000 -0.125000 +v 0.375000 0.500100 -0.125000 v 0.625000 -0.500000 0.125000 -v 0.625000 0.500000 0.125000 +v 0.625000 0.500100 0.125000 v 0.625000 -0.500000 -0.125000 -v 0.625000 0.500000 -0.125000 +v 0.625000 0.500100 -0.125000 v -0.375000 0.187500 0.062500 v -0.375000 0.312500 0.062500 v -0.375000 0.187500 -0.062500 diff --git a/mods/doors/models/doors_fencegate_open.obj b/mods/doors/models/doors_fencegate_open.obj index 6c6a9cf4..3fb727f4 100644 --- a/mods/doors/models/doors_fencegate_open.obj +++ b/mods/doors/models/doors_fencegate_open.obj @@ -3,21 +3,21 @@ mtllib gate_open.mtl o Cube_Cube.001 v -0.625000 -0.500000 0.125000 -v -0.625000 0.500000 0.125000 +v -0.625000 0.500100 0.125000 v -0.625000 -0.500000 -0.125000 -v -0.625000 0.500000 -0.125000 +v -0.625000 0.500100 -0.125000 v -0.375000 -0.500000 0.125000 -v -0.375000 0.500000 0.125000 +v -0.375000 0.500100 0.125000 v -0.375000 -0.500000 -0.125000 -v -0.375000 0.500000 -0.125000 +v -0.375000 0.500100 -0.125000 v 0.375000 -0.500000 0.125000 -v 0.375000 0.500000 0.125000 +v 0.375000 0.500100 0.125000 v 0.375000 -0.500000 -0.125000 -v 0.375000 0.500000 -0.125000 +v 0.375000 0.500100 -0.125000 v 0.625000 -0.500000 0.125000 -v 0.625000 0.500000 0.125000 +v 0.625000 0.500100 0.125000 v 0.625000 -0.500000 -0.125000 -v 0.625000 0.500000 -0.125000 +v 0.625000 0.500100 -0.125000 v 0.434859 0.187500 -0.872359 v 0.434859 0.312500 -0.872359 v 0.559859 0.187500 -0.872359 From c17c317669673e76097d86f134ae744a665615a4 Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 14 Mar 2016 13:12:39 +0000 Subject: [PATCH 04/11] Doors: Update glass door item textures to new design --- mods/doors/textures/doors_item_glass.png | Bin 128 -> 186 bytes .../textures/doors_item_obsidian_glass.png | Bin 130 -> 186 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/doors/textures/doors_item_glass.png b/mods/doors/textures/doors_item_glass.png index 49ec245c1672b6c51664c1f4d7327e501d71fa59..791a58ab1c11dbf866fda5e5f94d6a4d81771e30 100644 GIT binary patch delta 158 zcmZo*+{HLSrJg6iC&V>XH(gCl?ZAP@4)^mS!_z|6-ZC$cMV9Xn7+-P6S}gyVX0Ld4dt z#>Rz>oE|349c|7Ehd4aGEa>u0JhYrohf&;wi{alyo>`lm59)z<8Gcinh%)H5`!8j18fx*+&&t;ucLK6W0 CjUYY% diff --git a/mods/doors/textures/doors_item_obsidian_glass.png b/mods/doors/textures/doors_item_obsidian_glass.png index c32772040e2460ebbae26db1fcd15c49b08a1d9a..1026d43722be449b6b9068ccfd11896448b7cbef 100644 GIT binary patch delta 158 zcmZo-+{HLSrJg6iC&V>XH(fwLKwiyo-@bi{?y6o43=E7VL4Lsu4$p3+fjCLt?k)@+ ztg;?J4rhT!WHAE+w=f7ZGR&GI0Tg5}@$_|Nf56Pgqhhf5$dvU!A$3m|#}JO|$q6TX zQWFvi5?Ta#eH5AmUC%J8gfUOgaG2__!n;>I1*o@=Em~}c#T}p?22WQ%mvv4FO#p8K BDaQZ+ delta 101 zcmdnR*u*$NC5|(|C&cyt|NjC40`h8xCs=qo7#J8BOM?7@862M7NCR@zJzX3_IHHpi zPWY52Borhx2=Y2`xM(EtDQvuwYQULtlP#rmWgs8J&AZ$;zpH9Q0ktrAy85}Sb4q9e E08^kKIRF3v From f18871d60c84cdbb68990521911c001b14c56c7d Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 14 Mar 2016 13:26:38 +0000 Subject: [PATCH 05/11] Default: Colourise desert cobble to be consistent with desert stone Hue and saturation match desert stone and desert stone brick Preserve original mortar colour --- mods/default/textures/default_desert_cobble.png | Bin 235 -> 280 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/default/textures/default_desert_cobble.png b/mods/default/textures/default_desert_cobble.png index f914c98781b4ae7c78416f24e68708e91a2b5738..184a9d8853734f5f58aae6c743d2eed05bb3f7b9 100644 GIT binary patch delta 247 zcmVJBCs}kyu2wd1JYNYQBngilrzLQfx93 z*<2wSAEwD~c#x4&cMDMHu{iU9&5NkyAmF`eMZ_UpPGwK*pgu@@Br_`UargTS*OGpk xvBKJc$XJbE9%GOgu*yAo)g2>LS9P>G{{a#+DxMyl_aOiP002ovPDHLkV1k!-VNw79 delta 202 zcmV;*05$)Z0_y>gDSx(kW0P7%xqxbcPds-?H(@(2zKV8^NJyDaPpVs6C{dX}0001p zNklWON39pI5N%h5tdq4HdK95`YzRRg!0bbV6+F918;0Sa{qAVa~>e3pzUfxWmPb5n~B zLI)9ABqf_;Ogqe#V~*0`Iclx2pYff3TSZXa%|7Hve_?bNz39)|%K!iX07*qoM6N<$ Ef;)XxZ2$lO From cb57f70aab363f03d464d0913f19852e6670d663 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sat, 5 Mar 2016 23:08:02 -0800 Subject: [PATCH 06/11] Add steel door/trapdoor sounds. I've found a favorable steel door sound from a parking garage door that isn't abrupt or scary, just sounds like a nice solid metal door. The sample had both opening and closing sounds, and so they match nicely. Amplified and mixed several samples together to reduce ambient noise, and get the right level compared to wood doors. Attribution was added as well. CC-BY-3.0 sounds. --- mods/doors/README.txt | 5 ++++- mods/doors/init.lua | 4 ++++ mods/doors/sounds/doors_steel_door_close.ogg | Bin 0 -> 8574 bytes mods/doors/sounds/doors_steel_door_open.ogg | Bin 0 -> 5510 bytes 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 mods/doors/sounds/doors_steel_door_close.ogg create mode 100644 mods/doors/sounds/doors_steel_door_open.ogg diff --git a/mods/doors/README.txt b/mods/doors/README.txt index deff667c..b1c1363e 100644 --- a/mods/doors/README.txt +++ b/mods/doors/README.txt @@ -75,4 +75,7 @@ fencegate_open.ogg: fencegate_close.ogg: http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - CC-BY-3.0 http://www.freesound.org/people/rivernile7/sounds/249573/ - CC-BY-3.0 - +Steel door sounds (open & close (CC-BY-3.0) by HazMatt + - http://www.freesound.org/people/HazMattt/sounds/187283/ + doors_steel_door_open.ogg + doors_steel_door_close.ogg diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 9300e6ff..431eab3b 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -438,6 +438,8 @@ doors.register("door_steel", { inventory_image = "doors_item_steel.png", protected = true, groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 }, + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", recipe = { {"default:steel_ingot", "default:steel_ingot"}, {"default:steel_ingot", "default:steel_ingot"}, @@ -628,6 +630,8 @@ doors.register_trapdoor("doors:trapdoor_steel", { tile_front = "doors_trapdoor_steel.png", tile_side = "doors_trapdoor_steel_side.png", protected = true, + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", groups = {snappy=1, bendy=2, cracky=1, melty=2, level=2, door=1}, }) diff --git a/mods/doors/sounds/doors_steel_door_close.ogg b/mods/doors/sounds/doors_steel_door_close.ogg new file mode 100644 index 0000000000000000000000000000000000000000..aea7be670b0763259c269521e035966fa1a8d4e6 GIT binary patch literal 8574 zcmaiZcU)7?()Xc=fQa-TLQp^uLJvg5lO+W?d zhTf~7Q~_zy;W@#3?{nWj-p{k2&7Rqvo$t=hmYH*6;OuM+5Ci{82ld7e3FP;H!XTn+ zME;)McCJ2z1|roG!UF*A(h{9NYlsX8lK)8rNdiaXIO8(4?Ad=MT9Uso0wCAi^{$JM zfwwcehpV0GIXJr(yQm0ELIfrv!OlDPD*QhgN`NN1@K=^oS;dqHPy_%jA7(!FJRhcT z8Wv^4tMd?Ly!)@K%DS|VA)>mLUEDrTIdb19M_KYd>V1j?2m()(0vN($l*l>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1AqSEtL3oqwni*L3m3KrnnW*%>u1Jf~xAjp85WELP*%LJC&;qFy{E H?j`ykI$Eli literal 0 HcmV?d00001 diff --git a/mods/doors/sounds/doors_steel_door_open.ogg b/mods/doors/sounds/doors_steel_door_open.ogg new file mode 100644 index 0000000000000000000000000000000000000000..de87477018cc1186834fa91ef930e45e5018f54c GIT binary patch literal 5510 zcmai1dpy(M|9?-?T&iI-nwo4eQ6|)c4=Z7r%b07U$gQ=CnUX}zCAW}EX-R6u+;W>+ zx(K;Mtq?=rcI zxw{wV~Y0$xh7C0)<>Z&C~jA*s=L`o83vmz~YmlRn(CTHbW*Fc+? zCr65zv>;dqO+XFA@YQfuyGfoROC1m0%0lTJlLL|gASYKXE>}$grdTEcv;Y9i*cSfG zAK99MY%N7fLf1R51&skf!FlF!cg&MU%u~_MsTg4$yTsLKFB4X6p}08!*w{*$`oq@= z<&FUWG-q!d$0?5E8#f-C1Z71RiU8pNAPO#{v)|6ZEbYJxdrCi#{^mcbYlfGCP#m-& z?4_S~zF4f*8U-=oIe=<}OUG$7hW}&aa0GEfu6PlCi2X6gc|#Vl6tBcKuMAGT9#?}O zXEXS%V{9BBq;lELQd!`HcJ*>Z-v-0Ar|f6r61SPva4* z9E}KQ!`{n@Agbr*aE-A2JBk{~c68l7C)zB2JS(!o!G%^- zNhV@BX=DkZ{ZOFo31SMzl5GXZ9;MV%yj63e1V;k^)(glkX{GR?Y1+eFunRSn9fz9uCJn~-$Mt%y2L!{l;P$4f9mSi!3&N8oqcs9*k%Ny13!UI zgZ;Bj@IZmna5JI5S(KpUnkRQtkAp6bHIv z2Hlm%e3R+*=6mSSe^lx^;TB~8KtELlo4O5~`f+a(+QQhkMIA5}6WqwS4{Avt_okvP zQZat1KEWAz*Rm$BWvg?AQvjG?ilD^ZJsX#QHZJdM(nM^k@3oA){Hz^qcV}vgr~g}( z6goH>00Plw0cbNa+LR0uLhFW039O5JibI0ootRZMn$H3J`#E>hi2}CZy~4HN8j%5f+bOguAFr;&X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q9YriIZ!^9SK+bEI&_2>3e7TqNN#=1%<9i7%>LTh z_Kvh^rSHbp(Ds!Ym7QPwjHU;XH9zWK&JPB;AU)n>6df@_8A=(RZ#T_K;hJ@KJ&Sdo zR;teRR}Ma4f1EE#>B!>_F1KTvTUJzqlcyGzE@yO>`V9q6019IMNZiXS;5Y3JRqD`RP^ zEZ#)2MnpU&|62OIEl?$ZDW~-4dcWmyI|W^OGsM7J9C5m8luLxP9^jm!me4Ps8K-@I zmB;&hP=;AOgOM|^F3q@9ICX^yoYW}#DwiLY|UJkB`HP@Pu%QF zfzEw*f9SGEc~%$p*=T3-x)xR$rQR2(Y&kdympxTh$omWZN_R{BbLQ2>%9uyj#>T$j zwyGY6$yJ#@H`~#dFym#YZgtJ^M|2=|q5i1M7T5_NxV^1T{`S$|bk;I)xvpFT8pf=I zK0|EY*0E(FSkJDfZfeBsm~_;QkjnX=V#D&rkDzm5@OQN0_%mT_zctzIZQapx`hU;-o|qH{uBlh}#bDpg8iXw-66TbaYQ z!qzMI7iHd@seJI}b!9xBe|$o@#Q)2f!GMD2oLFC0N^zpY;X z=ao_RUuP;1DWS2y?C+LU?76oyTQV^?@ofF#xfoG)MTMIFN27ZwE_Eq3em4fLXOidT z7us-LH)>+ND^2-vO~JtE`O-7%A!^6W^BDCCez)_V2VUV0gjxS2ho<+8u)9FsjwDeKEjuqBcvXiB;7{nx&2fw4ZNDhr-WTFO zO4OY@k# Date: Fri, 11 Mar 2016 23:21:56 -0800 Subject: [PATCH 07/11] Allow both sides of the bed to be digged up. Tested with nodebreaker, fire. If called from lua, minetest.remove_node() calls on_destruct() callbacks before the map is actually updated. This means that we can't look at the map data to determine if we're done cleaning up adjacent nodes, and we have to stop recursing some other way. There's no data we can pass around through functions that would survive scope to a secondary on_destruct() callback, so we have to maintain local state somewhere in the mod namespace. In this case, we keep a bitflag. The bitflag is set to "true" by default. On the first half removal, the flag is flipped and afterwards we remove the other half node. When the on_destruct for the other half is running, it's value is false and we flip it back to true without removing the other half node. This thus prevents recursing. To facilitate easier finding of the bed partner, we tell our on_destruct whether we're a top or bottom half node through a passed flag. Now that the top is diggable, we just need to assure that it drops a bottom bed part. --- mods/beds/api.lua | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/mods/beds/api.lua b/mods/beds/api.lua index 0c27c4e3..be3cb97e 100644 --- a/mods/beds/api.lua +++ b/mods/beds/api.lua @@ -1,3 +1,27 @@ + +local reverse = true + +local function destruct_bed(pos, n) + local node = minetest.get_node(pos) + local other + + if n == 2 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.subtract(pos, dir) + elseif n == 1 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.add(pos, dir) + end + + if reverse then + reverse = not reverse + minetest.remove_node(other) + nodeupdate(other) + else + reverse = not reverse + end +end + function beds.register_bed(name, def) minetest.register_node(name .. "_bottom", { description = def.description, @@ -39,14 +63,7 @@ function beds.register_bed(name, def) end, on_destruct = function(pos) - local n = minetest.get_node_or_nil(pos) - if not n then return end - local dir = minetest.facedir_to_dir(n.param2) - local p = vector.add(pos, dir) - local n2 = minetest.get_node(p) - if minetest.get_item_group(n2.name, "bed") == 2 and n.param2 == n2.param2 then - minetest.remove_node(p) - end + destruct_bed(pos, 1) end, on_rightclick = function(pos, node, clicker) @@ -95,10 +112,14 @@ function beds.register_bed(name, def) pointable = false, groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2}, sounds = default.node_sound_wood_defaults(), + drop = name .. "_bottom", node_box = { type = "fixed", fixed = def.nodebox.top, }, + on_destruct = function(pos) + destruct_bed(pos, 2) + end, }) minetest.register_alias(name, name .. "_bottom") From c94349eaef94cfe5f22bce8c7d1d9d73584cfefd Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 15 Mar 2016 22:18:49 -0700 Subject: [PATCH 08/11] Re-export character.b3d without texture linkage. I've created a modified B3Dexport.py version that automatically strips the embedded texture link to external texture files. These links were causing the engine to spew "can't find character.png" messages on the console, but were harmless due to texture loading being done by the client side and not through irrlicht. I previously moved character.png to /textures/, which is wrong. I now understand that character.png was in the same folder as character.blend simply to make blender load the texture from the embedded linkage automatically. Nothing more, nothing less. Subsequently the character.png file should just sit in convenience in the /models/ folder with the blend file, and not in the textures file. This patch moves it back. And yes, minetest does load the character.png from this path. --- mods/default/models/character.b3d | Bin 86880 -> 86830 bytes .../{textures => models}/character.png | Bin 2 files changed, 0 insertions(+), 0 deletions(-) rename mods/default/{textures => models}/character.png (100%) diff --git a/mods/default/models/character.b3d b/mods/default/models/character.b3d index f411f4713724d7a026e0e411c2d138c566527a0c..0a0ca6292abb67cb2ad794f3e91c948024739c47 100644 GIT binary patch delta 59 zcmaE`jCI{IR!%1;V;8kxMh3=-)}}1~fnZ~agXd@ N<{h3uZu>bm9RRy;7_$HX delta 109 zcmZ3tjP=1XR%<6GW0#0vMg~R(28IyVh+r)sot%+al$czSTBKKymkyR;0*WF)gFOQS w5KrVZWdR9pbaL?AJpY%c&Srr{t~#5WJY99Rzffaz)7cz&E=Xtd=~71>0CT<^lmGw# diff --git a/mods/default/textures/character.png b/mods/default/models/character.png similarity index 100% rename from mods/default/textures/character.png rename to mods/default/models/character.png From 22e32a01ad583ddd9131fe6994ca21fc4d7fd7bb Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 15 Mar 2016 22:49:20 -0700 Subject: [PATCH 09/11] Allow digging of protected doors with "protection_bypass" This was probably lost in either the API rewrite or a merge/rebase. Fixes #929 --- mods/doors/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 431eab3b..dd7ab726 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -287,6 +287,9 @@ function doors.register(name, def) if not def.protected then return true end + if minetest.check_player_privs(digger, "protection_bypass") then + return true + end local meta = minetest.get_meta(pos) local name = "" if digger then From 70248505ae74c6e78c36834d793f76ba179ab368 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 16 Mar 2016 07:22:34 -0700 Subject: [PATCH 10/11] Walls: Don't connect to group:cracky the ```group:cracky``` group contains all sorts of odds and ends nodes that we shouldn't connect to. There are a few nodes that walls now no longer connect to, that probably should get ```group:stone``` added, or something similar, though. --- mods/walls/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/walls/init.lua b/mods/walls/init.lua index e3c1d68f..0b51bdb0 100644 --- a/mods/walls/init.lua +++ b/mods/walls/init.lua @@ -29,7 +29,7 @@ walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sou connect_back = {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}}, connect_right = {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}}, }, - connects_to = { "group:cracky", "group:wall", "group:stone" }, + connects_to = { "group:wall", "group:stone" }, paramtype = "light", is_ground_content = false, tiles = { wall_texture, }, From d90a0817223e33996b7fc3bb1c986da3a324aa98 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Wed, 16 Mar 2016 14:34:07 -0400 Subject: [PATCH 11/11] Rename argument to priv check Fixes crash when punching bones not owned by you, and may resolve https://github.com/minetest/minetest_game/issues/940 --- mods/bones/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/bones/init.lua b/mods/bones/init.lua index 71f8f1cb..39502f1d 100644 --- a/mods/bones/init.lua +++ b/mods/bones/init.lua @@ -5,7 +5,7 @@ bones = {} local function is_owner(pos, name) local owner = minetest.get_meta(pos):get_string("owner") - if owner == "" or owner == name or minetest.check_player_privs(placer, "protection_bypass") then + if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then return true end return false