From be3198d40fe6d1b9f4d7da3fa2311764586ed19c Mon Sep 17 00:00:00 2001 From: cale Date: Thu, 21 Apr 2016 16:23:11 +0200 Subject: [PATCH] new torch style + moved coins to money mod --- mods/default/craftitems.lua | 16 ----- mods/default/nodes.lua | 2 +- mods/money/init.lua | 10 +++ .../textures/money_coin.png} | Bin .../textures/money_silver_coin.png} | Bin mods/torch/init.lua | 59 ++++-------------- mods/torch/models/torch_torch.mtl | 10 --- mods/torch/models/torch_torch.obj | 40 ------------ mods/torch/textures/torch_flame.png | Bin 216 -> 0 bytes mods/torch/textures/torch_smoke.png | Bin 192 -> 0 bytes mods/torch/textures/torch_torch_ceiling.png | Bin 0 -> 488 bytes mods/torch/textures/torch_torch_floor.png | Bin 0 -> 482 bytes mods/torch/textures/torch_torch_wall.png | Bin 0 -> 493 bytes mods/torch/textures/torch_wood.png | Bin 286 -> 0 bytes 14 files changed, 22 insertions(+), 115 deletions(-) create mode 100644 mods/money/init.lua rename mods/{default/textures/default_coin.png => money/textures/money_coin.png} (100%) rename mods/{default/textures/default_silver_coin.png => money/textures/money_silver_coin.png} (100%) delete mode 100644 mods/torch/models/torch_torch.mtl delete mode 100644 mods/torch/models/torch_torch.obj delete mode 100644 mods/torch/textures/torch_flame.png delete mode 100644 mods/torch/textures/torch_smoke.png create mode 100644 mods/torch/textures/torch_torch_ceiling.png create mode 100644 mods/torch/textures/torch_torch_floor.png create mode 100644 mods/torch/textures/torch_torch_wall.png delete mode 100644 mods/torch/textures/torch_wood.png diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index dc209a5..b5fed2d 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -63,19 +63,3 @@ minetest.register_craftitem("default:twig", { description = "Twig", inventory_image = "default_twig.png", }) - -minetest.register_craftitem("default:coin", { - description = "Coin", - inventory_image = "default_coin.png", -}) - -minetest.register_craftitem("default:silver_coin", { - description = "Silver Coin", - inventory_image = "default_silver_coin.png", -}) - -minetest.register_craftitem("default:xp", { - description = "XP", - inventory_image = "default_xp.png", - stack_max = 99*99, -}) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 4a23ff9..ccf40f5 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -170,7 +170,7 @@ minetest.register_node("default:box", { after_dig_node = default.drop_items, }) -default.treasure_chest_items = {"default:dirt", "default:sand", "default:stone_item", "default:coin", "default:coal_lump", "default:wood"} +default.treasure_chest_items = {"money:coin", "money:silver_coin", "default:ruby"} minetest.register_node("default:treasure_chest", { description = "Treasure Chest", tiles = {"default_treasure_chest.png"}, diff --git a/mods/money/init.lua b/mods/money/init.lua new file mode 100644 index 0000000..27518ee --- /dev/null +++ b/mods/money/init.lua @@ -0,0 +1,10 @@ +minetest.register_craftitem("money:coin", { + description = "Coin", + inventory_image = "money_coin.png", +}) + +minetest.register_craftitem("money:silver_coin", { + description = "Silver Coin", + inventory_image = "money_silver_coin.png", +}) + diff --git a/mods/default/textures/default_coin.png b/mods/money/textures/money_coin.png similarity index 100% rename from mods/default/textures/default_coin.png rename to mods/money/textures/money_coin.png diff --git a/mods/default/textures/default_silver_coin.png b/mods/money/textures/money_silver_coin.png similarity index 100% rename from mods/default/textures/default_silver_coin.png rename to mods/money/textures/money_silver_coin.png diff --git a/mods/torch/init.lua b/mods/torch/init.lua index d4b7768..9d73268 100644 --- a/mods/torch/init.lua +++ b/mods/torch/init.lua @@ -1,58 +1,21 @@ minetest.register_node("torch:torch", { description = "Torch", - tiles = {"torch_wood.png"}, - drawtype = "mesh", - mesh = "torch_torch.obj", + tiles = {"torch_torch_floor.png", "torch_torch_ceiling.png", "torch_torch_wall.png"}, + drawtype = "torchlike", groups = {crumbly = 3}, paramtype = "light", - paramtype2 = "facedir", + paramtype2 = "wallmounted", light_source = 14, walkable = false, inventory_image = "torch_torch_inv.png", - --wield_image = "torch_torch_inv.png", -}) - -minetest.register_abm({ - nodenames = {"torch:torch"}, - interval = 10.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - pos.y = pos.y + 0.2 - minetest.add_particlespawner({ - amount = 10, - time = 10, - minpos = pos, - maxpos = pos, - minvel = {x=0, y=0.1, z=0}, - maxvel = {x=0, y=0, z=0}, - minacc = {x=0, y=0, z=0}, - maxacc = {x=0, y=0, z=0}, - minexptime = 1, - maxexptime = 1, - minsize = 1, - maxsize = 1, - collisiondetection = false, - vertical = false, - texture = "torch_flame.png", - }) - minetest.add_particlespawner({ - amount = 50, - time = 10, - minpos = pos, - maxpos = pos, - minvel = {x=0, y=0.5, z=0}, - maxvel = {x=0, y=0, z=0}, - minacc = {x=0, y=0, z=0}, - maxacc = {x=0, y=0, z=0}, - minexptime = 1, - maxexptime = 1, - minsize = 3, - maxsize = 3, - collisiondetection = false, - vertical = false, - texture = "torch_smoke.png", - }) - end, + legacy_wallmounted = true, + selection_box = { + type = "wallmounted", + wall_top = {-0.1, 0.5 - 0.6, -0.1, 0.1, 0.5, 0.1}, + wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5 + 0.6, 0.1}, + wall_side = {-0.5, -0.3, -0.1, -0.5 + 0.3, 0.3, 0.1}, + }, + wield_image = "torch_torch_inv.png", }) minetest.register_craft({ diff --git a/mods/torch/models/torch_torch.mtl b/mods/torch/models/torch_torch.mtl deleted file mode 100644 index 70d3ba1..0000000 --- a/mods/torch/models/torch_torch.mtl +++ /dev/null @@ -1,10 +0,0 @@ -# Blender MTL File: 'None' -# Material Count: 1 - -newmtl None -Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -Ks 0.8 0.8 0.8 -d 1 -illum 2 diff --git a/mods/torch/models/torch_torch.obj b/mods/torch/models/torch_torch.obj deleted file mode 100644 index 0273dd2..0000000 --- a/mods/torch/models/torch_torch.obj +++ /dev/null @@ -1,40 +0,0 @@ -# Blender v2.69 (sub 0) OBJ File: '' -# www.blender.org -mtllib torch_torch.mtl -o Cube.001 -v -0.075000 -0.555968 1.002726 -v -0.075000 -0.619360 0.866779 -v 0.075000 -0.619360 0.866779 -v 0.075000 -0.555968 1.002726 -v -0.075000 0.220916 0.159460 -v -0.075000 0.157523 0.023513 -v 0.075000 0.157523 0.023513 -v 0.075000 0.220916 0.159460 -vt 0.159707 0.720916 -vt 0.295653 0.657523 -vt -0.366779 -0.119360 -vt -0.502726 -0.055968 -vt 0.425000 0.657523 -vt 0.575000 0.657523 -vt 0.575000 -0.119360 -vt 0.425000 -0.119360 -vt 0.575000 0.720916 -vt 0.425000 0.720916 -vt 0.425000 -0.055968 -vt 0.575000 -0.055968 -vt 0.425000 0.497274 -vt 0.425000 0.633221 -vt 0.575000 0.633221 -vt 0.575000 0.497274 -vt 0.575000 0.159707 -vt 0.575000 0.295653 -vt 0.425000 0.295653 -vt 0.425000 0.159707 -usemtl None -s off -f 5/1 6/2 2/3 1/4 -f 6/5 7/6 3/7 2/8 -f 7/2 8/1 4/4 3/3 -f 8/9 5/10 1/11 4/12 -f 1/13 2/14 3/15 4/16 -f 8/17 7/18 6/19 5/20 diff --git a/mods/torch/textures/torch_flame.png b/mods/torch/textures/torch_flame.png deleted file mode 100644 index 60ce377d43692a9daee70d1e93e683b5883043c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNBO4blM@i+D=RhIJ64!_l=ltB<)VvY~=c3falGGH1 z^30M91$R&1fbd2>aiAgxPZ!4!i_^&o60BQTr~m!)FaF!--~Il)%64aY!~)K7va#Lu zoxNdI>cQ1FMLl~CzPC4Xo}uwo?P%Nr3judVQ3i$pU#YmAMzJA4vlu*G{an^LB{Ts5 D1;Iez diff --git a/mods/torch/textures/torch_smoke.png b/mods/torch/textures/torch_smoke.png deleted file mode 100644 index 0f951cc096d0f5c306a670c6505dc64ddc0dffba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNBO8|x%Z91nKt@THxJHyX=jZ08=9Mrw7o{eaq^2m8 zXO?6rxO@5rgg5eu0~Kj_x;TbdoK8-V2wAXj;Y0hQvsNaZxKMagfbU9UshJ~p$3+{1 dKrdqkh99#H-)=No+6>gg;OXk;vd$@?2>=slI2`~0 diff --git a/mods/torch/textures/torch_torch_ceiling.png b/mods/torch/textures/torch_torch_ceiling.png new file mode 100644 index 0000000000000000000000000000000000000000..92f580b0ec69ac1afa9e343372452966f495c90e GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNizpwnp~bFqdw@ccC9V-A&iT2ysd*&~&PAz-C8;S2 z<(VZJ3hti10pX2&;tULo0iG_7Ar_~nPTuRq>?qQ@-`ZN*+&*mI!CO(?t*@DHuwHSv z<#3^aU!dtmhn<5;?-J9gOM-v`OT$}E-O#fxJPT81Y&XMKa zH*y-+vK;)>zx#V~NF!?ie zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00Bx#L_t(I%axM9N&`UCF3mjCZkSUw*0dVv13_!C{C47vy-9GeUw@jRPEL`I>q#qAyHmbDmTLO?6!`0dGa)9Z$ zJUvRRg>uQ~y7jagV5Bq#9I%X(UVen}7$c<-5D~!`vl?L9P!VwwV^;?NlzflG7`I5l YA4?s7x^5^w4gdfE07*qoM6N<$f>U(7R{#J2 literal 0 HcmV?d00001 diff --git a/mods/torch/textures/torch_torch_wall.png b/mods/torch/textures/torch_torch_wall.png new file mode 100644 index 0000000000000000000000000000000000000000..8faa41479219a2e883b71b387e696e02a789f3cd GIT binary patch literal 493 zcmVe zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00C7=L_t(I%bk+FN&`U@g}<5I zO~OV=;R6V(*jfn|$wOG>rxgSP!CI_?SSt|(EtOPSS&K;}_z3O`h@FWsvpZw4o0x1C zvU=b$b7Ah8?=S;k|E2mZ&zkK;yjiMV)l*nN350-h$9Dka!oj9Tuj!?`sHlt;wXa8; z%n|ge@!(ptR6722wqNs{@n1ai~;M*pp77pqTKOGjZo?O(-@E6+q7Ht*a62G1U!$n zcoI9LMo8*-e-D5ax4_By9gV{Svp#+g@;Qef2pzfX{ZFs&0r(t_Xt(OzUS0`+P-}{A zUS@ jYyCe1fU}zigb@4y$@zG2A7Bgp00000NkvXXu0mjfQFqDv literal 0 HcmV?d00001 diff --git a/mods/torch/textures/torch_wood.png b/mods/torch/textures/torch_wood.png deleted file mode 100644 index 2980f68e6bfadf9a26be5008ae2254c10e068584..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WI14-?iy0WWg+Z8+Vb&Z8pdfpR zr>`sf14cG3F@vwZ#~%ZQBuiW)N}Tg^b5rw57@Uhz6H8K46v{J8G8EiBeFMT9`NV;W zW_Y?dhIkxLesiWjWr1o!(gH(;Q%(Hwbpct7s%{r-I$C~Kve(LRd?=WZqEXafJn>1n z(W0(S8*`=R?eg~gzbqt5#1z;qgl{%_r_8x*+wsA=tLKQ>6(vdIe4{|^tpS(We{`R3 z>|^%gQZ=e|2x>@pcGhvG&&4^GBCC8pF)X=~sHA*v#RFz7v&kz2Tn=ydYZKw}xw0yv bfRRB_N_*l)(To*9H!^s-`njxgN@xNAp>1C4