mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
mcl_farming make plantlist copy global and mcl_jukebox cleanup
Sorry, I forgot to commit between the 2 features :-(
This commit is contained in:
parent
6fd6717302
commit
1a60d08a37
4 changed files with 11 additions and 9 deletions
|
@ -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,
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
mcl_core
|
||||
mcl_sounds
|
|
@ -1 +0,0 @@
|
|||
Jukebox and music discs are used to play background music on a per-player basis.
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue