mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
[MFFGame] Updates
This commit is contained in:
parent
d36621d9de
commit
2b478b5b32
@ -18,7 +18,6 @@ function beds.register_bed(name, def)
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selectionbox,
|
||||
|
||||
},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
local n = minetest.get_node_or_nil(pos)
|
||||
@ -89,16 +88,13 @@ function beds.register_bed(name, def)
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
pointable = false,
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.nodebox.top,
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias(name, name .. "_bottom")
|
||||
|
@ -181,6 +181,7 @@ minetest.register_abm({
|
||||
neighbors = {"group:water"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(...)
|
||||
default.cool_lava_flowing(...)
|
||||
end,
|
||||
@ -191,6 +192,7 @@ minetest.register_abm({
|
||||
neighbors = {"group:water"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(...)
|
||||
default.cool_lava_source(...)
|
||||
end,
|
||||
@ -404,6 +406,7 @@ end)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt"},
|
||||
catch_up = false,
|
||||
interval = 30,
|
||||
chance = 5,
|
||||
action = function(pos, node)
|
||||
@ -423,10 +426,16 @@ minetest.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Grass and dry grass removed in darkness
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"},
|
||||
interval = 2,
|
||||
chance = 20,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
@ -439,3 +448,18 @@ minetest.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Moss growth on cobble near water
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:cobble"},
|
||||
neighbors = {"group:water"},
|
||||
interval = 17,
|
||||
chance = 200,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
minetest.set_node(pos, {name = "default:mossycobble"})
|
||||
end
|
||||
})
|
||||
|
@ -61,7 +61,7 @@ function default.register_ores()
|
||||
clust_size = 7,
|
||||
y_min = -15,
|
||||
y_max = 0,
|
||||
noise_threshhold = 0,
|
||||
noise_threshhold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.35,
|
||||
scale = 0.2,
|
||||
@ -188,7 +188,7 @@ function default.register_ores()
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 11 * 11 * 11,
|
||||
clust_scarcity = 12 * 12 * 12,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
y_min = -15,
|
||||
@ -199,7 +199,7 @@ function default.register_ores()
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 10 * 10 * 10,
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -63,
|
||||
@ -210,7 +210,7 @@ function default.register_ores()
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_scarcity = 7 * 7 * 7,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -30000,
|
||||
@ -222,7 +222,7 @@ function default.register_ores()
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 25 * 25 * 25,
|
||||
clust_scarcity = 24 * 24 * 24,
|
||||
clust_num_ores = 27,
|
||||
clust_size = 6,
|
||||
y_min = -30000,
|
||||
@ -1114,7 +1114,7 @@ function default.register_mgv6_decorations()
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 8,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.3,
|
||||
scale = 0.7,
|
||||
@ -1319,10 +1319,10 @@ function default.register_decorations()
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
sidelen = 80,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.003,
|
||||
scale = 0.002,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
@ -1341,10 +1341,10 @@ function default.register_decorations()
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:desert_sand"},
|
||||
sidelen = 80,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.0005,
|
||||
scale = 0.0015,
|
||||
offset = -0.0003,
|
||||
scale = 0.0009,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 230,
|
||||
octaves = 3,
|
||||
@ -1363,10 +1363,10 @@ function default.register_decorations()
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:desert_sand"},
|
||||
sidelen = 80,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.0005,
|
||||
scale = 0.0015,
|
||||
offset = -0.0003,
|
||||
scale = 0.0009,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 230,
|
||||
octaves = 3,
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
local random = math.random
|
||||
|
||||
local function can_grow(pos)
|
||||
function default.can_grow(pos)
|
||||
local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
if not node_under then
|
||||
return false
|
||||
@ -32,7 +32,7 @@ minetest.register_abm({
|
||||
interval = 10,
|
||||
chance = 50,
|
||||
action = function(pos, node)
|
||||
if not can_grow(pos) then
|
||||
if not default.can_grow(pos) then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -129,7 +129,23 @@ function fire.flame_should_extinguish(pos)
|
||||
end
|
||||
|
||||
|
||||
-- Enable ABMs according to 'disable fire' setting
|
||||
--[[ Extinguish all flames quickly with water, snow, ice
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"fire:basic_flame", "fire:permanent_flame"},
|
||||
neighbors = {"group:puts_out_fire"},
|
||||
interval = 3,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(p0, node, _, _)
|
||||
minetest.remove_node(p0)
|
||||
minetest.sound_play("fire_extinguish_flame",
|
||||
{pos = p0, max_hear_distance = 16, gain = 0.25})
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
]]-- Enable the following ABMs according to 'disable fire' setting
|
||||
|
||||
if minetest.setting_getbool("disable_fire") then
|
||||
|
||||
@ -139,6 +155,7 @@ if minetest.setting_getbool("disable_fire") then
|
||||
nodenames = {"fire:basic_flame"},
|
||||
interval = 3,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(p0, node, _, _)
|
||||
minetest.remove_node(p0)
|
||||
end,
|
||||
@ -167,6 +184,7 @@ else
|
||||
neighbors = {"group:igniter"},
|
||||
interval = 7,
|
||||
chance = 16,
|
||||
catch_up = false,
|
||||
action = function(p0, node, _, _)
|
||||
-- If there is water or stuff like that around node, don't ignite
|
||||
if fire.flame_should_extinguish(p0) then
|
||||
@ -185,6 +203,7 @@ else
|
||||
nodenames = {"fire:basic_flame"},
|
||||
interval = 5,
|
||||
chance = 16,
|
||||
catch_up = false,
|
||||
action = function(p0, node, _, _)
|
||||
-- If there are no flammable nodes around flame, remove flame
|
||||
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
|
||||
|
Loading…
Reference in New Issue
Block a user