mirror of
				https://github.com/minetest-mods/mesecons.git
				synced 2025-11-04 04:55:26 +01:00 
			
		
		
		
	Fix #234
This commit is contained in:
		@@ -1,7 +1,12 @@
 | 
			
		||||
-- SETTINGS
 | 
			
		||||
function mesecon.setting(setting, default)
 | 
			
		||||
	if type(default) == "bool" then
 | 
			
		||||
		return minetest.setting_getbool("mesecon."..setting) or default
 | 
			
		||||
	if type(default) == "boolean" then
 | 
			
		||||
		local read = minetest.setting_getbool("mesecon."..setting)
 | 
			
		||||
		if read == nil then
 | 
			
		||||
			return default
 | 
			
		||||
		else
 | 
			
		||||
			return read
 | 
			
		||||
		end
 | 
			
		||||
	elseif type(default) == "string" then
 | 
			
		||||
		return minetest.setting_get("mesecon."..setting) or default
 | 
			
		||||
	elseif type(default) == "number" then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user