Moved ferns "'module' loaded" asserts to top of files

This commit is contained in:
Craig Robbins 2014-08-22 17:07:27 +10:00 committed by Vanessa Ezekowitz
parent 6583cff894
commit d49a654914
4 changed files with 8 additions and 8 deletions

View File

@ -13,6 +13,8 @@
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1 -- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_lady_fern == true)
abstract_ferns.grow_fern = function(pos) abstract_ferns.grow_fern = function(pos)
local fern_size = math.random(1,4) local fern_size = math.random(1,4)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z} local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
@ -102,8 +104,6 @@ minetest.register_node("ferns:fern_01", {
-- Spawning -- Spawning
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_lady_fern == true)
if abstract_ferns.config.lady_ferns_near_tree == true then if abstract_ferns.config.lady_ferns_near_tree == true then
plantslib:register_generate_plant({ -- near trees (woodlands) plantslib:register_generate_plant({ -- near trees (woodlands)
surface = { surface = {

View File

@ -8,6 +8,8 @@
-- Supports: vines -- Supports: vines
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_giant_treefern == true)
-- lot of code, lot to load -- lot of code, lot to load
abstract_ferns.grow_giant_tree_fern = function(pos) abstract_ferns.grow_giant_tree_fern = function(pos)
@ -275,8 +277,6 @@ minetest.register_abm({
-- GENERATE GIANT TREE FERN -- GENERATE GIANT TREE FERN
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_giant_treefern == true)
-- in jungles -- in jungles
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
plantslib:register_generate_plant({ plantslib:register_generate_plant({

View File

@ -9,6 +9,8 @@
-- Supports: dryplants, stoneage, sumpf -- Supports: dryplants, stoneage, sumpf
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_horsetails == true)
abstract_ferns.grow_horsetail = function(pos) abstract_ferns.grow_horsetail = function(pos)
local horsetail_size = math.random(1,4) local horsetail_size = math.random(1,4)
if horsetail_size == 1 then if horsetail_size == 1 then
@ -125,8 +127,6 @@ end
-- Generating -- Generating
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_horsetails == true)
if abstract_ferns.config.enable_horsetails_on_grass == true then if abstract_ferns.config.enable_horsetails_on_grass == true then
plantslib:register_generate_plant({ plantslib:register_generate_plant({
surface = { surface = {

View File

@ -7,6 +7,8 @@
-- Looked at code from: default , trees -- Looked at code from: default , trees
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_treefern == true)
abstract_ferns.grow_tree_fern = function(pos) abstract_ferns.grow_tree_fern = function(pos)
local size = math.random(1,5) local size = math.random(1,5)
local crown = math.random(1,2) local crown = math.random(1,2)
@ -189,8 +191,6 @@ minetest.register_abm({
-- GENERATE TREE FERN -- GENERATE TREE FERN
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_treefern == true)
-- in jungles -- in jungles
if abstract_ferns.config.enable_treeferns_in_jungle == true then if abstract_ferns.config.enable_treeferns_in_jungle == true then
plantslib:register_generate_plant({ plantslib:register_generate_plant({