Mod rename: plants_lib → hades_plantslib

master
Wuzzy 2021-09-27 21:06:34 +02:00
parent ed78c12ccd
commit b9f743557b
9 changed files with 16 additions and 17 deletions

View File

@ -1,4 +1,4 @@
This document describes the Hades Plantlife API.
This document describes the Hades Plantslib API.
=========
Functions

View File

@ -1,6 +1,5 @@
README file for Hades Plantlife mod
---------------------------------------------------
README file for Hades Plantslib mod
-----------------------------------
This mod is a simple framework for plant spawning for Hades Revisited.
It is an utility mod for other mods to use in order to spawn plants like

View File

@ -1,13 +1,13 @@
-- Hades Plantslib mod
plantslib = {}
hades_plantslib = {}
-- Set to true to spam console with debugging info (needs verbose debug level)
local DEBUG = false
local function dbg(msg)
if DEBUG then
minetest.log("verbose", "[plants_lib] "..msg)
minetest.log("verbose", "[hades_plantslib] "..msg)
end
end
@ -93,7 +93,7 @@ end
-- The spawning ABM
function plantslib:spawn_on_surfaces(biome)
function hades_plantslib.spawn_on_surfaces(biome)
if biome.spawn_delay*time_scale >= 1 then
biome.interval = biome.spawn_delay*time_scale

View File

@ -0,0 +1,2 @@
name = hades_plantslib
depends = hades_core

View File

@ -362,7 +362,7 @@ minetest.register_abm({
})
-- Spawn vines
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn cave vines",
avoid_nodes = {"hades_vines:cave"},
avoid_radius = 5,
@ -373,7 +373,7 @@ plantslib:spawn_on_surfaces({
spawn_on_bottom = true,
})
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn tropical vines",
avoid_nodes = {"hades_vines:cave", "hades_vines:jungle"},
avoid_radius = 3,
@ -388,7 +388,7 @@ plantslib:spawn_on_surfaces({
near_nodes_count = 3,
})
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn willow vines",
spawn_plants = {"hades_vines:willow"},
avoid_radius = 3,

View File

@ -1,2 +1,2 @@
name = hades_vines
depends = hades_sounds, hades_core, plants_lib
depends = hades_sounds, hades_core, hades_plantslib

View File

@ -243,7 +243,7 @@ for i in ipairs(seaweed_list) do
end
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn waterlilies",
spawn_delay = SPAWN_DELAY/2,
spawn_plants = {
@ -266,7 +266,7 @@ plantslib:spawn_on_surfaces({
})
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn seaweed on water",
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"hades_waterplants:seaweed"},
@ -280,7 +280,7 @@ plantslib:spawn_on_surfaces({
facedir = 1
})
plantslib:spawn_on_surfaces({
hades_plantslib.spawn_on_surfaces({
label = "Spawn seaweed on dirt with grass",
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"hades_waterplants:seaweed"},

View File

@ -1,3 +1,3 @@
name = hades_waterplants
depends = hades_sounds, plants_lib
depends = hades_sounds, hades_plantslib
optional_depends = screwdriver

View File

@ -1,2 +0,0 @@
name = plants_lib
depends = hades_core