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",
}
local roll_up_sleeves = settings:getData("roll_up_sleeves_on_amputated_limbs") -- -- FIXME this stuff breaks everything, it's a no go for now
print("TOC: Rolling up sleeves => " .. tostring(options.roll_up_sleeves_on_amputated_limbs))
-- Run it now since we're in the menu, presumably -- settings.names = {
TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs) -- roll_up_sleeves_on_amputated_limbs = "Roll up jacket sleeves for amputated limbs",
-- }
function roll_up_sleeves:OnApply(val)
self:resetLua()
end
local function TocOnResetLua(reason) -- ModOptions:loadFile()
print("TOC: OnResetLua running TocSetSleeves") -- local roll_up_sleeves = settings:getData("roll_up_sleeves_on_amputated_limbs")
TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs)
end -- print("TOC: Rolling up sleeves => " .. tostring(options.roll_up_sleeves_on_amputated_limbs))
Events.OnResetLua.Add(TocOnResetLua)
else
-------------------
-- DEFAULT SETTINGS
------------------
-- TODO Test this when mod options is not installed
TocSetSleeves(false)
end -- -- Run it now since we're in the menu, presumably
-- TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs)
--Make a link -- function roll_up_sleeves:OnApply(val)
TOC_Options = {} -- self:resetLua()
TOC_Options = options -- end
-- local function TocOnResetLua(reason)
-- print("TOC: OnResetLua running TocSetSleeves")
-- TocSetSleeves(options.roll_up_sleeves_on_amputated_limbs)
-- end
-- Events.OnResetLua.Add(TocOnResetLua)
-- else
-- -------------------
-- -- DEFAULT SETTINGS
-- ------------------
-- -- TODO Test this when mod options is not installed
--
-- end
-- --Make a link
-- TOC_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)