From 5722535e07ab113846ba04fda17b44af4305ecc0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 26 Jan 2017 11:23:09 +0100 Subject: [PATCH] Rename tnt mod to mcl_tnt --- mods/{tnt => mcl_tnt}/README.txt | 0 mods/{tnt => mcl_tnt}/depends.txt | 0 mods/{tnt => mcl_tnt}/init.lua | 18 +++++++++--------- mods/mcl_tnt/mod.conf | 1 + mods/{tnt => mcl_tnt}/sounds/tnt_explode.ogg | Bin mods/{tnt => mcl_tnt}/sounds/tnt_ignite.ogg | Bin .../textures/default_tnt_bottom.png | Bin .../textures/default_tnt_side.png | Bin .../textures/default_tnt_top.png | Bin .../textures/mcl_tnt_blink.png} | Bin .../textures/mcl_tnt_smoke.png} | Bin mods/mobs_mc/depends.txt | 2 +- 12 files changed, 11 insertions(+), 10 deletions(-) rename mods/{tnt => mcl_tnt}/README.txt (100%) rename mods/{tnt => mcl_tnt}/depends.txt (100%) rename mods/{tnt => mcl_tnt}/init.lua (91%) create mode 100644 mods/mcl_tnt/mod.conf rename mods/{tnt => mcl_tnt}/sounds/tnt_explode.ogg (100%) rename mods/{tnt => mcl_tnt}/sounds/tnt_ignite.ogg (100%) rename mods/{tnt => mcl_tnt}/textures/default_tnt_bottom.png (100%) rename mods/{tnt => mcl_tnt}/textures/default_tnt_side.png (100%) rename mods/{tnt => mcl_tnt}/textures/default_tnt_top.png (100%) rename mods/{tnt/textures/tnt_blink.png => mcl_tnt/textures/mcl_tnt_blink.png} (100%) rename mods/{tnt/textures/tnt_smoke.png => mcl_tnt/textures/mcl_tnt_smoke.png} (100%) diff --git a/mods/tnt/README.txt b/mods/mcl_tnt/README.txt similarity index 100% rename from mods/tnt/README.txt rename to mods/mcl_tnt/README.txt diff --git a/mods/tnt/depends.txt b/mods/mcl_tnt/depends.txt similarity index 100% rename from mods/tnt/depends.txt rename to mods/mcl_tnt/depends.txt diff --git a/mods/tnt/init.lua b/mods/mcl_tnt/init.lua similarity index 91% rename from mods/tnt/init.lua rename to mods/mcl_tnt/init.lua index e34dc082f..36c345923 100644 --- a/mods/tnt/init.lua +++ b/mods/mcl_tnt/init.lua @@ -4,7 +4,7 @@ local function spawn_tnt(pos, entname) end local function activate_if_tnt(nname, np, tnt_np, tntr) - if nname == "tnt:tnt" then + if nname == "mcl_tnt:tnt" then local e = spawn_tnt(np, nname) e:setvelocity({x=(np.x - tnt_np.x)*5+(tntr / 4), y=(np.y - tnt_np.y)*5+(tntr / 3), z=(np.z - tnt_np.z)*5+(tntr / 4)}) end @@ -16,7 +16,7 @@ local function do_tnt_physics(tnt_np,tntr) local oname = obj:get_entity_name() local v = obj:getvelocity() local p = obj:getpos() - if oname == "tnt:tnt" then + if oname == "mcl_tnt:tnt" then obj:setvelocity({x=(p.x - tnt_np.x) + (tntr / 2) + v.x, y=(p.y - tnt_np.y) + tntr + v.y, z=(p.z - tnt_np.z) + (tntr / 2) + v.z}) else if v ~= nil then @@ -33,12 +33,12 @@ end tnt = {} tnt.ignite = function(pos) minetest.remove_node(pos) - spawn_tnt(pos, "tnt:tnt") + spawn_tnt(pos, "mcl_tnt:tnt") nodeupdate(pos) end -minetest.register_node("tnt:tnt", { +minetest.register_node("mcl_tnt:tnt", { tiles = {"default_tnt_top.png", "default_tnt_bottom.png", "default_tnt_side.png", "default_tnt_side.png", "default_tnt_side.png", "default_tnt_side.png"}, @@ -77,7 +77,7 @@ end function TNT:on_step(dtime) local pos = self.object:getpos() - minetest.add_particle({x=pos.x,y=pos.y+0.5,z=pos.z}, {x=math.random(-.1,.1),y=math.random(1,2),z=math.random(-.1,.1)}, {x=0,y=-0.1,z=0}, math.random(.5,1),math.random(1,2), false, "tnt_smoke.png") + minetest.add_particle({x=pos.x,y=pos.y+0.5,z=pos.z}, {x=math.random(-.1,.1),y=math.random(1,2),z=math.random(-.1,.1)}, {x=0,y=-0.1,z=0}, math.random(.5,1),math.random(1,2), false, "mcl_tnt_smoke.png") self.timer = self.timer + dtime self.blinktimer = self.blinktimer + dtime if self.blinktimer > 0.5 then @@ -85,7 +85,7 @@ function TNT:on_step(dtime) if self.blinkstatus then self.object:settexturemod("") else - self.object:settexturemod("^tnt_blink.png") + self.object:settexturemod("^mcl_tnt_blink.png") end self.blinkstatus = not self.blinkstatus end @@ -112,7 +112,7 @@ function TNT:on_step(dtime) activate_if_tnt(n.name, np, pos, 3) minetest.remove_node(np) nodeupdate(np) - if n.name ~= "tnt:tnt" and math.random() > 0.9 then + if n.name ~= "mcl_tnt:tnt" and math.random() > 0.9 then local drop = minetest.get_node_drops(n.name, "") for _,item in ipairs(drop) do if type(item) == "string" then @@ -131,10 +131,10 @@ function TNT:on_step(dtime) end end -minetest.register_entity("tnt:tnt", TNT) +minetest.register_entity("mcl_tnt:tnt", TNT) minetest.register_craft({ - output = "tnt:tnt", + output = "mcl_tnt:tnt", recipe = { {'default:gunpowder','group:sand','default:gunpowder'}, {'group:sand','default:gunpowder','group:sand'}, diff --git a/mods/mcl_tnt/mod.conf b/mods/mcl_tnt/mod.conf new file mode 100644 index 000000000..96d4584cf --- /dev/null +++ b/mods/mcl_tnt/mod.conf @@ -0,0 +1 @@ +name = mcl_tnt diff --git a/mods/tnt/sounds/tnt_explode.ogg b/mods/mcl_tnt/sounds/tnt_explode.ogg similarity index 100% rename from mods/tnt/sounds/tnt_explode.ogg rename to mods/mcl_tnt/sounds/tnt_explode.ogg diff --git a/mods/tnt/sounds/tnt_ignite.ogg b/mods/mcl_tnt/sounds/tnt_ignite.ogg similarity index 100% rename from mods/tnt/sounds/tnt_ignite.ogg rename to mods/mcl_tnt/sounds/tnt_ignite.ogg diff --git a/mods/tnt/textures/default_tnt_bottom.png b/mods/mcl_tnt/textures/default_tnt_bottom.png similarity index 100% rename from mods/tnt/textures/default_tnt_bottom.png rename to mods/mcl_tnt/textures/default_tnt_bottom.png diff --git a/mods/tnt/textures/default_tnt_side.png b/mods/mcl_tnt/textures/default_tnt_side.png similarity index 100% rename from mods/tnt/textures/default_tnt_side.png rename to mods/mcl_tnt/textures/default_tnt_side.png diff --git a/mods/tnt/textures/default_tnt_top.png b/mods/mcl_tnt/textures/default_tnt_top.png similarity index 100% rename from mods/tnt/textures/default_tnt_top.png rename to mods/mcl_tnt/textures/default_tnt_top.png diff --git a/mods/tnt/textures/tnt_blink.png b/mods/mcl_tnt/textures/mcl_tnt_blink.png similarity index 100% rename from mods/tnt/textures/tnt_blink.png rename to mods/mcl_tnt/textures/mcl_tnt_blink.png diff --git a/mods/tnt/textures/tnt_smoke.png b/mods/mcl_tnt/textures/mcl_tnt_smoke.png similarity index 100% rename from mods/tnt/textures/tnt_smoke.png rename to mods/mcl_tnt/textures/mcl_tnt_smoke.png diff --git a/mods/mobs_mc/depends.txt b/mods/mobs_mc/depends.txt index dfbdfe6ab..183917747 100644 --- a/mods/mobs_mc/depends.txt +++ b/mods/mobs_mc/depends.txt @@ -1,5 +1,5 @@ default fire mobs -tnt +mcl_tnt mcl_mobitems