Fix from mcl2 blackstone by cora

Changes taken from 
af5e3d84d4

Fire is briefly yellow upon ignition before becoming blue
This commit is contained in:
3raven 2022-04-30 22:08:08 +00:00
parent 76efcd4906
commit 49acbfed8e
2 changed files with 20 additions and 29 deletions

View File

@ -4,36 +4,11 @@ local LIGHT_TORCH = 10
stairs = {} stairs = {}
local fire_enabled = minetest.settings:get_bool("enable_fire", true)
local fire_help, eternal_fire_help
if fire_enabled then
fire_help = S("Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.")
else
fire_help = S("Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.")
end
if fire_enabled then
eternal_fire_help = S("Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.")
else
eternal_fire_help = S("Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.")
end
local fire_death_messages = {
N("@1 has been cooked crisp."),
N("@1 felt the burn."),
N("@1 died in the flames."),
N("@1 died in a fire."),
}
--nodes --nodes
local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil
local on_rotate local on_rotate
if mod_screwdriver then if mod_screwdriver then
@ -194,7 +169,7 @@ minetest.register_node("mcl_blackstone:soul_soil", {
minetest.register_node("mcl_blackstone:soul_fire", { minetest.register_node("mcl_blackstone:soul_fire", {
description = S("Eternal Soul Fire"), description = S("Eternal Soul Fire"),
_doc_items_longdesc = eternal_fire_help, _doc_items_longdesc = minetest.registered_nodes["mcl_fire:eternal_fire"]._doc_items_longdesc ,
drawtype = "firelike", drawtype = "firelike",
tiles = { tiles = {
{ {
@ -214,7 +189,7 @@ minetest.register_node("mcl_blackstone:soul_fire", {
buildable_to = true, buildable_to = true,
sunlight_propagates = true, sunlight_propagates = true,
damage_per_second = 2, damage_per_second = 2,
_mcl_node_death_message = fire_death_messages, _mcl_node_death_message = minetest.registered_nodes["mcl_fire:fire"]._mcl_node_death_message,
groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1, destroys_items = 1, set_on_fire=8}, groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1, destroys_items = 1, set_on_fire=8},
floodable = true, floodable = true,
on_flood = function(pos, oldnode, newnode) on_flood = function(pos, oldnode, newnode)
@ -222,7 +197,23 @@ minetest.register_node("mcl_blackstone:soul_fire", {
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true) minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
end end
end, end,
on_construct=function(pos)
local under = minetest.get_node(vector.offset(pos,0,-1,0)).name
if under ~= "mcl_nether:soul_sand" and under ~= "mcl_blackstone:soul_soil" then
minetest.swap_node(pos, {name = "air"})
end
end
}) })
local old_onconstruct=minetest.registered_nodes["mcl_fire:fire"].on_construct
minetest.registered_nodes["mcl_fire:fire"].on_construct=function(pos)
local under = minetest.get_node(vector.offset(pos,0,-1,0)).name
if under == "mcl_nether:soul_sand" or under == "mcl_blackstone:soul_soil" then
minetest.swap_node(pos, {name = "mcl_blackstone:soul_fire"})
end
old_onconstruct(pos)
end
--[[ --[[
minetest.register_node("mcl_blackstone:chain", { minetest.register_node("mcl_blackstone:chain", {
description = S("Chain"), description = S("Chain"),

View File

@ -1,2 +1,2 @@
name = mcl_blackstone name = mcl_blackstone
depends = mcl_core,screwdriver,mcl_stairs,mclx_stairs,mcl_walls,mclx_fences,mcl_torches depends = mcl_core,screwdriver,mcl_stairs,mclx_stairs,mcl_walls,mclx_fences,mcl_torches, mcl_fire