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 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. 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 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 -- Hades Plantslib mod
plantslib = {} hades_plantslib = {}
-- Set to true to spam console with debugging info (needs verbose debug level) -- Set to true to spam console with debugging info (needs verbose debug level)
local DEBUG = false local DEBUG = false
local function dbg(msg) local function dbg(msg)
if DEBUG then if DEBUG then
minetest.log("verbose", "[plants_lib] "..msg) minetest.log("verbose", "[hades_plantslib] "..msg)
end end
end end
@ -93,7 +93,7 @@ end
-- The spawning ABM -- The spawning ABM
function plantslib:spawn_on_surfaces(biome) function hades_plantslib.spawn_on_surfaces(biome)
if biome.spawn_delay*time_scale >= 1 then if biome.spawn_delay*time_scale >= 1 then
biome.interval = biome.spawn_delay*time_scale 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 -- Spawn vines
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn cave vines", label = "Spawn cave vines",
avoid_nodes = {"hades_vines:cave"}, avoid_nodes = {"hades_vines:cave"},
avoid_radius = 5, avoid_radius = 5,
@ -373,7 +373,7 @@ plantslib:spawn_on_surfaces({
spawn_on_bottom = true, spawn_on_bottom = true,
}) })
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn tropical vines", label = "Spawn tropical vines",
avoid_nodes = {"hades_vines:cave", "hades_vines:jungle"}, avoid_nodes = {"hades_vines:cave", "hades_vines:jungle"},
avoid_radius = 3, avoid_radius = 3,
@ -388,7 +388,7 @@ plantslib:spawn_on_surfaces({
near_nodes_count = 3, near_nodes_count = 3,
}) })
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn willow vines", label = "Spawn willow vines",
spawn_plants = {"hades_vines:willow"}, spawn_plants = {"hades_vines:willow"},
avoid_radius = 3, avoid_radius = 3,

View File

@ -1,2 +1,2 @@
name = hades_vines 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 end
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn waterlilies", label = "Spawn waterlilies",
spawn_delay = SPAWN_DELAY/2, spawn_delay = SPAWN_DELAY/2,
spawn_plants = { spawn_plants = {
@ -266,7 +266,7 @@ plantslib:spawn_on_surfaces({
}) })
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn seaweed on water", label = "Spawn seaweed on water",
spawn_delay = SPAWN_DELAY*2, spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"hades_waterplants:seaweed"}, spawn_plants = {"hades_waterplants:seaweed"},
@ -280,7 +280,7 @@ plantslib:spawn_on_surfaces({
facedir = 1 facedir = 1
}) })
plantslib:spawn_on_surfaces({ hades_plantslib.spawn_on_surfaces({
label = "Spawn seaweed on dirt with grass", label = "Spawn seaweed on dirt with grass",
spawn_delay = SPAWN_DELAY*2, spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"hades_waterplants:seaweed"}, spawn_plants = {"hades_waterplants:seaweed"},

View File

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

View File

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