Rename mod: fire to mcl_fire
This commit is contained in:
parent
5e609235bf
commit
3c1957b5b9
|
@ -169,7 +169,7 @@ end)
|
||||||
function mcl_core.set_fire(pointed_thing)
|
function mcl_core.set_fire(pointed_thing)
|
||||||
local n = minetest.get_node(pointed_thing.above)
|
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
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- minetest/fire/init.lua
|
-- minetest/fire/init.lua
|
||||||
local init = os.clock()
|
local init = os.clock()
|
||||||
minetest.register_node("fire:basic_flame", {
|
minetest.register_node("mcl_fire:basic_flame", {
|
||||||
description = "Fire",
|
description = "Fire",
|
||||||
drawtype = "firelike",
|
drawtype = "firelike",
|
||||||
tiles = {{
|
tiles = {{
|
||||||
|
@ -47,7 +47,7 @@ end
|
||||||
function fire.update_sounds_around(pos)
|
function fire.update_sounds_around(pos)
|
||||||
local p0, p1 = fire.get_area_p0p1(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 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).."/"
|
--print("number of flames at "..minetest.pos_to_string(p0).."/"
|
||||||
-- ..minetest.pos_to_string(p1)..": "..#flames_p)
|
-- ..minetest.pos_to_string(p1)..": "..#flames_p)
|
||||||
local should_have_sound = (#flames_p > 0)
|
local should_have_sound = (#flames_p > 0)
|
||||||
|
@ -116,7 +116,7 @@ minetest.register_abm({
|
||||||
end
|
end
|
||||||
local p = fire.find_pos_for_flame_around(p0)
|
local p = fire.find_pos_for_flame_around(p0)
|
||||||
if p then
|
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)
|
fire.on_flame_add_at(p)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -142,7 +142,7 @@ minetest.register_abm({
|
||||||
end
|
end
|
||||||
local p2 = fire.find_pos_for_flame_around(p)
|
local p2 = fire.find_pos_for_flame_around(p)
|
||||||
if p2 then
|
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)
|
fire.on_flame_add_at(p2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -151,7 +151,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
-- Remove flammable nodes and flame
|
-- Remove flammable nodes and flame
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"fire:basic_flame"},
|
nodenames = {"mcl_fire:basic_flame"},
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 2,
|
chance = 2,
|
||||||
action = function(p0, node, _, _)
|
action = function(p0, node, _, _)
|
1
mods/mcl_fire/mod.conf
Normal file
1
mods/mcl_fire/mod.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
name = mcl_fire
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
@ -1,2 +1,2 @@
|
||||||
mcl_core
|
mcl_core
|
||||||
fire
|
mcl_fire
|
||||||
|
|
|
@ -12,8 +12,8 @@ ARMOR_FIRE_PROTECT = false
|
||||||
ARMOR_FIRE_NODES = {
|
ARMOR_FIRE_NODES = {
|
||||||
{"default:lava_source", 5, 4},
|
{"default:lava_source", 5, 4},
|
||||||
{"default:lava_flowing", 5, 4},
|
{"default:lava_flowing", 5, 4},
|
||||||
{"fire:basic_flame", 3, 4},
|
{"mcl_fire:basic_flame", 3, 4},
|
||||||
{"fire:permanent_flame", 3, 4},
|
{"mcl_fire:permanent_flame", 3, 4},
|
||||||
}
|
}
|
||||||
|
|
||||||
ARMOR_DROP = true
|
ARMOR_DROP = true
|
||||||
|
|
|
@ -467,8 +467,8 @@ local do_env_damage = function(self)
|
||||||
-- lava or fire
|
-- lava or fire
|
||||||
if self.lava_damage ~= 0
|
if self.lava_damage ~= 0
|
||||||
and (nodef.groups.lava
|
and (nodef.groups.lava
|
||||||
or self.standing_in == "fire:basic_flame"
|
or self.standing_in == "mcl_fire:basic_flame"
|
||||||
or self.standing_in == "fire:permanent_flame") then
|
or self.standing_in == "mcl_fire:permanent_flame") then
|
||||||
|
|
||||||
self.health = self.health - self.lava_damage
|
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_ignore = minetest.get_content_id("ignore")
|
||||||
local c_obsidian = minetest.get_content_id("mcl_core:obsidian")
|
local c_obsidian = minetest.get_content_id("mcl_core:obsidian")
|
||||||
local c_chest = minetest.get_content_id("mcl_core:chest")
|
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)
|
-- explosion (cannot break protected or unbreakable nodes)
|
||||||
function mobs:explosion(pos, radius, fire, smoke, sound)
|
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
|
and (minetest.registered_nodes[n].groups.flammable
|
||||||
or random(1, 100) <= 30) then
|
or random(1, 100) <= 30) then
|
||||||
|
|
||||||
minetest.set_node(p, {name = "fire:basic_flame"})
|
minetest.set_node(p, {name = "mcl_fire:basic_flame"})
|
||||||
else
|
else
|
||||||
minetest.set_node(p, {name = "air"})
|
minetest.set_node(p, {name = "air"})
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
mcl_core
|
mcl_core
|
||||||
fire
|
mcl_fire
|
||||||
mobs
|
mobs
|
||||||
mcl_tnt
|
mcl_tnt
|
||||||
mcl_mobitems
|
mcl_mobitems
|
||||||
|
|
Loading…
Reference in New Issue
Block a user