mcl_farming make plantlist copy global and mcl_jukebox cleanup

Sorry, I forgot to commit between the 2 features :-(
This commit is contained in:
AFCMS 2021-03-11 23:39:26 +01:00
parent 6fd6717302
commit 1a60d08a37
4 changed files with 11 additions and 9 deletions

View file

@ -1,4 +1,6 @@
local plant_lists = {}
mcl_farming.plant_lists = {}
local plantlist = {}
local plant_nodename_to_id_list = {}
local function get_intervals_counter(pos, interval, chance)
@ -51,11 +53,12 @@ local function get_avg_light_level(pos)
end
function mcl_farming:add_plant(identifier, full_grown, names, interval, chance)
plant_lists[identifier] = {}
plant_lists[identifier].full_grown = full_grown
plant_lists[identifier].names = names
plant_lists[identifier].interval = interval
plant_lists[identifier].chance = chance
mcl_farming.plant_lists[identifier] = {}
mcl_farming.plant_lists[identifier].full_grown = full_grown
mcl_farming.plant_lists[identifier].names = names
mcl_farming.plant_lists[identifier].interval = interval
mcl_farming.plant_lists[identifier].chance = chance
plant_lists = mcl_farming.plant_lists
minetest.register_abm({
label = string.format("Farming plant growth (%s)", identifier),
nodenames = names,

View file

@ -1,2 +0,0 @@
mcl_core
mcl_sounds

View file

@ -1 +0,0 @@
Jukebox and music discs are used to play background music on a per-player basis.

View file

@ -1 +1,3 @@
name = mcl_jukebox
description = Jukebox and music discs are used to play background music on a per-player basis.
depends = mcl_core, mcl_sounds