Make armor elixirs optional.
This commit is contained in:
parent
abffeb54d9
commit
c5357b51fc
4 changed files with 34 additions and 28 deletions
2
abms.lua
2
abms.lua
|
@ -125,7 +125,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
player:set_hp(20)
|
player:set_hp(20)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if fun_caves.armor_expire and fun_caves.armor_expire[player_name] and fun_caves.armor_expire[player_name] < time then
|
if fun_caves.elixir_armor and fun_caves.armor_expire and fun_caves.armor_expire[player_name] and fun_caves.armor_expire[player_name] < time then
|
||||||
player:set_armor_groups({fleshy=100})
|
player:set_armor_groups({fleshy=100})
|
||||||
minetest.chat_send_player(player_name, minetest.colorize('#FF0000', 'Your skin feels softer...'))
|
minetest.chat_send_player(player_name, minetest.colorize('#FF0000', 'Your skin feels softer...'))
|
||||||
fun_caves.armor_expire[player_name] = nil
|
fun_caves.armor_expire[player_name] = nil
|
||||||
|
|
|
@ -23,7 +23,8 @@ local descs = {
|
||||||
--{'adamant', 0.1, 'fun_caves:adamant'},
|
--{'adamant', 0.1, 'fun_caves:adamant'},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, desc in pairs(descs) do
|
if fun_caves.elixir_armor then
|
||||||
|
for _, desc in pairs(descs) do
|
||||||
local name = desc[1]
|
local name = desc[1]
|
||||||
local value = desc[2]
|
local value = desc[2]
|
||||||
local cap = name:gsub('^%l', string.upper)
|
local cap = name:gsub('^%l', string.upper)
|
||||||
|
@ -51,4 +52,5 @@ for _, desc in pairs(descs) do
|
||||||
"vessels:glass_bottle",
|
"vessels:glass_bottle",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
1
init.lua
1
init.lua
|
@ -5,6 +5,7 @@ fun_caves.light_max = 8 -- light intensity for mushroom growth
|
||||||
fun_caves.path = minetest.get_modpath(minetest.get_current_modname())
|
fun_caves.path = minetest.get_modpath(minetest.get_current_modname())
|
||||||
fun_caves.world = minetest.get_worldpath()
|
fun_caves.world = minetest.get_worldpath()
|
||||||
fun_caves.DEBUG = false -- for maintenance only
|
fun_caves.DEBUG = false -- for maintenance only
|
||||||
|
fun_caves.elixir_armor = minetest.setting_getbool('fun_caves_use_armor_elixirs')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
3
settingtypes.txt
Normal file
3
settingtypes.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# New players are randomely spawned by the mod
|
||||||
|
# disable it to spawn the player another way.
|
||||||
|
fun_caves_use_armor_elixirs (Use Armor Elixirs) bool false
|
Loading…
Add table
Add a link
Reference in a new issue