Mods in den Spieleordner reingeschoben. So richtig tief.
This commit is contained in:
parent
b4b6c08f4f
commit
f7bc25a670
1674 changed files with 56056 additions and 530 deletions
|
@ -12,7 +12,7 @@ local S = minetest.get_translator("farming")
|
|||
|
||||
farming = {
|
||||
mod = "redo",
|
||||
version = "20240924",
|
||||
version = "20250417",
|
||||
path = minetest.get_modpath("farming"),
|
||||
select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||
select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}},
|
||||
|
@ -23,49 +23,6 @@ farming = {
|
|||
mtg = minetest.get_modpath("default"),
|
||||
eth = minetest.get_modpath("ethereal"),
|
||||
mcl = minetest.get_modpath("mcl_core"),
|
||||
sounds = {},
|
||||
register_decoration = function(crop,steps,alt_source)
|
||||
biomes = asuna.features.crops[crop]
|
||||
if not biomes then
|
||||
return
|
||||
end
|
||||
|
||||
local decor
|
||||
if alt_source then
|
||||
decor = alt_source
|
||||
else
|
||||
decor = {}
|
||||
for i = 0, (steps > 4 and 2 or 0) do
|
||||
decor[i + 1] = "farming:" .. crop .. "_" .. (steps - i)
|
||||
end
|
||||
end
|
||||
|
||||
local chars = {crop:byte()}
|
||||
local seed = 11111
|
||||
for _,c in ipairs(chars) do
|
||||
seed = seed + c
|
||||
end
|
||||
seed = seed + #crop
|
||||
|
||||
minetest.register_decoration(biomes.inject_decoration({
|
||||
name = "farming:" .. crop,
|
||||
deco_type = "simple",
|
||||
place_on = "group:soil",
|
||||
sidelen = 8,
|
||||
noise_params = {
|
||||
offset = -0.4125,
|
||||
scale = 0.3575,
|
||||
spread = {x = 14, y = 14, z = 14},
|
||||
seed = seed,
|
||||
octaves = 2,
|
||||
persist = 0.62,
|
||||
lacunarity = 0.675,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = decor,
|
||||
}))
|
||||
end,
|
||||
mcl_hardness = 0.01,
|
||||
translate = S
|
||||
}
|
||||
|
@ -338,6 +295,23 @@ end)
|
|||
-- Just in case a growing type or added node is missed (also catches existing
|
||||
-- nodes added to map before timers were incorporated).
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Start crop timer",
|
||||
name = "farming:start_crop_timer",
|
||||
nodenames = {"group:growing"},
|
||||
run_at_every_load = false,
|
||||
|
||||
action = function(pos, node, dtime_s)
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
|
||||
if timer:is_started() then return end
|
||||
|
||||
farming.start_seed_timer(pos)
|
||||
end
|
||||
})
|
||||
|
||||
--[[
|
||||
minetest.register_abm({
|
||||
label = "Start crop timer",
|
||||
nodenames = {"group:growing"},
|
||||
|
@ -376,7 +350,7 @@ minetest.register_abm({
|
|||
farming.handle_growth(pos, node) -- start normal crop timer
|
||||
end
|
||||
end
|
||||
})
|
||||
})]]
|
||||
|
||||
-- default check crop is on wet soil
|
||||
|
||||
|
@ -559,7 +533,7 @@ end
|
|||
|
||||
-- Function to register plants (default farming compatibility)
|
||||
|
||||
farming.register_plant = function(name, def)
|
||||
function farming.register_plant(name, def)
|
||||
|
||||
if not def.steps then return nil end
|
||||
|
||||
|
@ -599,7 +573,7 @@ farming.register_plant = function(name, def)
|
|||
local def = minetest.registered_nodes[mname .. ":" .. pname .. "_1"]
|
||||
|
||||
if def then
|
||||
minetest.swap_node(pos, {name = def.next_plant, param2 = def.place_param2})
|
||||
minetest.set_node(pos, {name = def.name, param2 = def.place_param2})
|
||||
end
|
||||
end,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue