Somes fixes, blood on limbs\prosthetics, new textures
This commit is contained in:
@@ -99,4 +99,21 @@ function CheckIfItemIsAmputatedLimb(item)
|
|||||||
|
|
||||||
return is_amputated_limb
|
return is_amputated_limb
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function CheckIfItemIsProsthesis(item)
|
||||||
|
local item_full_type = item:getFullType()
|
||||||
|
local prosthesis_list = GetProsthesisList()
|
||||||
|
--return (item_full_type == "TOC.WoodenHook" or item_full_type == "TOC.MetalHook" or item_full_type == "TOC.MetalHand")
|
||||||
|
local check = prosthesis_list[item_full_type]
|
||||||
|
return check
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function CheckIfItemIsInstalledProsthesis(item)
|
||||||
|
local item_full_type = item:getFullType()
|
||||||
|
local installable_prosthesis_list = GetInstallableProsthesisList()
|
||||||
|
local check = installable_prosthesis_list[item_full_type]
|
||||||
|
return check
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -53,15 +53,16 @@ function ISUninstallProsthesis:perform()
|
|||||||
if self.bodyPart:getType() == v then
|
if self.bodyPart:getType() == v then
|
||||||
local part_name = FindTocBodyPartNameFromBodyPartType(v)
|
local part_name = FindTocBodyPartNameFromBodyPartType(v)
|
||||||
|
|
||||||
|
print("Found prost in " .. part_name)
|
||||||
if part_name then
|
if part_name then
|
||||||
toc_data[part_name].is_prosthesis_equipped = false
|
toc_data[part_name].is_prosthesis_equipped = false
|
||||||
toc_data[part_name].prosthesis_factor = 1
|
toc_data[part_name].prosthesis_factor = 1
|
||||||
|
|
||||||
--local side = string.gsub(part_name, "Hand" or "Forearm", "")
|
--local side = string.gsub(part_name, "Hand" or "Forearm", "")
|
||||||
|
local item_full_type = self.item:getFullType()
|
||||||
|
print("Searching for " .. item_full_type)
|
||||||
for _, prost_v in ipairs(GetProsthesisList()) do
|
for _, prost_v in ipairs(GetProsthesisList()) do
|
||||||
local prosthesis_name = string.match(self.item:getName(), prost_v)
|
local prosthesis_name = string.match(item_full_type, prost_v)
|
||||||
|
|
||||||
if prosthesis_name then
|
if prosthesis_name then
|
||||||
self.character:getInventory():AddItem(prosthesis_name)
|
self.character:getInventory():AddItem(prosthesis_name)
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ end
|
|||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
|
||||||
|
-- TODO override equip action
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local og_ISUnequipActionPerform = ISUnequipAction.perform
|
local og_ISUnequipActionPerform = ISUnequipAction.perform
|
||||||
|
|
||||||
function ISUnequipAction:perform()
|
function ISUnequipAction:perform()
|
||||||
@@ -126,12 +131,17 @@ function ISUnequipAction:perform()
|
|||||||
-- -- end
|
-- -- end
|
||||||
-- -- end
|
-- -- end
|
||||||
|
|
||||||
|
if CheckIfItemIsAmputatedLimb(self.item) == false and CheckIfItemIsInstalledProsthesis(self.item) == false then
|
||||||
|
|
||||||
if not CheckIfItemIsAmputatedLimb(self.item) then
|
|
||||||
og_ISUnequipActionPerform(self)
|
og_ISUnequipActionPerform(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- if not CheckIfItemIsAmputatedLimb(self.item) then
|
||||||
|
-- og_ISUnequipActionPerform(self)
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- if CheckIfItemIsInstalledProsthesis(self.item) then
|
||||||
|
-- og_ISUnequipActionPerform(self)
|
||||||
|
-- end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -140,11 +150,14 @@ local og_ISDropItemActionPerform = ISDropItemAction.perform
|
|||||||
|
|
||||||
function ISDropItemAction:perform()
|
function ISDropItemAction:perform()
|
||||||
|
|
||||||
if not CheckIfItemIsAmputatedLimb(self.item) then
|
if not CheckIfItemIsAmputatedLimb(self.item)then
|
||||||
og_ISDropItemActionPerform(self)
|
og_ISDropItemActionPerform(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
-- TODO Add "Clean Wound" to make the cicatrization faster
|
-- TODO Add "Clean Wound" to make the cicatrization faster
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,37 @@ end
|
|||||||
function GetProsthesisList()
|
function GetProsthesisList()
|
||||||
return {"TOC.WoodenHook", "TOC.MetalHook", "TOC.MetalHand"}
|
return {"TOC.WoodenHook", "TOC.MetalHook", "TOC.MetalHand"}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function GetInstallableProsthesisList()
|
||||||
|
|
||||||
|
|
||||||
|
-- To make it future proff since i'm gonna add stuff, let's cycle through already known prosthesis
|
||||||
|
local prosthesis_list = GetProsthesisList()
|
||||||
|
|
||||||
|
local sides = {"right", "left"}
|
||||||
|
local body_parts = {"Hand", "Forearm", "Arm"}
|
||||||
|
local installed_prosthesis_list = {}
|
||||||
|
|
||||||
|
for _, side in pairs(sides) do
|
||||||
|
for _, prost in pairs(prosthesis_list) do
|
||||||
|
for _, body_part in pairs(body_parts) do
|
||||||
|
local installable_prost = prost .. "_" .. side .. "_no" .. body_part
|
||||||
|
table.insert(installed_prosthesis_list, installable_prost)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return installed_prosthesis_list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function GetLimbsBodyPartTypes()
|
function GetLimbsBodyPartTypes()
|
||||||
|
|||||||
@@ -149,10 +149,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1,
|
Weight = 1,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_woodenHook,*/
|
DisplayName = DisplayName_woodenHook,
|
||||||
ClothingItem = ArmRight_WoodenHook,
|
ClothingItem = ArmRight_WoodenHook,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = woodenHook,
|
Icon = woodenHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand,
|
Tooltip = Tooltip_equip_prothesis_hand,
|
||||||
WaterResistance = 15,
|
WaterResistance = 15,
|
||||||
@@ -162,10 +163,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1,
|
Weight = 1,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_woodenHook,*/
|
DisplayName = DisplayName_woodenHook,
|
||||||
ClothingItem = ArmLeft_WoodenHook,
|
ClothingItem = ArmLeft_WoodenHook,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = woodenHook,
|
Icon = woodenHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand,
|
Tooltip = Tooltip_equip_prothesis_hand,
|
||||||
WaterResistance = 15,
|
WaterResistance = 15,
|
||||||
@@ -175,10 +177,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 0.5,
|
Weight = 0.5,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHook,*/
|
DisplayName = DisplayName_metalHook,
|
||||||
ClothingItem = ArmRight_MetalHook,
|
ClothingItem = ArmRight_MetalHook,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = metalHook,
|
Icon = metalHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand,
|
Tooltip = Tooltip_equip_prothesis_hand,
|
||||||
WaterResistance = 13,
|
WaterResistance = 13,
|
||||||
@@ -188,10 +191,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 0.5,
|
Weight = 0.5,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHook,*/
|
DisplayName = DisplayName_metalHook,
|
||||||
ClothingItem = ArmLeft_MetalHook,
|
ClothingItem = ArmLeft_MetalHook,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = metalHook,
|
Icon = metalHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand,
|
Tooltip = Tooltip_equip_prothesis_hand,
|
||||||
WaterResistance = 13,
|
WaterResistance = 13,
|
||||||
@@ -201,10 +205,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 0.3,
|
Weight = 0.3,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHand,*/
|
DisplayName = DisplayName_metalHand,
|
||||||
ClothingItem = ArmRight_MetalHamd,
|
ClothingItem = ArmRight_MetalHamd,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = metalHand,
|
Icon = metalHand,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand,
|
Tooltip = Tooltip_equip_prothesis_hand,
|
||||||
WaterResistance = 11,
|
WaterResistance = 11,
|
||||||
@@ -214,10 +219,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 0.3,
|
Weight = 0.3,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHand,*/
|
DisplayName = DisplayName_metalHand,
|
||||||
ClothingItem = ArmLeft_MetalHand,
|
ClothingItem = ArmLeft_MetalHand,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = Hands,
|
||||||
Icon = metalHand,
|
Icon = metalHand,
|
||||||
Tooltip = Tooltip_equip_prothesis_hand",
|
Tooltip = Tooltip_equip_prothesis_hand",
|
||||||
WaterResistance = 11,
|
WaterResistance = 11,
|
||||||
@@ -227,10 +233,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 2,
|
Weight = 2,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_woodenHook,*/
|
DisplayName = DisplayName_woodenHook,
|
||||||
ClothingItem = ArmRight_WoodenHook_fore,
|
ClothingItem = ArmRight_WoodenHook_fore,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
Icon = woodenHook,
|
Icon = woodenHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 16,
|
WaterResistance = 16,
|
||||||
@@ -240,10 +247,12 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 2,
|
Weight = 2,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_woodenHook,*/
|
DisplayName = DisplayName_woodenHook,
|
||||||
ClothingItem = ArmLeft_WoodenHook_fore,
|
ClothingItem = ArmLeft_WoodenHook_fore,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
|
|
||||||
Icon = woodenHook,
|
Icon = woodenHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 16,
|
WaterResistance = 16,
|
||||||
@@ -253,10 +262,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1.5,
|
Weight = 1.5,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHook,*/
|
DisplayName = DisplayName_metalHook,
|
||||||
ClothingItem = ArmRight_MetalHook_fore,
|
ClothingItem = ArmRight_MetalHook_fore,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
Icon = metalHook,
|
Icon = metalHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 14,
|
WaterResistance = 14,
|
||||||
@@ -266,10 +276,12 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1.5,
|
Weight = 1.5,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHook,*/
|
DisplayName = DisplayName_metalHook,
|
||||||
ClothingItem = ArmLeft_MetalHook_fore,
|
ClothingItem = ArmLeft_MetalHook_fore,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
|
|
||||||
Icon = metalHook,
|
Icon = metalHook,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 14,
|
WaterResistance = 14,
|
||||||
@@ -279,10 +291,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1.2,
|
Weight = 1.2,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHand,*/
|
DisplayName = DisplayName_metalHand,
|
||||||
ClothingItem = ArmRight_MetalHand_fore,
|
ClothingItem = ArmRight_MetalHand_fore,
|
||||||
BodyLocation = ArmRight_Prot,
|
BodyLocation = ArmRight_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
Icon = metalHand,
|
Icon = metalHand,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 12,
|
WaterResistance = 12,
|
||||||
@@ -292,10 +305,11 @@ imports
|
|||||||
{
|
{
|
||||||
Weight = 1.2,
|
Weight = 1.2,
|
||||||
Type = Clothing,
|
Type = Clothing,
|
||||||
/*DisplayCategory = Prosthesis,
|
DisplayCategory = Prosthesis,
|
||||||
DisplayName = DisplayName_metalHand,*/
|
DisplayName = DisplayName_metalHand,
|
||||||
ClothingItem = ArmLeft_MetalHand_fore,
|
ClothingItem = ArmLeft_MetalHand_fore,
|
||||||
BodyLocation = ArmLeft_Prot,
|
BodyLocation = ArmLeft_Prot,
|
||||||
|
BloodLocation = LowerArms;Hands,
|
||||||
Icon = metalHand,
|
Icon = metalHand,
|
||||||
Tooltip = Tooltip_equip_prothesis_fore,
|
Tooltip = Tooltip_equip_prothesis_fore,
|
||||||
WaterResistance = 12,
|
WaterResistance = 12,
|
||||||
@@ -303,6 +317,7 @@ imports
|
|||||||
|
|
||||||
/************************ Prothese items ************************/
|
/************************ Prothese items ************************/
|
||||||
|
|
||||||
|
/* TODO make it clothing same as amputations */
|
||||||
item WoodenHook
|
item WoodenHook
|
||||||
{
|
{
|
||||||
Weight = 1,
|
Weight = 1,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 122 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 147 KiB |
Reference in New Issue
Block a user