Debug and basic stuff for prosthesis

This commit is contained in:
ZioPao
2023-11-10 18:01:03 +01:00
parent 7813d242e8
commit ca42c383d1
27 changed files with 69 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Left_LowerArm_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Left_LowerArm_Male</m_MaleModel>
<m_FemaleModel>Amputation_Left_LowerArm_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Left_LowerArm_Female</m_FemaleModel>
<m_GUID>d3816fe0-48e1-4cf5-a8e4-48c72595edb4</m_GUID> <m_GUID>d3816fe0-48e1-4cf5-a8e4-48c72595edb4</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Right_LowerArm_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Right_LowerArm_Male</m_MaleModel>
<m_FemaleModel>Amputation_Right_LowerArm_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Right_LowerArm_Female</m_FemaleModel>
<m_GUID>e6f80efd-22e5-49e0-8b24-537519d42b37</m_GUID> <m_GUID>e6f80efd-22e5-49e0-8b24-537519d42b37</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Left_Hand_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Left_Hand_Male</m_MaleModel>
<m_FemaleModel>Amputation_Left_Hand_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Left_Hand_Female</m_FemaleModel>
<m_GUID>2de93af2-b7a8-4c04-84d1-28d92cce8a0f</m_GUID> <m_GUID>2de93af2-b7a8-4c04-84d1-28d92cce8a0f</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -1,6 +1,6 @@
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Right_Hand_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Right_Hand_Male</m_MaleModel>
<m_FemaleModel>Amputation_Right_Hand_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Right_Hand_Female</m_FemaleModel>
<m_GUID>f114e53a-b92e-4639-8d8c-2b43ab981885</m_GUID> <m_GUID>f114e53a-b92e-4639-8d8c-2b43ab981885</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Left_UpperArm_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Left_UpperArm_Male</m_MaleModel>
<m_FemaleModel>Amputation_Left_UpperArm_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Left_UpperArm_Female</m_FemaleModel>
<m_GUID>646cafa5-3fa1-41af-9ca0-aa57cca3b36d</m_GUID> <m_GUID>646cafa5-3fa1-41af-9ca0-aa57cca3b36d</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<clothingItem> <clothingItem>
<m_MaleModel>Amputation_Right_UpperArm_Male</m_MaleModel> <m_MaleModel>Amputation\Amputation_Right_UpperArm_Male</m_MaleModel>
<m_FemaleModel>Amputation_Right_UpperArm_Female</m_FemaleModel> <m_FemaleModel>Amputation\Amputation_Right_UpperArm_Female</m_FemaleModel>
<m_GUID>db8ccad2-b76f-44bd-93ab-1eefa25beade</m_GUID> <m_GUID>db8ccad2-b76f-44bd-93ab-1eefa25beade</m_GUID>
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>

View File

@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<clothingItem>
<m_MaleModel>Prosthesis\hookArm_L_F</m_MaleModel>
<m_FemaleModel>Prosthesis\hookArm_L_F</m_FemaleModel>
<m_GUID>05338f5e-e984-49c2-be79-81af9ae8e818</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>metal_base</textureChoices>
<textureChoices>metal_base</textureChoices>
</clothingItem>

View File

@@ -26,4 +26,11 @@
<guid>646cafa5-3fa1-41af-9ca0-aa57cca3b36d</guid> <guid>646cafa5-3fa1-41af-9ca0-aa57cca3b36d</guid>
</files> </files>
<files>
<path>media/clothing/clothingItems/Prost_Hook_L.xml</path>
<guid>05338f5e-e984-49c2-be79-81af9ae8e818</guid>
</files>
</fileGuidTable> </fileGuidTable>

View File

@@ -1,10 +1,8 @@
local StaticData = require("TOC_StaticData") local StaticData = require("TOC_StaticData")
local CommonMethods = require("TOC_Common") local CommonMethods = require("TOC_Common")
local PlayerHandler = require("Handlers/TOC_PlayerHandler")
--------------------------- ---------------------------
--- Submodule to handle spawning the correct items after certain actions (ie: cutting a hand) --- Submodule to handle spawning the correct items after certain actions (ie: cutting a hand)
---@class ItemsHandler ---@class ItemsHandler
local ItemsHandler = {} local ItemsHandler = {}
@@ -87,7 +85,6 @@ function ItemsHandler.DeleteAllOldAmputationItems(playerObj)
end end
end end
---Spawns and equips the correct amputation item to the player. ---Spawns and equips the correct amputation item to the player.
function ItemsHandler.SpawnAmputationItem(playerObj, limbName) function ItemsHandler.SpawnAmputationItem(playerObj, limbName)
print("Clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName) print("Clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
@@ -110,6 +107,9 @@ function ISInventoryPane:refreshContainer()
-- Search into the container and remove the reference to the amputation item -- Search into the container and remove the reference to the amputation item
og_ISInventoryPane_refreshContainer(self) og_ISInventoryPane_refreshContainer(self)
if TOC_DEBUG.disablePaneMod then return end
for i=1, #self.itemslist do for i=1, #self.itemslist do
local cItem = self.itemslist[i] local cItem = self.itemslist[i]
if cItem and cItem.cat == "Amputation" then if cItem and cItem.cat == "Amputation" then

View File

@@ -0,0 +1,7 @@
TOC_DEBUG = {}
TOC_DEBUG.disablePaneMod = false
function TOC_DEBUG.togglePaneMod()
TOC_DEBUG.disablePaneMod = not TOC_DEBUG.disablePaneMod
end

View File

@@ -0,0 +1 @@
-- TODO Separate UI to craft prosthesis... No just use the crafting menu you mook

View File

@@ -14,3 +14,7 @@ end
AddBodyLocationBefore("TOC_ArmRight", "Shoes") AddBodyLocationBefore("TOC_ArmRight", "Shoes")
AddBodyLocationBefore("TOC_ArmLeft", "Shoes") AddBodyLocationBefore("TOC_ArmLeft", "Shoes")
AddBodyLocationBefore("TOC_ArmProstRight", "Shoes")
AddBodyLocationBefore("TOC_ArmProstLeft", "Shoes")

Binary file not shown.

View File

@@ -8,6 +8,7 @@ module TOC
item Amputation_Hand_R item Amputation_Hand_R
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation,
DisplayName = Amputated right hand, DisplayName = Amputated right hand,
ClothingItem = Amputation_Hand_R, ClothingItem = Amputation_Hand_R,
@@ -27,6 +28,7 @@ module TOC
item Amputation_ForeArm_R item Amputation_ForeArm_R
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation,
DisplayName = Amputated right forearm, DisplayName = Amputated right forearm,
ClothingItem = Amputation_ForeArm_R, ClothingItem = Amputation_ForeArm_R,
@@ -45,6 +47,7 @@ module TOC
item Amputation_UpperArm_R item Amputation_UpperArm_R
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation,
DisplayName = Amputated entire right arm, DisplayName = Amputated entire right arm,
ClothingItem = Amputation_UpperArm_R, ClothingItem = Amputation_UpperArm_R,
@@ -62,6 +65,7 @@ module TOC
item Amputation_Hand_L item Amputation_Hand_L
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation,
DisplayName = Amputated left hand, DisplayName = Amputated left hand,
ClothingItem = Amputation_Hand_L, ClothingItem = Amputation_Hand_L,
@@ -100,10 +104,30 @@ module TOC
item Amputation_UpperArm_L item Amputation_UpperArm_L
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation,
DisplayName = Amputated entire left arm, DisplayName = Amputated entire left arm,
ClothingItem = Amputation_UpperArm_L, ClothingItem = Amputation_UpperArm_L,
BodyLocation = TOC_ArmLeft, BodyLocation = TOC_ArmLeft,
Weight = 0,
CombatSpeedModifier = 0.7,
BloodLocation = UpperArms;UpperBody,
Insulation = 1.0,
WindResistance = 1.0,
WaterResistance = 1.0,
Icon = genericAmputation,
CanHaveHoles = false,
}
/****************** Clothing that look like a cut limb ******************/
item Prosthesis_Hook_L
{
Type = Clothing,
DisplayCategory = Prosthesis,
DisplayName = Hook Arm Test,
ClothingItem = Prost_Hook_L,
BodyLocation = TOC_ArmProstLeft,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.7, CombatSpeedModifier = 0.7,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB