From deb404919eea43e89554b2216a3cd184c715f7bb Mon Sep 17 00:00:00 2001 From: D00Med Date: Sun, 9 Apr 2017 07:30:17 +1000 Subject: [PATCH] tnt explosions --- mods/mapgen/textures/farlands_explosion.png | Bin 3923 -> 8219 bytes .../textures/farlands_explosion_small.png | Bin 0 -> 4587 bytes mods/mapgen/textures/farlands_smoke.png | Bin 4587 -> 244 bytes mods/mobs_npc/npc.lua | 123 +++++++++++++----- mods/tnt/init.lua | 24 +++- 5 files changed, 111 insertions(+), 36 deletions(-) create mode 100644 mods/mapgen/textures/farlands_explosion_small.png diff --git a/mods/mapgen/textures/farlands_explosion.png b/mods/mapgen/textures/farlands_explosion.png index d39136843d885621a43e20cdce5668901d6bf040..b1ab226a55dab553b499ecfffffa4784e1e7c512 100644 GIT binary patch literal 8219 zcmX|G1z1#3x1C|6g#iKS5JW(_kzweRE*TK%MjGjEkZvTTLy!{bl9Ch{8tD**PHA}8 z|NZZsZ|1vm=eu)fpR?Cqd#!UL)l}s0a42vzqyvG_IxbQ zk0^G2Y?6#0yZEb40e7=IU4hujcu@Mehp-eZCMjb_Fz2b#4*3KqKllo(_v_8-)89%J zI7(|?&!3yJ1=Fn%JbM}mwPtM9+dpXAy7)QXQ4Adtps2c)U$=bh57Pylb9(I2~9;16Tx#QViWNxq>2x8CvX**hxFrBAG2pu~0nYp^ z0`buKzyu4-+saZ@;H(CDTfHZtS((7!Hnfcnw9AK+R@7+X1W!oKlrX<4N$nhp(-6*W zgOp*pmSzHVlGd5mLn^=u`w@3zxkQcS`WgEH%Ot(q#+336RGH}A9es=OHFh3AIL5r{ z)oD92(z;>e`=l%GGRh9!bqNO&&*}bu#0$VJqphdQ-)X!N?xe7wQvWh8u7~Nk`HA!N zy0a)-yD(p7VvYbr0MgLJ99$;vO5x2JPSQM45qHo}wRxuaoo<~WehHFp{Hc3}%lT~a2F z{R;X%B6acq8!LI^r>?E5$w4#SziqICl1q~XAFn=HgPZbF^C*wTNDQHY0w_0Sk|}}P zPfQM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eZw%%YM9J$X)K}2b4+g{!2Aj47kE~{*H@`TACnp<9`1i48Wxmccs$yS5k1ojGaUU9 uU8SI;dq4zZsCoAIaNBA?nm|e%fAygxdTapelmh;}0Z^)1DwRm{(EkAd$&|YQ literal 0 HcmV?d00001 diff --git a/mods/mapgen/textures/farlands_smoke.png b/mods/mapgen/textures/farlands_smoke.png index bc49b65c918e753bdf395d3a972059882741d1d4..19dbf704c9c146eed0c415480ae97f27f3dc466a 100644 GIT binary patch delta 231 zcmV`c)`cnWd&tGJ+RzMZD_rL>ENbE383D@E`AVFqo>MRWOm07Tto3B9a@5_r1*hb z!R3sis?hBC0W|x;qo$Jb1F6pFJrd4DbXkG=oQKue+-Lz{Djhl$rN;5g0D!mr1{vQg h0l+7YJpcgk8&#K%_$&q#KC^1?iG_l%&$q zwIB%ih;Mk`Id{&TIrpA3_x^u%XCid89#N9rBm)3|5~Zf12lgBQ05K;a2JdE{`U`;_ zsjJ#E4*(#izrG+qS_U%!&}O1kl=OXOcTF7}Z%=t$+St7K6L;rPz^=P+)p4jsXQE1i zWu$-_PsjuP&I{d~;AhXs%Ge!>VsEHB(bW`%Visx$&l!E~|R1T}10H*yfVZB$3E z3s|K}IE<;v#u%K!)tfC1O%CdLYH#nkul?!8Q|;eP`6(w?n@>3mAyKSrI+^zvmN^Mn zkntw;S&o1+^xxCvnhM|mo0j6E@}u`sl%_ck;7Gmh1pL!OUfIQO<#&0IbesK~2sN&Y znF-Wq$&lZ2&wmBVzE_AN*((|cg5N#xC-5oGUAK%rx97!%B(*YWSI3i9oaHzu#WS|(#|A~@QJ zMufUZNme3iVaOa2*B^*8pE^W4+_@eb{Unr?+Gn&6e`|^Lw5NGP(1=$jK%XZGOkA zU)}!Vyv^)3P69EnHodcO)?_?R-{TFW>~oK^z4qh4ZU>#wQb`v39AVF91@p-N;kNi> z@;ik2#g-5^54hXgk=7Yt(1|DGvXRVaQ7!41vuYYPO>NsN0-96BVtv)fuy2*%!P>P>dSE$c%7&AuJ^es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npc.lua +++ b/mods/mobs_npc/npc.lua @@ -15,6 +15,91 @@ minetest.register_entity("mobs_npc:dummy", { collisionbox = {0, 0, 0, 0.1, 0.1, 0.1}, }) +local npc_make_home = function(self, dtime) + local pos = self.object:getpos() + pos.y = pos.y + 0.5 + + local beds = minetest.find_node_near(pos, 5, {"beds:bed_bottom", "beds:bed", "beds:bed_yellow_bottom", "beds:bed_brown_bottom", "beds:bed_magenta_bottom", "beds:bed_blue_bottom", "beds:bed_orange_bottom", "beds:bed_cyan_bottom", "beds:bed_pink_bottom", "beds:bed_black_bottom", "beds:bed_white_bottom", "beds:bed_darkgrey_bottom", "beds:bed_grey_bottom", "beds:bed_green_bottom", "beds:bed_purple_bottom", "beds:bed_darkgreen_bottom"}) + local light_sources = minetest.find_node_near(pos, 5, {"default:torch", "default:torch_wall", "default:torch_floor", "default:torch_ceiling", "mese_lamp"}) + local doors = minetest.find_node_near(pos, 5, {"doors:door_wood_a", "doors:door_glass_a", "doors:door_obsidian_glass_a"}) + local is_owned = minetest.find_node_near(pos, 5, {"villages:colony_deed", "villages:hobo_deed",}) + local node_below = minetest.get_node({x=pos.x, y=pos.y-1.5, z=pos.z}).name + local good_floor = minetest.get_item_group(node_below, "crumbly") + if beds ~= nil and light_sources ~= nil and doors ~= nil and is_owned == nil and self.home == nil and good_floor == 0 then + self.home = pos + local free_space = minetest.find_node_near(light_sources, 1, {"air"}) + local pos1 = free_space + if minetest.get_node({x=pos1.x-1, y=pos1.y, z=pos1.z}).name ~= "air" then + minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=3}) + minetest.chat_send_all("param3") + elseif minetest.get_node({x=pos1.x+1, y=pos1.y, z=pos1.z}).name ~= "air" then + minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=2}) + minetest.chat_send_all("param2") + elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z-1}).name ~= "air" then + minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=5}) + minetest.chat_send_all("param5") + elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z+1}).name ~= "air" then + minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=4}) + end + minetest.chat_send_all("NPC home set!") + end +end +local npc_go_home = function(self, dtime) + self.home_timer = (self.home_timer or 0) + dtime + if self.home_timer < 1 then + npc_make_home(self, dtime) + return end -- every 1 second + self.home_timer = 0 + + if self.time_of_day > 0.2 and self.time_of_day < 0.8 then + npc_make_home(self, dtime) + return -- return if not night time + end + + if self.home == nil then + --minetest.chat_send_all("something went wrong") + npc_make_home(self, dtime) + return + end + --minetest.chat_send_all(minetest.pos_to_string(self.home)) + local h = self.home -- destination coords + local p = self.object:getpos() -- mob position + local x, y, z = p.x - h.x, p.y - h.y, p.z - h.z + local dist = math.floor(math.sqrt(x * x + y * y + z * z)) + + if dist <= 1 then + print ("--- home!") + self.homepath = nil + self.state = "stand" + return + end + + if self.homepath == nil then + self.homepath = minetest.find_path(h, h, 50, 3, 6, "Dijkstra") + print ("--- finding route", self.homepath, dist) + end + + if self.homepath then + print ("--- following path", dist, #self.homepath) + + local np = self.homepath[1] ; if not np then return end + + if math.abs(np.x - p.x) + math.abs(np.z - p.z) < 0.6 then + table.remove(self.homepath, 1) ; print ("-- removed entry") + end + + np = {x = np.x, y = np.y, z = np.z} + + local vec = {x = np.x - p.x, z = np.z - p.z} + local yaw = (math.atan(vec.z / vec.x) + math.pi / 2) - self.rotate + + if np.x > p.x then yaw = yaw + math.pi end + + self.object:setyaw(yaw) + set_velocity(self, self.walk_velocity) + end +end + mobs:register_mob("mobs_npc:npc", { type = "npc", passive = false, @@ -66,44 +151,18 @@ mobs:register_mob("mobs_npc:npc", { punch_start = 45, punch_end = 65, }, - do_custom = function(self) - local pos = self.object:getpos() - pos.y = pos.y + 0.5 - - local beds = minetest.find_node_near(pos, 5, {"beds:bed_bottom", "beds:bed", "beds:bed_yellow_bottom", "beds:bed_brown_bottom", "beds:bed_magenta_bottom", "beds:bed_blue_bottom", "beds:bed_orange_bottom", "beds:bed_cyan_bottom", "beds:bed_pink_bottom", "beds:bed_black_bottom", "beds:bed_white_bottom", "beds:bed_darkgrey_bottom", "beds:bed_grey_bottom", "beds:bed_green_bottom", "beds:bed_purple_bottom", "beds:bed_darkgreen_bottom"}) - local light_sources = minetest.find_node_near(pos, 5, {"default:torch", "default:torch_wall", "default:torch_floor", "default:torch_ceiling", "mese_lamp"}) - local doors = minetest.find_node_near(pos, 5, {"doors:door_wood_a", "doors:door_glass_a", "doors:door_obsidian_glass_a"}) - local is_owned = minetest.find_node_near(pos, 5, {"villages:colony_deed", "villages:hobo_deed",}) - local node_below = minetest.get_node({x=pos.x, y=pos.y-1.5, z=pos.z}).name - local good_floor = minetest.get_item_group(node_below, "crumbly") - if beds ~= nil and light_sources ~= nil and doors ~= nil and is_owned == nil and self.home == nil and good_floor == 0 then - self.home = pos - local free_space = minetest.find_node_near(light_sources, 1, {"air"}) - local pos1 = free_space - if minetest.get_node({x=pos1.x-1, y=pos1.y, z=pos1.z}).name ~= "air" then - minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=3}) - minetest.chat_send_all("param3") - elseif minetest.get_node({x=pos1.x+1, y=pos1.y, z=pos1.z}).name ~= "air" then - minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=2}) - minetest.chat_send_all("param2") - elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z-1}).name ~= "air" then - minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=5}) - minetest.chat_send_all("param5") - elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z+1}).name ~= "air" then - minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=4}) - end - minetest.chat_send_all("NPC home set!") - end + do_custom = function(self, dtime) + + npc_go_home(self, dtime) - local game_time = minetest.get_timeofday()*24000 + --local game_time = minetest.get_timeofday()*24000 - if game_time <= 6000 or game_time >= 18000 and self.home ~= nil then + --[[if game_time <= 6000 or game_time >= 18000 and self.home ~= nil then local pos1 = self.home if math.abs(pos1.x-pos.x) >= 10 or math.abs(pos1.z-pos.z) >= 10 then self.object:setpos({x=pos1.x, y=pos1.y-0.5, z=pos1.z}) end - end - + end]] end, on_rightclick = function(self, clicker) diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index b4798d8..8ad1726 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -230,7 +230,7 @@ local function add_effects(pos, radius, drops) }) end) minetest.add_particlespawner({ - amount = 32, + amount = 16, time = 0.5, minpos = vector.subtract(pos, radius / 2), maxpos = vector.add(pos, radius / 2), @@ -238,13 +238,29 @@ local function add_effects(pos, radius, drops) maxvel = {x = 1, y = 5, z = 1}, minacc = vector.new(), maxacc = vector.new(), - minexptime = 1, - maxexptime = 2.5, + minexptime = 0.5, + maxexptime = 1, minsize = radius * 3, maxsize = radius * 5, - texture = "farlands_smoke.png", + texture = "farlands_explosion_small.png", animation = {type="vertical_frames", aspect_w=32, aspect_h=32, frame_length=1}, }) + minetest.add_particlespawner({ + amount = 64, + time = 1, + minpos = vector.subtract(pos, radius / 3), + maxpos = vector.add(pos, radius / 3), + minvel = {x = -1, y = 2, z = -1}, + maxvel = {x = 1, y = 5, z = 1}, + minacc = vector.new(), + maxacc = vector.new(), + minexptime = 1.5, + maxexptime = 2, + minsize = radius * 2, + maxsize = radius * 2.5, + texture = "farlands_smoke.png", + animation = {type="vertical_frames", aspect_w=16, aspect_h=16, frame_length=0.2}, + }) -- we just dropped some items. Look at the items entities and pick -- one of them to use as texture