forked from mtcontrib/3d_armor
		
	Allow per world configuration overrides
This commit is contained in:
		| @@ -14,6 +14,8 @@ Overall level is boosted by 10% when wearing a full matching set. | ||||
| Configuration | ||||
| ------------- | ||||
|  | ||||
| Armor can be configured by adding a file called armor.conf in 3d_armor mod directory. | ||||
| Armor can be configured by adding a file called armor.conf in 3d_armor mod and/or world directory. | ||||
| see armor.conf.example for all available options. | ||||
|  | ||||
| Note: worldpath config settings override any settings made in the mod's directory. | ||||
|  | ||||
|   | ||||
| @@ -8,12 +8,20 @@ ARMOR_LEVEL_MULTIPLIER = 1 | ||||
| ARMOR_HEAL_MULTIPLIER = 1 | ||||
|  | ||||
| local modpath = minetest.get_modpath(ARMOR_MOD_NAME) | ||||
| local worldpath = minetest.get_worldpath() | ||||
| local input = io.open(modpath.."/armor.conf", "r") | ||||
| if input then | ||||
| 	dofile(modpath.."/armor.conf") | ||||
| 	input:close() | ||||
| 	input = nil | ||||
| end | ||||
| input = io.open(worldpath.."/armor.conf", "r") | ||||
| if input then | ||||
| 	dofile(worldpath.."/armor.conf") | ||||
| 	input:close() | ||||
| 	input = nil | ||||
| end | ||||
|  | ||||
| local time = 0 | ||||
|  | ||||
| armor = { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user