updated to 0.4.16 functions

This commit is contained in:
TenPlus1 2017-10-09 15:48:06 +01:00
parent b11eccb0bf
commit 2040f8ec91

View File

@ -148,7 +148,7 @@ minetest.override_item("default:coalblock", {
-- Sound -- Sound
-- --
local flame_sound = minetest.setting_getbool("flame_sound") local flame_sound = minetest.settings:get_bool("flame_sound")
if flame_sound == nil then if flame_sound == nil then
-- Enable if no setting present -- Enable if no setting present
flame_sound = true flame_sound = true
@ -169,7 +169,7 @@ if flame_sound then
function fire.update_player_sound(player) function fire.update_player_sound(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
-- Search for flame nodes in radius around player -- Search for flame nodes in radius around player
local ppos = player:getpos() local ppos = player:get_pos()
local areamin = vector.subtract(ppos, radius) local areamin = vector.subtract(ppos, radius)
local areamax = vector.add(ppos, radius) local areamax = vector.add(ppos, radius)
local fpos, num = minetest.find_nodes_in_area( local fpos, num = minetest.find_nodes_in_area(
@ -289,11 +289,11 @@ minetest.register_abm({
-- Enable the following ABMs according to 'enable fire' setting -- Enable the following ABMs according to 'enable fire' setting
local fire_enabled = minetest.setting_getbool("enable_fire") local fire_enabled = minetest.settings:get_bool("enable_fire")
if fire_enabled == nil then if fire_enabled == nil then
-- New setting not specified, check for old setting. -- New setting not specified, check for old setting.
-- If old setting is also not specified, 'not nil' is true. -- If old setting is also not specified, 'not nil' is true.
fire_enabled = not minetest.setting_getbool("disable_fire") fire_enabled = not minetest.settings:get_bool("disable_fire")
end end
if not fire_enabled then if not fire_enabled then