Split the actual API code into a separate file from init.lua

This commit is contained in:
Vanessa Dannenberg
2021-04-20 17:56:43 -04:00
parent 5148cca1b7
commit 76b5046009
3 changed files with 792 additions and 798 deletions

View File

@ -1,5 +1,3 @@
local time_scale = ...
-- The growing ABM
function biome_lib.check_surface(name, nodes)
@ -34,8 +32,8 @@ function biome_lib.update_plant(opts)
options.label = options.label or "biome_lib.update_plant(): "..n
if options.grow_delay*time_scale >= 1 then
options.interval = options.grow_delay*time_scale
if options.grow_delay*biome_lib.time_scale >= 1 then
options.interval = options.grow_delay*biome_lib.time_scale
else
options.interval = 1
end