diff --git a/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml
index 74501da..940459c 100644
--- a/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml
+++ b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml
@@ -6,5 +6,6 @@
false
false
false
+ 4
Clothes\metal
\ No newline at end of file
diff --git a/media/lua/client/TOC_ClientOptions.lua b/media/lua/client/TOC_ClientOptions.lua
index 29e84e1..eff2f17 100644
--- a/media/lua/client/TOC_ClientOptions.lua
+++ b/media/lua/client/TOC_ClientOptions.lua
@@ -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
+
diff --git a/media/lua/client/TOC_Visuals.lua b/media/lua/client/TOC_Visuals.lua
index c2c0c9c..ebb589f 100644
--- a/media/lua/client/TOC_Visuals.lua
+++ b/media/lua/client/TOC_Visuals.lua
@@ -29,4 +29,4 @@ function TocSetBloodOnAmputation(player, body_part)
player:addBlood(blood_body_part_type, false, true, false)
player:addBlood(BloodBodyPartType.Torso_Lower, false, true, false)
-end
+end
\ No newline at end of file
diff --git a/media/lua/server/TOC_ServerOptions.lua b/media/lua/server/TOC_ServerOptions.lua
index 092958c..7f6c212 100644
--- a/media/lua/server/TOC_ServerOptions.lua
+++ b/media/lua/server/TOC_ServerOptions.lua
@@ -1,9 +1,17 @@
local options = TOC_Options
+-- TODO Can't trigger OnGameBoot from here since it's client only
+
+
+
-- Check actual options at game loading.
Events.OnGameStart.Add(function()
if not isClient() then -- only host may take these options
- print("checkbox1 = ", options.box1)
- print("checkbox2 = ", options.box2)
+ print("Roll up sleeves for amputated limbs = ", options.rollUpSleeveForAmputatedLimbs)
+
+
+
end
end)
+
+
diff --git a/media/lua/shared/NPCs/ExtraBodyLocations.lua b/media/lua/shared/NPCs/ExtraBodyLocations.lua
index 5fad650..58a9175 100644
--- a/media/lua/shared/NPCs/ExtraBodyLocations.lua
+++ b/media/lua/shared/NPCs/ExtraBodyLocations.lua
@@ -4,13 +4,53 @@
-- Locations must be declared in render-order.
-- 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
-group:getOrCreateLocation("ArmRight")
-group:getOrCreateLocation("ArmLeft")
-group:getOrCreateLocation("LegRight")
-group:getOrCreateLocation("LegLeft")
-group:getOrCreateLocation("ArmRight_Prot")
-group:getOrCreateLocation("ArmLeft_Prot")
\ No newline at end of file
+function TocSetSleeves(check)
+ local group = BodyLocations.getGroup("Human")
+ if check then
+ print("TOC: Rolling up sleeves")
+ group:getOrCreateLocation("ArmRight")
+ group:getOrCreateLocation("ArmLeft")
+ 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
+
diff --git a/media/lua/shared/translate/EN/IG_UI_EN.txt b/media/lua/shared/translate/EN/IG_UI_EN.txt
index df73531..83faacc 100644
--- a/media/lua/shared/translate/EN/IG_UI_EN.txt
+++ b/media/lua/shared/translate/EN/IG_UI_EN.txt
@@ -5,4 +5,6 @@ IGUI_EN = {
IGUI_perks_Right_Hand = "Right hand",
IGUI_perks_Left_Hand = "Left hand",
IGUI_perks_Prosthesis = "Prosthesis skills",
+
+ IGUI_TOC_RollUpSleeveForAmputatedLimbs = "Roll up sleeves for amputated limbs"
}
\ No newline at end of file
diff --git a/media/models_X/Prost_Left_LowerArm_Hook_Male.fbx b/media/models_X/Prost_Left_LowerArm_Hook_Male.fbx
index 93304a2..f00f0a7 100644
Binary files a/media/models_X/Prost_Left_LowerArm_Hook_Male.fbx and b/media/models_X/Prost_Left_LowerArm_Hook_Male.fbx differ
diff --git a/media/models_X/Prost_Right_LowerArm_Hook_Male.fbx b/media/models_X/Prost_Right_LowerArm_Hook_Male.fbx
index 057b4d9..3fceff5 100644
Binary files a/media/models_X/Prost_Right_LowerArm_Hook_Male.fbx and b/media/models_X/Prost_Right_LowerArm_Hook_Male.fbx differ
diff --git a/mod.info b/mod.info
index 948e140..055a668 100644
--- a/mod.info
+++ b/mod.info
@@ -1,8 +1,8 @@
name=The only cure but better
poster=generic.png
require=UIAPI
-description=Cut your arm and survive. TEST PAO
-id=Amputation3
+description=Cut your arm and survive. TEST PAO
+id=Amputation2
icon=icon.png
url=xx
modversion=0.4.1
diff --git a/models_stuff/RIGHT_forearm_hook_male.blend b/models_stuff/RIGHT_forearm_hook_male.blend
new file mode 100644
index 0000000..3f0b7c3
Binary files /dev/null and b/models_stuff/RIGHT_forearm_hook_male.blend differ
diff --git a/models_stuff/left_forearm_hook_male.blend b/models_stuff/left_forearm_hook_male.blend
new file mode 100644
index 0000000..7e072f8
Binary files /dev/null and b/models_stuff/left_forearm_hook_male.blend differ
diff --git a/models_stuff/left_forearm_hook_male.blend1 b/models_stuff/left_forearm_hook_male.blend1
new file mode 100644
index 0000000..767eef2
Binary files /dev/null and b/models_stuff/left_forearm_hook_male.blend1 differ