mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Allow age to override during initialization.
This commit is contained in:
parent
ccea673dcc
commit
bfff643ff4
1 changed files with 4 additions and 3 deletions
|
@ -277,9 +277,10 @@ function kelp.init_age(pos, age, pos_hash, meta)
|
||||||
local meta = meta or mt_get_meta(pos)
|
local meta = meta or mt_get_meta(pos)
|
||||||
|
|
||||||
local age = age
|
local age = age
|
||||||
if not meta:contains("mcl_ocean:kelp_age") then
|
if age then
|
||||||
-- NOTE: age param can only replace initial age roll.
|
kelp.store_age(age, pos, pos_hash)
|
||||||
age = age or kelp.roll_init_age()
|
elseif not meta:contains("mcl_ocean:kelp_age") then
|
||||||
|
age = kelp.roll_init_age()
|
||||||
kelp.store_age(age, pos, pos_hash)
|
kelp.store_age(age, pos, pos_hash)
|
||||||
else
|
else
|
||||||
age = meta:get_int("mcl_ocean:kelp_age")
|
age = meta:get_int("mcl_ocean:kelp_age")
|
||||||
|
|
Loading…
Reference in a new issue