Some new features

- Modified meshes for equippable prosthesis so they don't clip with jackets
- ModOptions option to set sleeves up when you've got an amputation
This commit is contained in:
Pao
2023-01-27 18:10:30 +01:00
parent af85135fb6
commit a9267a7afc
12 changed files with 105 additions and 16 deletions

View File

@@ -1,14 +1,52 @@
--Default options.
local options = {
box1 = true,
box2 = false
roll_up_sleeves_on_amputated_limbs = true,
}
--https://steamcommunity.com/workshop/filedetails/discussion/2169435993/4260919351480715709/#c4260919351482087243
-- Connecting the options to the menu, so user can change them.
if ModOptions and ModOptions.getInstance then
ModOptions:getInstance(options, "Amputation2", "The Only Cure but better")
print("TOC: Found ModOptions, loading it")
local settings = ModOptions:getInstance(options, "Amputation2", "The Only Cure but better")
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")
function roll_up_sleeves:OnApply(val)
self:resetLua()
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
TocSetSleeves(false)
end
--Make a link
TOC_Options = {}
TOC_Options = options