mirror of
				https://github.com/mt-mods/moretrees.git
				synced 2025-11-04 07:25:30 +01:00 
			
		
		
		
	Use new setting functions
This commit is contained in:
		
							
								
								
									
										9
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								init.lua
									
									
									
									
									
								
							@@ -2,13 +2,13 @@
 | 
			
		||||
--
 | 
			
		||||
-- This mod adds more types of trees to the game
 | 
			
		||||
--
 | 
			
		||||
-- Some of the node definitions and textures came from cisoun's conifers mod 
 | 
			
		||||
-- Some of the node definitions and textures came from cisoun's conifers mod
 | 
			
		||||
-- and bas080's jungle trees mod.
 | 
			
		||||
--
 | 
			
		||||
-- Brought together into one mod and made L-systems compatible by Vanessa
 | 
			
		||||
-- Ezekowitz.
 | 
			
		||||
--
 | 
			
		||||
-- Firs and Jungle tree axioms/rules by Vanessa Ezekowitz, with the 
 | 
			
		||||
-- Firs and Jungle tree axioms/rules by Vanessa Ezekowitz, with the
 | 
			
		||||
-- latter having been tweaked by RealBadAngel, most other axioms/rules written
 | 
			
		||||
-- by RealBadAngel.
 | 
			
		||||
--
 | 
			
		||||
@@ -51,7 +51,8 @@ end
 | 
			
		||||
 | 
			
		||||
-- infinite stacks checking
 | 
			
		||||
 | 
			
		||||
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
 | 
			
		||||
if minetest.get_modpath"unified_inventory"
 | 
			
		||||
or not minetest.settings:get_bool"creative_mode" then
 | 
			
		||||
	moretrees.expect_infinite_stacks = false
 | 
			
		||||
else
 | 
			
		||||
	moretrees.expect_infinite_stacks = true
 | 
			
		||||
@@ -224,7 +225,7 @@ function moretrees.grow_jungletree(pos)
 | 
			
		||||
	local r2 = math.random(3)
 | 
			
		||||
	if r1 == 1 then
 | 
			
		||||
		moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_red"
 | 
			
		||||
	else 
 | 
			
		||||
	else
 | 
			
		||||
		moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_yellow"
 | 
			
		||||
	end
 | 
			
		||||
	moretrees.jungletree_model.leaves2_chance = math.random(25, 75)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user