mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
fix some mods using "core" insteed of "minetest"
This commit is contained in:
parent
a896d7f5e4
commit
e81da3c4ff
6 changed files with 15 additions and 15 deletions
|
@ -32,9 +32,9 @@ local singlenode = mg_name == "singlenode"
|
||||||
|
|
||||||
-- Calculate mapgen_edge_min/mapgen_edge_max
|
-- Calculate mapgen_edge_min/mapgen_edge_max
|
||||||
mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize")) or 5)
|
mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize")) or 5)
|
||||||
mcl_vars.MAP_BLOCKSIZE = math.max(1, core.MAP_BLOCKSIZE or 16)
|
mcl_vars.MAP_BLOCKSIZE = math.max(1, minetest.MAP_BLOCKSIZE or 16)
|
||||||
mcl_vars.mapgen_limit = math.max(1, tonumber(minetest.get_mapgen_setting("mapgen_limit")) or 31000)
|
mcl_vars.mapgen_limit = math.max(1, tonumber(minetest.get_mapgen_setting("mapgen_limit")) or 31000)
|
||||||
mcl_vars.MAX_MAP_GENERATION_LIMIT = math.max(1, core.MAX_MAP_GENERATION_LIMIT or 31000)
|
mcl_vars.MAX_MAP_GENERATION_LIMIT = math.max(1, minetest.MAX_MAP_GENERATION_LIMIT or 31000)
|
||||||
local central_chunk_offset = -math.floor(mcl_vars.chunksize / 2)
|
local central_chunk_offset = -math.floor(mcl_vars.chunksize / 2)
|
||||||
mcl_vars.central_chunk_offset_in_nodes = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE
|
mcl_vars.central_chunk_offset_in_nodes = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE
|
||||||
mcl_vars.chunk_size_in_nodes = mcl_vars.chunksize * mcl_vars.MAP_BLOCKSIZE
|
mcl_vars.chunk_size_in_nodes = mcl_vars.chunksize * mcl_vars.MAP_BLOCKSIZE
|
||||||
|
|
|
@ -158,11 +158,11 @@ mobs_mc.tools.check_iron_golem_summon = function(pos)
|
||||||
if ok then
|
if ok then
|
||||||
-- Remove the nodes
|
-- Remove the nodes
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
core.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
for i=1, 4 do
|
for i=1, 4 do
|
||||||
local cpos = vector.add(pos, checks[c][i])
|
local cpos = vector.add(pos, checks[c][i])
|
||||||
minetest.remove_node(cpos)
|
minetest.remove_node(cpos)
|
||||||
core.check_for_falling(cpos)
|
minetest.check_for_falling(cpos)
|
||||||
end
|
end
|
||||||
-- Summon iron golem
|
-- Summon iron golem
|
||||||
local place
|
local place
|
||||||
|
|
|
@ -179,9 +179,9 @@ mobs_mc.tools.check_snow_golem_summon = function(pos)
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
minetest.remove_node(b1)
|
minetest.remove_node(b1)
|
||||||
minetest.remove_node(b2)
|
minetest.remove_node(b2)
|
||||||
core.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
core.check_for_falling(b1)
|
minetest.check_for_falling(b1)
|
||||||
core.check_for_falling(b2)
|
minetest.check_for_falling(b2)
|
||||||
local obj = minetest.add_entity(place, "mobs_mc:snowman")
|
local obj = minetest.add_entity(place, "mobs_mc:snowman")
|
||||||
if obj then
|
if obj then
|
||||||
summon_particles(obj)
|
summon_particles(obj)
|
||||||
|
|
|
@ -66,7 +66,7 @@ local function piston_remove_pusher(pos, oldnode)
|
||||||
|
|
||||||
if pushername == pistonspec.pusher then -- make sure there actually is a pusher
|
if pushername == pistonspec.pusher then -- make sure there actually is a pusher
|
||||||
minetest.remove_node(pusherpos)
|
minetest.remove_node(pusherpos)
|
||||||
core.check_for_falling(pusherpos)
|
minetest.check_for_falling(pusherpos)
|
||||||
minetest.sound_play("piston_retract", {
|
minetest.sound_play("piston_retract", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
max_hear_distance = 31,
|
max_hear_distance = 31,
|
||||||
|
@ -87,7 +87,7 @@ local function piston_remove_base(pos, oldnode)
|
||||||
|
|
||||||
if basename == pistonspec.onname then -- make sure there actually is a base node
|
if basename == pistonspec.onname then -- make sure there actually is a base node
|
||||||
minetest.remove_node(basepos)
|
minetest.remove_node(basepos)
|
||||||
core.check_for_falling(basepos)
|
minetest.check_for_falling(basepos)
|
||||||
minetest.sound_play("piston_retract", {
|
minetest.sound_play("piston_retract", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
max_hear_distance = 31,
|
max_hear_distance = 31,
|
||||||
|
|
|
@ -104,7 +104,7 @@ local register_slice = function(level, nodebox, desc)
|
||||||
-- Check if we were allowed to eat
|
-- Check if we were allowed to eat
|
||||||
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
|
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
core.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -179,7 +179,7 @@ minetest.register_abm({
|
||||||
liquid_flow_action(pos, "lava", function(pos)
|
liquid_flow_action(pos, "lava", function(pos)
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
minetest.sound_play("builtin_item_lava", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
minetest.sound_play("builtin_item_lava", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||||
core.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -1242,7 +1242,7 @@ minetest.register_abm({
|
||||||
if not mcl_core.check_vines_supported(pos, node) then
|
if not mcl_core.check_vines_supported(pos, node) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
vinedecay_particles(pos, node)
|
vinedecay_particles(pos, node)
|
||||||
core.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1404,7 +1404,7 @@ minetest.register_abm({
|
||||||
-- Remove node
|
-- Remove node
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
leafdecay_particles(p0, n0)
|
leafdecay_particles(p0, n0)
|
||||||
core.check_for_falling(p0)
|
minetest.check_for_falling(p0)
|
||||||
|
|
||||||
-- Kill depending vines immediately to skip the vines decay delay
|
-- Kill depending vines immediately to skip the vines decay delay
|
||||||
local surround = {
|
local surround = {
|
||||||
|
@ -1421,7 +1421,7 @@ minetest.register_abm({
|
||||||
if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then
|
if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then
|
||||||
minetest.remove_node(spos)
|
minetest.remove_node(spos)
|
||||||
vinedecay_particles(spos, maybe_vine)
|
vinedecay_particles(spos, maybe_vine)
|
||||||
core.check_for_falling(spos)
|
minetest.check_for_falling(spos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1445,7 +1445,7 @@ minetest.register_abm({
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
vinedecay_particles(p0, node)
|
vinedecay_particles(p0, node)
|
||||||
-- Just in case a falling node happens to float above vines
|
-- Just in case a falling node happens to float above vines
|
||||||
core.check_for_falling(p0)
|
minetest.check_for_falling(p0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue