From 3c1957b5b905dab7e44c2e4de0648cb08768ae4c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Feb 2017 16:26:43 +0100 Subject: [PATCH] Rename mod: fire to mcl_fire --- mods/mcl_core/functions.lua | 2 +- mods/{fire => mcl_fire}/README.txt | 0 mods/{fire => mcl_fire}/init.lua | 10 +++++----- mods/mcl_fire/mod.conf | 1 + mods/{fire => mcl_fire}/sounds/fire_large.ogg | Bin mods/{fire => mcl_fire}/sounds/fire_small.ogg | Bin .../textures/fire_basic_flame.png | Bin .../textures/fire_basic_flame_animated.png | Bin mods/mcl_tnt/depends.txt | 2 +- mods/minetest-3d_armor/3d_armor/armor.conf | 4 ++-- mods/mobs/api.lua | 8 ++++---- mods/mobs_mc/depends.txt | 2 +- 12 files changed, 15 insertions(+), 14 deletions(-) rename mods/{fire => mcl_fire}/README.txt (100%) rename mods/{fire => mcl_fire}/init.lua (94%) create mode 100644 mods/mcl_fire/mod.conf rename mods/{fire => mcl_fire}/sounds/fire_large.ogg (100%) rename mods/{fire => mcl_fire}/sounds/fire_small.ogg (100%) rename mods/{fire => mcl_fire}/textures/fire_basic_flame.png (100%) rename mods/{fire => mcl_fire}/textures/fire_basic_flame_animated.png (100%) diff --git a/mods/mcl_core/functions.lua b/mods/mcl_core/functions.lua index 0837f2348b..29c1b04dcc 100644 --- a/mods/mcl_core/functions.lua +++ b/mods/mcl_core/functions.lua @@ -169,7 +169,7 @@ end) function mcl_core.set_fire(pointed_thing) local n = minetest.get_node(pointed_thing.above) if n.name ~= "" and n.name == "air" and not minetest.is_protected(pointed_thing.above, "fire") then - minetest.add_node(pointed_thing.above, {name="fire:basic_flame"}) + minetest.add_node(pointed_thing.above, {name="mcl_fire:basic_flame"}) end end diff --git a/mods/fire/README.txt b/mods/mcl_fire/README.txt similarity index 100% rename from mods/fire/README.txt rename to mods/mcl_fire/README.txt diff --git a/mods/fire/init.lua b/mods/mcl_fire/init.lua similarity index 94% rename from mods/fire/init.lua rename to mods/mcl_fire/init.lua index 3c1f8a7f10..86027a5741 100644 --- a/mods/fire/init.lua +++ b/mods/mcl_fire/init.lua @@ -1,6 +1,6 @@ -- minetest/fire/init.lua local init = os.clock() -minetest.register_node("fire:basic_flame", { +minetest.register_node("mcl_fire:basic_flame", { description = "Fire", drawtype = "firelike", tiles = {{ @@ -47,7 +47,7 @@ end function fire.update_sounds_around(pos) local p0, p1 = fire.get_area_p0p1(pos) local cp = {x=(p0.x+p1.x)/2, y=(p0.y+p1.y)/2, z=(p0.z+p1.z)/2} - local flames_p = minetest.find_nodes_in_area(p0, p1, {"fire:basic_flame"}) + local flames_p = minetest.find_nodes_in_area(p0, p1, {"mcl_fire:basic_flame"}) --print("number of flames at "..minetest.pos_to_string(p0).."/" -- ..minetest.pos_to_string(p1)..": "..#flames_p) local should_have_sound = (#flames_p > 0) @@ -116,7 +116,7 @@ minetest.register_abm({ end local p = fire.find_pos_for_flame_around(p0) if p then - minetest.set_node(p, {name="fire:basic_flame"}) + minetest.set_node(p, {name="mcl_fire:basic_flame"}) fire.on_flame_add_at(p) end end, @@ -142,7 +142,7 @@ minetest.register_abm({ end local p2 = fire.find_pos_for_flame_around(p) if p2 then - minetest.set_node(p2, {name="fire:basic_flame"}) + minetest.set_node(p2, {name="mcl_fire:basic_flame"}) fire.on_flame_add_at(p2) end end @@ -151,7 +151,7 @@ minetest.register_abm({ -- Remove flammable nodes and flame minetest.register_abm({ - nodenames = {"fire:basic_flame"}, + nodenames = {"mcl_fire:basic_flame"}, interval = 1, chance = 2, action = function(p0, node, _, _) diff --git a/mods/mcl_fire/mod.conf b/mods/mcl_fire/mod.conf new file mode 100644 index 0000000000..23de4da695 --- /dev/null +++ b/mods/mcl_fire/mod.conf @@ -0,0 +1 @@ +name = mcl_fire diff --git a/mods/fire/sounds/fire_large.ogg b/mods/mcl_fire/sounds/fire_large.ogg similarity index 100% rename from mods/fire/sounds/fire_large.ogg rename to mods/mcl_fire/sounds/fire_large.ogg diff --git a/mods/fire/sounds/fire_small.ogg b/mods/mcl_fire/sounds/fire_small.ogg similarity index 100% rename from mods/fire/sounds/fire_small.ogg rename to mods/mcl_fire/sounds/fire_small.ogg diff --git a/mods/fire/textures/fire_basic_flame.png b/mods/mcl_fire/textures/fire_basic_flame.png similarity index 100% rename from mods/fire/textures/fire_basic_flame.png rename to mods/mcl_fire/textures/fire_basic_flame.png diff --git a/mods/fire/textures/fire_basic_flame_animated.png b/mods/mcl_fire/textures/fire_basic_flame_animated.png similarity index 100% rename from mods/fire/textures/fire_basic_flame_animated.png rename to mods/mcl_fire/textures/fire_basic_flame_animated.png diff --git a/mods/mcl_tnt/depends.txt b/mods/mcl_tnt/depends.txt index 03a112deba..e2279f65bf 100644 --- a/mods/mcl_tnt/depends.txt +++ b/mods/mcl_tnt/depends.txt @@ -1,2 +1,2 @@ mcl_core -fire +mcl_fire diff --git a/mods/minetest-3d_armor/3d_armor/armor.conf b/mods/minetest-3d_armor/3d_armor/armor.conf index e38328acac..0d155eb99f 100644 --- a/mods/minetest-3d_armor/3d_armor/armor.conf +++ b/mods/minetest-3d_armor/3d_armor/armor.conf @@ -12,8 +12,8 @@ ARMOR_FIRE_PROTECT = false ARMOR_FIRE_NODES = { {"default:lava_source", 5, 4}, {"default:lava_flowing", 5, 4}, - {"fire:basic_flame", 3, 4}, - {"fire:permanent_flame", 3, 4}, + {"mcl_fire:basic_flame", 3, 4}, + {"mcl_fire:permanent_flame", 3, 4}, } ARMOR_DROP = true diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index d86d3f88b0..dc16cdb8f1 100644 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -467,8 +467,8 @@ local do_env_damage = function(self) -- lava or fire if self.lava_damage ~= 0 and (nodef.groups.lava - or self.standing_in == "fire:basic_flame" - or self.standing_in == "fire:permanent_flame") then + or self.standing_in == "mcl_fire:basic_flame" + or self.standing_in == "mcl_fire:permanent_flame") then self.health = self.health - self.lava_damage @@ -2585,7 +2585,7 @@ local c_air = minetest.get_content_id("air") local c_ignore = minetest.get_content_id("ignore") local c_obsidian = minetest.get_content_id("mcl_core:obsidian") local c_chest = minetest.get_content_id("mcl_core:chest") -local c_fire = minetest.get_content_id("fire:basic_flame") +local c_fire = minetest.get_content_id("mcl_fire:basic_flame") -- explosion (cannot break protected or unbreakable nodes) function mobs:explosion(pos, radius, fire, smoke, sound) @@ -2653,7 +2653,7 @@ function mobs:explosion(pos, radius, fire, smoke, sound) and (minetest.registered_nodes[n].groups.flammable or random(1, 100) <= 30) then - minetest.set_node(p, {name = "fire:basic_flame"}) + minetest.set_node(p, {name = "mcl_fire:basic_flame"}) else minetest.set_node(p, {name = "air"}) diff --git a/mods/mobs_mc/depends.txt b/mods/mobs_mc/depends.txt index 5413fbe35f..2a28964099 100644 --- a/mods/mobs_mc/depends.txt +++ b/mods/mobs_mc/depends.txt @@ -1,5 +1,5 @@ mcl_core -fire +mcl_fire mobs mcl_tnt mcl_mobitems