Disabled mod options for good, for now

This commit is contained in:
Pao
2023-01-28 02:19:28 +01:00
parent 3ac3104e66
commit 8eec7c76fb
2 changed files with 41 additions and 35 deletions

View File

@@ -1,51 +1,55 @@
--Default options. -- --Default options.
local options = { -- local options = {
roll_up_sleeves_on_amputated_limbs = true, -- roll_up_sleeves_on_amputated_limbs = true,
} -- }
--https://steamcommunity.com/workshop/filedetails/discussion/2169435993/4260919351480715709/#c4260919351482087243 --https://steamcommunity.com/workshop/filedetails/discussion/2169435993/4260919351480715709/#c4260919351482087243
-- Connecting the options to the menu, so user can change them. -- -- Connecting the options to the menu, so user can change them.
if ModOptions and ModOptions.getInstance then -- if ModOptions and ModOptions.getInstance then
print("TOC: Found ModOptions, loading it") -- print("TOC: Found ModOptions, loading it")
local settings = ModOptions:getInstance(options, "Amputation2", "The Only Cure but better") -- local settings = ModOptions:getInstance(options, "Amputation2", "The Only Cure but better")
ModOptions:loadFile()
settings.names = {
roll_up_sleeves_on_amputated_limbs = "Roll up jacket sleeves for amputated limbs",
} -- -- FIXME this stuff breaks everything, it's a no go for now
-- settings.names = {
-- roll_up_sleeves_on_amputated_limbs = "Roll up jacket sleeves for amputated limbs",
-- }
-- ModOptions:loadFile()
local roll_up_sleeves = settings:getData("roll_up_sleeves_on_amputated_limbs") -- local roll_up_sleeves = settings:getData("roll_up_sleeves_on_amputated_limbs")
print("TOC: Rolling up sleeves => " .. tostring(options.roll_up_sleeves_on_amputated_limbs)) -- print("TOC: Rolling up sleeves => " .. tostring(options.roll_up_sleeves_on_amputated_limbs))
-- Run it now since we're in the menu, presumably -- -- Run it now since we're in the menu, presumably
TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs) -- TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs)
function roll_up_sleeves:OnApply(val) -- function roll_up_sleeves:OnApply(val)
self:resetLua() -- self:resetLua()
end -- end
local function TocOnResetLua(reason) -- local function TocOnResetLua(reason)
print("TOC: OnResetLua running TocSetSleeves") -- print("TOC: OnResetLua running TocSetSleeves")
TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs) -- TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs)
end -- end
Events.OnResetLua.Add(TocOnResetLua) -- Events.OnResetLua.Add(TocOnResetLua)
else -- else
------------------- -- -------------------
-- DEFAULT SETTINGS -- -- DEFAULT SETTINGS
------------------ -- ------------------
-- TODO Test this when mod options is not installed -- -- TODO Test this when mod options is not installed
TocSetSleeves(false) --
end -- end
--Make a link -- --Make a link
TOC_Options = {} -- TOC_Options = {}
TOC_Options = options -- TOC_Options = options

View File

@@ -38,6 +38,7 @@ local function addBodyLocationBefore(newLocation, movetoLocation)
function TocSetSleeves(check) function TocSetSleeves(check)
-- TODO this is stuck to true for now, it's just too broken to change it mid game
local group = BodyLocations.getGroup("Human") local group = BodyLocations.getGroup("Human")
if check then if check then
print("TOC: Rolling up sleeves") print("TOC: Rolling up sleeves")
@@ -56,3 +57,4 @@ function TocSetSleeves(check)
end end
end end
TocSetSleeves(true)