mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-22 20:43:43 +01:00
Allow per world configuration overrides
This commit is contained in:
parent
7eebc378a6
commit
5075cc48a4
@ -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 = {
|
||||
|
@ -17,7 +17,7 @@ when wearing a full matching set (helmet, chestplate, leggings and boots of the
|
||||
|
||||
Compatible with player skins [skins] by Zeg9 and Player Textures [player_textures] by PilzAdam.
|
||||
|
||||
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 or world directory.
|
||||
see armor.conf.example for all available options.
|
||||
|
||||
[mod] Visible Wielded Items [wieldview]
|
||||
|
Loading…
Reference in New Issue
Block a user