Divergent/mods/Mutant Loot Chance/gamedata/scripts/zzz_cxv_mutant_loot_mcm.script

33 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

defaults = {
["enable_mod"] = false,
["mutant_part_chance_mult"] = 1,
["mutant_meat_chance_mult"] = 1,
["mutant_pelt_chance_mult"] = 1,
["mutant_other_chance_mult"] = 1,
["always_give_parts"] = false,
["always_give_meat"] = false,
["always_give_pelt"] = false,
["failsafe_loot"] = false,
}
function get_config(key)
if ui_mcm then return ui_mcm.get("mutant_loot_config/"..key) else return defaults[key] end
end
function on_mcm_load()
local options = {
id = "mutant_loot_config", sh = true, gr = {
{ id = "title", type = "slide", link = "ui_options_slider_player", text = "ui_mcm_mutant_loot_config_title", size = { 512, 50 }, spacing = 20 },
{id = "enable_mod", type = "check", val = 1, def = false},
{ id = "always_give_parts", type = "check", val = 1, def = false},
{ id = "mutant_part_chance_mult", type = "track", val = 2, min = 1, max = 5, step = 0.1, def = 1 },
{ id = "always_give_meat", type = "check", val = 1, def = false},
{ id = "mutant_meat_chance_mult", type = "track", val = 2, min = 1, max = 5, step = 0.1, def = 1 },
{ id = "always_give_pelt", type = "check", val = 1, def = false},
{ id = "mutant_pelt_chance_mult", type = "track", val = 2, min = 1, max = 5, step = 0.1, def = 1 },
{ id = "mutant_other_chance_mult", type = "track", val = 2, min = 1, max = 3, step = 0.1, def = 1 },
{id = "failsafe_loot", type = "check", val = 1, def = false},
}
}
return options
end