mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-22 16:10:18 +01:00
rework a bit to work better with minetest_game 0.4.16
eliminates flint and steel (aliased to mt_game fire:flint_and_steel) eliminates fake_fire:fake_fire (aliased to mt_game fire:permanent_flame) mt_game already provides a "fake" fire in the form of a "permanent flame", strike a coal block with flint/steel to get it. modifies default ice block so that it can be "ignited" (ice fire on top) with mt_game flint/steel Fire mod must be enabled. However, fire damage is NOT required.
This commit is contained in:
parent
d7a4054dda
commit
9d2704c0c2
@ -66,16 +66,8 @@ local function stop_smoke(pos)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
||||
|
||||
-- FLAME TYPES
|
||||
local flame_types = {
|
||||
{ "fake", S("Fake fire") },
|
||||
{ "ice", S("Ice fire") },
|
||||
}
|
||||
|
||||
for _, f in ipairs(flame_types) do
|
||||
local name, desc = unpack(f)
|
||||
minetest.register_node("fake_fire:"..name.."_fire", {
|
||||
inventory_image = name.."_fire_inv.png",
|
||||
minetest.register_node("fake_fire:ice_fire", {
|
||||
inventory_image = "ice_fire_inv.png",
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
@ -87,7 +79,7 @@ for _, f in ipairs(flame_types) do
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name=name.."_fire_animated.png", animation={type="vertical_frames",
|
||||
{name="ice_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
@ -102,7 +94,8 @@ for _, f in ipairs(flame_types) do
|
||||
end,
|
||||
drop = ""
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("fake_fire:fake_fire", "fire:permanent_flame")
|
||||
|
||||
minetest.register_node("fake_fire:fancy_fire", {
|
||||
inventory_image = "fancy_fire_inv.png",
|
||||
@ -190,43 +183,18 @@ for _, mat in ipairs(materials) do
|
||||
})
|
||||
end
|
||||
|
||||
-- FLINT and STEEL
|
||||
minetest.register_tool("fake_fire:flint_and_steel", {
|
||||
description = S("Flint and steel"),
|
||||
inventory_image = "flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={flamable = {uses=65, maxlevel=1}}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
if string.find(minetest.get_node(pointed_thing.under).name, "ice") then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:ice_fire"})
|
||||
else
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:fake_fire"})
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), S("This area is protected!"))
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel")
|
||||
|
||||
itemstack:add_wear(65535/65)
|
||||
return itemstack
|
||||
minetest.override_item("default:ice", {
|
||||
on_ignite = function(pos, igniter)
|
||||
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(flame_pos).name == "air" then
|
||||
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- CRAFTS
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint_and_steel',
|
||||
recipe = {"default:obsidian_shard", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
|
Loading…
Reference in New Issue
Block a user