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:
@@ -6,5 +6,6 @@
|
|||||||
<m_Static>false</m_Static>
|
<m_Static>false</m_Static>
|
||||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||||
|
<m_Masks>4</m_Masks>
|
||||||
<textureChoices>Clothes\metal</textureChoices>
|
<textureChoices>Clothes\metal</textureChoices>
|
||||||
</clothingItem>
|
</clothingItem>
|
||||||
@@ -1,14 +1,52 @@
|
|||||||
--Default options.
|
--Default options.
|
||||||
local options = {
|
local options = {
|
||||||
box1 = true,
|
roll_up_sleeves_on_amputated_limbs = true,
|
||||||
box2 = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--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
|
||||||
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
|
end
|
||||||
|
|
||||||
--Make a link
|
--Make a link
|
||||||
TOC_Options = {}
|
TOC_Options = {}
|
||||||
TOC_Options = options
|
TOC_Options = options
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
local options = TOC_Options
|
local options = TOC_Options
|
||||||
|
|
||||||
|
-- TODO Can't trigger OnGameBoot from here since it's client only
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Check actual options at game loading.
|
-- Check actual options at game loading.
|
||||||
Events.OnGameStart.Add(function()
|
Events.OnGameStart.Add(function()
|
||||||
if not isClient() then -- only host may take these options
|
if not isClient() then -- only host may take these options
|
||||||
print("checkbox1 = ", options.box1)
|
print("Roll up sleeves for amputated limbs = ", options.rollUpSleeveForAmputatedLimbs)
|
||||||
print("checkbox2 = ", options.box2)
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,53 @@
|
|||||||
|
|
||||||
-- Locations must be declared in render-order.
|
-- Locations must be declared in render-order.
|
||||||
-- Location IDs must match BodyLocation= and CanBeEquipped= values in items.txt.
|
-- Location IDs must match BodyLocation= and CanBeEquipped= values in items.txt.
|
||||||
local group = BodyLocations.getGroup("Human")
|
|
||||||
|
-- FullBody 1
|
||||||
|
-- BodyCostume 2
|
||||||
|
-- FullHat 3
|
||||||
|
-- Hat 4
|
||||||
|
-- MakeUp 5
|
||||||
|
-- Mask 6
|
||||||
|
-- JacketHat 7
|
||||||
|
-- Jacket 8
|
||||||
|
-- Shirt 9
|
||||||
|
-- Sweater 10
|
||||||
|
-- TankTop 11
|
||||||
|
-- TorsoExtra 12
|
||||||
|
-- Hands 13
|
||||||
|
-- Neck 14
|
||||||
|
-- Scarf 15
|
||||||
|
-- Pants 16
|
||||||
|
-- Shorts 17
|
||||||
|
-- Underwear 18
|
||||||
|
-- Shoes 19
|
||||||
|
-- None 20
|
||||||
|
|
||||||
|
local function addBodyLocationBefore(newLocation, movetoLocation)
|
||||||
|
local group = BodyLocations.getGroup("Human")
|
||||||
|
local list = getClassFieldVal(group, getClassField(group, 1))
|
||||||
|
group:getOrCreateLocation(newLocation)
|
||||||
|
local newItem = list:get(list:size()-1)
|
||||||
|
list:remove(list:size()-1)
|
||||||
|
local i = group:indexOf(movetoLocation)
|
||||||
|
list:add(i, newItem)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- TODO Change these names too, jesus they suck so bad
|
function TocSetSleeves(check)
|
||||||
group:getOrCreateLocation("ArmRight")
|
local group = BodyLocations.getGroup("Human")
|
||||||
group:getOrCreateLocation("ArmLeft")
|
if check then
|
||||||
group:getOrCreateLocation("LegRight")
|
print("TOC: Rolling up sleeves")
|
||||||
group:getOrCreateLocation("LegLeft")
|
group:getOrCreateLocation("ArmRight")
|
||||||
group:getOrCreateLocation("ArmRight_Prot")
|
group:getOrCreateLocation("ArmLeft")
|
||||||
group:getOrCreateLocation("ArmLeft_Prot")
|
group:getOrCreateLocation("ArmRight_Prot")
|
||||||
|
group:getOrCreateLocation("ArmLeft_Prot")
|
||||||
|
else
|
||||||
|
print("TOC: Won't roll up sleeve")
|
||||||
|
addBodyLocationBefore("ArmRight", "Jacket")
|
||||||
|
addBodyLocationBefore("ArmLeft", "Jacket")
|
||||||
|
addBodyLocationBefore("ArmRight_Prot", "Shoes")
|
||||||
|
addBodyLocationBefore("ArmLeft_Prot", "Shoes")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,6 @@ IGUI_EN = {
|
|||||||
IGUI_perks_Right_Hand = "Right hand",
|
IGUI_perks_Right_Hand = "Right hand",
|
||||||
IGUI_perks_Left_Hand = "Left hand",
|
IGUI_perks_Left_Hand = "Left hand",
|
||||||
IGUI_perks_Prosthesis = "Prosthesis skills",
|
IGUI_perks_Prosthesis = "Prosthesis skills",
|
||||||
|
|
||||||
|
IGUI_TOC_RollUpSleeveForAmputatedLimbs = "Roll up sleeves for amputated limbs"
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
2
mod.info
2
mod.info
@@ -2,7 +2,7 @@ name=The only cure but better
|
|||||||
poster=generic.png
|
poster=generic.png
|
||||||
require=UIAPI
|
require=UIAPI
|
||||||
description=Cut your arm and survive. TEST PAO
|
description=Cut your arm and survive. TEST PAO
|
||||||
id=Amputation3
|
id=Amputation2
|
||||||
icon=icon.png
|
icon=icon.png
|
||||||
url=xx
|
url=xx
|
||||||
modversion=0.4.1
|
modversion=0.4.1
|
||||||
|
|||||||
BIN
models_stuff/RIGHT_forearm_hook_male.blend
Normal file
BIN
models_stuff/RIGHT_forearm_hook_male.blend
Normal file
Binary file not shown.
BIN
models_stuff/left_forearm_hook_male.blend
Normal file
BIN
models_stuff/left_forearm_hook_male.blend
Normal file
Binary file not shown.
BIN
models_stuff/left_forearm_hook_male.blend1
Normal file
BIN
models_stuff/left_forearm_hook_male.blend1
Normal file
Binary file not shown.
Reference in New Issue
Block a user