Compare commits
4 Commits
dev-bandag
...
dev-fix-se
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
839ce002a3 | ||
|
|
49eee7ce84 | ||
|
|
1c72647d40 | ||
|
|
a9a7063287 |
@@ -25,16 +25,16 @@ local og_ISUnequipAction_complete = ISUnequipAction.complete
|
||||
function ISUnequipAction:complete()
|
||||
-- Horrendous workaround. For B42, as of now, it will basically happen two times, once with :perform and once with :complete. Shouldn't
|
||||
-- matter for performance but it's really ugly.
|
||||
-- local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
|
||||
-- local group
|
||||
-- if isProst then
|
||||
-- group = BodyLocations.getGroup("Human")
|
||||
-- group:setMultiItem("TOC_ArmProst", false)
|
||||
-- end
|
||||
local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
|
||||
local group
|
||||
if isProst then
|
||||
group = BodyLocations.getGroup("Human")
|
||||
group:setMultiItem("TOC_ArmProst", false)
|
||||
end
|
||||
og_ISUnequipAction_complete(self)
|
||||
|
||||
-- if isProst then
|
||||
-- group:setMultiItem("TOC_ArmProst", true)
|
||||
-- end
|
||||
if isProst then
|
||||
group:setMultiItem("TOC_ArmProst", true)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,53 +0,0 @@
|
||||
module TOC
|
||||
{
|
||||
imports
|
||||
{
|
||||
Base
|
||||
}
|
||||
/*************Craft Prosthetics*******************/
|
||||
craftRecipe Craft Prosthetic Arm
|
||||
{
|
||||
timedAction = BuildMetalStructureSmall,
|
||||
Time = 150,
|
||||
Tags = InHandCraft,
|
||||
category = Welding,
|
||||
NeedToBeLearn = false,
|
||||
SkillRequired = MetalWelding:4,
|
||||
xpAward = MetalWelding:50,
|
||||
inputs
|
||||
{
|
||||
item 4 [MetalPipe],
|
||||
item 2 [Plank],
|
||||
item 4 [Base.BlowTorch] flags[DontRecordInput],
|
||||
item 4 [Base.WeldingRods] flags[DontRecordInput],
|
||||
|
||||
}
|
||||
outputs
|
||||
{
|
||||
item 1 TOC.Prost_NormalArm_L,
|
||||
}
|
||||
}
|
||||
|
||||
craftRecipe Craft Prosthetic Hook
|
||||
{
|
||||
timedAction = BuildMetalStructureSmall,
|
||||
Time = 100,
|
||||
Tags = InHandCraft,
|
||||
category = Welding,
|
||||
NeedToBeLearn = false,
|
||||
SkillRequired = MetalWelding:2,
|
||||
xpAward = MetalWelding:30,
|
||||
inputs
|
||||
{
|
||||
item 2 [MetalPipe],
|
||||
item 1 [Plank],
|
||||
item 4 [Base.BlowTorch] flags[DontRecordInput],
|
||||
item 2 [Base.WeldingRods] flags[DontRecordInput],
|
||||
|
||||
}
|
||||
outputs
|
||||
{
|
||||
item 1 TOC.Prost_HookArm_L,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ description=You've been bitten. You have only two choices.
|
||||
id=TheOnlyCure
|
||||
icon=icon.png
|
||||
url=https://github.com/ZioPao/The-Only-Cure
|
||||
modversion=2.2.2
|
||||
modversion=2.2
|
||||
versionMin=42.6
|
||||
|
||||
loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<clothingItem>
|
||||
<m_MaleModel>Amputation\Amputation_Left_LowerArm_Male</m_MaleModel>
|
||||
<m_MaleModel>Amputation\Amputation_FA_LR</m_MaleModel>
|
||||
<m_FemaleModel>Amputation\Amputation_Left_LowerArm_Female</m_FemaleModel>
|
||||
<m_GUID>d3816fe0-48e1-4cf5-a8e4-48c72595edb4</m_GUID>
|
||||
<m_Static>false</m_Static>
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
|
||||
<m_Masks>4</m_Masks>
|
||||
<m_Masks>3</m_Masks>
|
||||
<m_UnderlayMasksFolder>media/textures/Amputations/Masks/TestDouble</m_UnderlayMasksFolder>
|
||||
|
||||
<m_Masks>4</m_Masks>
|
||||
<m_Masks>6</m_Masks>
|
||||
|
||||
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
|
||||
|
||||
|
||||
<!-- HUMAN -->
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<clothingItem>
|
||||
<m_MaleModel>Amputation\Amputation_FA_LR</m_MaleModel>
|
||||
<m_FemaleModel>Amputation\Amputation_FA_LR</m_FemaleModel>
|
||||
<m_GUID>8e5bc1b4-d79b-4a17-b86b-71dab6ace816</m_GUID>
|
||||
<m_Static>false</m_Static>
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
|
||||
<m_Masks>4</m_Masks>
|
||||
<m_Masks>6</m_Masks>
|
||||
|
||||
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_b</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_hairy_b</textureChoices>
|
||||
|
||||
|
||||
<!-- HUMAN AFTER CICATRIZATION -->
|
||||
|
||||
<textureChoices>Body\MaleBody01</textureChoices>
|
||||
<textureChoices>Body\MaleBody02</textureChoices>
|
||||
<textureChoices>Body\MaleBody03</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05</textureChoices>
|
||||
|
||||
<textureChoices>Body\MaleBody01a</textureChoices>
|
||||
<textureChoices>Body\MaleBody02a</textureChoices>
|
||||
<textureChoices>Body\MaleBody03a</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05a</textureChoices>
|
||||
|
||||
|
||||
<!-- ZOMBIE -->
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin01_l1</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin01_l2</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin01_l3</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin02_l1</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin02_l2</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin02_l3</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin03_l1</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin03_l2</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin03_l3</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin04_l1</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin04_l2</textureChoices>
|
||||
<textureChoices>Amputations\Zombie\Forearm\z_skin04_l3</textureChoices>
|
||||
|
||||
</clothingItem>
|
||||
@@ -10,8 +10,6 @@
|
||||
<m_Masks>5</m_Masks>
|
||||
<m_Masks>6</m_Masks>
|
||||
|
||||
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>
|
||||
|
||||
@@ -7,33 +7,18 @@
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<m_Masks>4</m_Masks>
|
||||
<!-- <m_MasksFolder>none</m_MasksFolder> -->
|
||||
<m_MasksFolder>none</m_MasksFolder>
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
|
||||
|
||||
<!-- HUMAN AFTER CICATRIZATION -->
|
||||
|
||||
<textureChoices>Body\MaleBody01</textureChoices>
|
||||
<textureChoices>Body\MaleBody02</textureChoices>
|
||||
<textureChoices>Body\MaleBody03</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05</textureChoices>
|
||||
|
||||
<textureChoices>Body\MaleBody01a</textureChoices>
|
||||
<textureChoices>Body\MaleBody02a</textureChoices>
|
||||
<textureChoices>Body\MaleBody03a</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05a</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_b</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_hairy_b</textureChoices>
|
||||
</clothingItem>
|
||||
@@ -6,32 +6,18 @@
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<m_Masks>6</m_Masks>
|
||||
<!-- <m_MasksFolder>none</m_MasksFolder> -->
|
||||
<m_MasksFolder>none</m_MasksFolder>
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_b</textureChoices>
|
||||
|
||||
<textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
|
||||
|
||||
<!-- HUMAN AFTER CICATRIZATION -->
|
||||
|
||||
<textureChoices>Body\MaleBody01</textureChoices>
|
||||
<textureChoices>Body\MaleBody02</textureChoices>
|
||||
<textureChoices>Body\MaleBody03</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05</textureChoices>
|
||||
|
||||
<textureChoices>Body\MaleBody01a</textureChoices>
|
||||
<textureChoices>Body\MaleBody02a</textureChoices>
|
||||
<textureChoices>Body\MaleBody03a</textureChoices>
|
||||
<textureChoices>Body\MaleBody04</textureChoices>
|
||||
<textureChoices>Body\MaleBody05a</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin01_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin02_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin03_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin04_hairy_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Forearm\skin05_hairy_b</textureChoices>
|
||||
</clothingItem>
|
||||
@@ -9,8 +9,6 @@
|
||||
<m_Masks>3</m_Masks>
|
||||
<m_Masks>4</m_Masks>
|
||||
|
||||
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>
|
||||
<textureChoices>Amputations\Human\Upperarm\skin02_b</textureChoices>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<m_Masks>5</m_Masks>
|
||||
<m_Masks>6</m_Masks>
|
||||
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
|
||||
|
||||
<!-- HUMAN -->
|
||||
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<clothingItem>
|
||||
<m_MaleModel></m_MaleModel>
|
||||
<m_FemaleModel></m_FemaleModel>
|
||||
<m_GUID>c99332ec-18fa-4d37-9049-9e6f6f7468e5</m_GUID>
|
||||
<m_Static>false</m_Static>
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<m_AttachBone></m_AttachBone>
|
||||
<m_BaseTextures>bodydmg\malebody01_bandages_lower_left_arm</m_BaseTextures>
|
||||
<m_BaseTextures>Amputations\Bandages\MaleBody01_bandages_lower_left_arm</m_BaseTextures>
|
||||
<m_BaseTextures>Amputations\Bandages\test</m_BaseTextures>
|
||||
|
||||
|
||||
</clothingItem>
|
||||
@@ -57,5 +57,11 @@
|
||||
<guid>9a5fe063-63c7-4e6f-81ca-ee77c6678e0d</guid>
|
||||
</files>
|
||||
|
||||
<!-- TEST -->
|
||||
<files>
|
||||
<path>media/clothing/clothingItems/Amputation_ForeArm_LR.xml</path>
|
||||
<guid>8e5bc1b4-d79b-4a17-b86b-71dab6ace816</guid>
|
||||
</files>
|
||||
|
||||
|
||||
</fileGuidTable>
|
||||
@@ -17,6 +17,7 @@ ItemsController.Player = {}
|
||||
---@return number
|
||||
---@private
|
||||
function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized)
|
||||
-- todo
|
||||
local textureString = playerObj:getHumanVisual():getSkinTexture()
|
||||
local isHairy = textureString:sub(-1) == "a"
|
||||
|
||||
|
||||
@@ -64,18 +64,18 @@ end
|
||||
---@param obj any self
|
||||
---@param wrappedFunc function
|
||||
function TourniquetController.WrapClothingAction(obj, wrappedFunc)
|
||||
-- local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType())
|
||||
-- local group
|
||||
-- if isTourniquet then
|
||||
-- group = BodyLocations.getGroup("Human")
|
||||
-- group:setMultiItem(TourniquetController.bodyLoc, false)
|
||||
-- end
|
||||
local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType())
|
||||
local group
|
||||
if isTourniquet then
|
||||
group = BodyLocations.getGroup("Human")
|
||||
group:setMultiItem(TourniquetController.bodyLoc, false)
|
||||
end
|
||||
|
||||
local ogValue = wrappedFunc(obj)
|
||||
|
||||
-- if isTourniquet then
|
||||
-- group:setMultiItem(TourniquetController.bodyLoc, true)
|
||||
-- end
|
||||
if isTourniquet then
|
||||
group:setMultiItem(TourniquetController.bodyLoc, true)
|
||||
end
|
||||
|
||||
return ogValue -- Needed for isValid
|
||||
end
|
||||
|
||||
@@ -9,8 +9,8 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
||||
---@class ProsthesisHandler
|
||||
local ProsthesisHandler = {}
|
||||
|
||||
local bodylocArmProstBaseline = "TOC_ArmProst"
|
||||
--local bodyLocLegProst = "TOC_LegProst"
|
||||
local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst
|
||||
local bodyLocLegProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_LegProst
|
||||
|
||||
---Check if the following item is a prosthesis or not
|
||||
---@param item InventoryItem?
|
||||
@@ -23,7 +23,7 @@ function ProsthesisHandler.CheckIfProst(item)
|
||||
|
||||
return false
|
||||
end
|
||||
return item:getBodyLocation():contains(bodylocArmProstBaseline)
|
||||
return item:getBodyLocation():contains(bodyLocArmProst)
|
||||
end
|
||||
|
||||
---Get the grouping for the prosthesis
|
||||
@@ -33,10 +33,13 @@ function ProsthesisHandler.GetGroup(item)
|
||||
local fullType = item:getFullType()
|
||||
local side = CommonMethods.GetSide(fullType)
|
||||
|
||||
|
||||
local bodyLocation = item:getBodyLocation()
|
||||
local position
|
||||
if bodyLocation:contains(bodylocArmProstBaseline) then
|
||||
if bodyLocation == bodyLocArmProst then
|
||||
position = "Top_"
|
||||
elseif bodyLocation == bodyLocLegProst then
|
||||
position = "Bottom_"
|
||||
else
|
||||
TOC_DEBUG.print("Something is wrong, no position in this item")
|
||||
position = nil
|
||||
@@ -164,15 +167,15 @@ function ISUnequipAction:perform()
|
||||
]]
|
||||
|
||||
local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
|
||||
-- local group
|
||||
-- if isProst then
|
||||
-- group = BodyLocations.getGroup("Human")
|
||||
-- group:setMultiItem("TOC_ArmProst", false)
|
||||
-- end
|
||||
local group
|
||||
if isProst then
|
||||
group = BodyLocations.getGroup("Human")
|
||||
group:setMultiItem("TOC_ArmProst", false)
|
||||
end
|
||||
og_ISUnequipAction_perform(self)
|
||||
|
||||
if isProst then
|
||||
-- group:setMultiItem("TOC_ArmProst", true)
|
||||
group:setMultiItem("TOC_ArmProst", true)
|
||||
|
||||
-- we need to fetch the limbname associated to the prosthesis
|
||||
local side = CommonMethods.GetSide(self.item:getFullType())
|
||||
|
||||
@@ -6,7 +6,7 @@ require("TOC/Events")
|
||||
|
||||
---@class Main
|
||||
local Main = {
|
||||
_version = "2.2.2"
|
||||
_version = "2.1.6"
|
||||
}
|
||||
|
||||
function Main.Start()
|
||||
|
||||
@@ -143,6 +143,26 @@ function ISHealthPanel:render()
|
||||
end
|
||||
|
||||
|
||||
-- local og_ISHealthPanel_update = ISHealthPanel.update
|
||||
-- function ISHealthPanel:update()
|
||||
-- og_ISHealthPanel_update(self)
|
||||
-- -- TODO Listen for changes on other player side instead of looping this
|
||||
|
||||
|
||||
-- -- FIX Re-enable it, just for test
|
||||
-- if self.character then
|
||||
-- local locPlUsername = getPlayer():getUsername()
|
||||
-- local remPlUsername = self.character:getUsername()
|
||||
-- if locPlUsername ~= remPlUsername and self:isReallyVisible() then
|
||||
-- -- Request update for TOC DATA
|
||||
-- local key = CommandsData.GetKey(remPlUsername)
|
||||
-- --ModData.request(key)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
|
||||
-- We need to override this to force the alpha to 1
|
||||
local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender
|
||||
function ISCharacterInfoWindow:prerender()
|
||||
|
||||
@@ -33,17 +33,15 @@ function BaseHandler:checkItems()
|
||||
local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor())
|
||||
local done = {}
|
||||
local childContainers = {}
|
||||
if containers ~= nil then
|
||||
for i=1, containers:size() do
|
||||
local container = containers:get(i-1)
|
||||
done[container] = true
|
||||
table.wipe(childContainers)
|
||||
self:checkContainerItems(container, childContainers)
|
||||
for _,container2 in ipairs(childContainers) do
|
||||
if not done[container2] then
|
||||
done[container2] = true
|
||||
self:checkContainerItems(container2, nil)
|
||||
end
|
||||
for i=1,containers:size() do
|
||||
local container = containers:get(i-1)
|
||||
done[container] = true
|
||||
table.wipe(childContainers)
|
||||
self:checkContainerItems(container, childContainers)
|
||||
for _,container2 in ipairs(childContainers) do
|
||||
if not done[container2] then
|
||||
done[container2] = true
|
||||
self:checkContainerItems(container2, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -103,7 +101,7 @@ function BaseHandler:getItemOfTag(items, type)
|
||||
end
|
||||
|
||||
function BaseHandler:getAllItemsOfType(items, type)
|
||||
items = {}
|
||||
local items = {}
|
||||
for _,item in ipairs(items) do
|
||||
if item:getFullType() == type then
|
||||
table.insert(items, item)
|
||||
|
||||
@@ -9,19 +9,8 @@ local group = BodyLocations.getGroup("Human")
|
||||
---@type ArrayList
|
||||
local list = customGetVal(group, 1)
|
||||
|
||||
---@param bodyLoc string
|
||||
function BodyLocationsAPI.New(bodyLoc)
|
||||
local curItem
|
||||
if StaticData.COMPAT_42 then
|
||||
curItem = BodyLocation.new(group, bodyLoc) -- create new item
|
||||
group:getAllLocations():add(curItem) -- add to the list
|
||||
else
|
||||
curItem = group:getOrCreateLocation(bodyLoc) -- get current item - or create
|
||||
end
|
||||
return curItem
|
||||
end
|
||||
|
||||
-- TODO Not sure if this method actually works as intende with b42, but for our use case it's fine...
|
||||
|
||||
---@param toRelocateOrCreate string
|
||||
---@param locationElement string
|
||||
---@param afterBoolean boolean
|
||||
@@ -34,7 +23,14 @@ function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, location
|
||||
-- Check type of arg 1 == string - if not, error out.
|
||||
if type(toRelocateOrCreate) ~= "string" then error("Argument 1 is not of type string. Please re-check!", 2) end
|
||||
|
||||
local curItem = BodyLocationsAPI.New(toRelocateOrCreate)
|
||||
local curItem
|
||||
if StaticData.COMPAT_42 then
|
||||
curItem = BodyLocation.new(group, toRelocateOrCreate) -- create new item
|
||||
group:getAllLocations():add(curItem) -- add to the list
|
||||
else
|
||||
curItem = group:getOrCreateLocation(toRelocateOrCreate) -- get current item - or create
|
||||
|
||||
end
|
||||
list:remove(curItem) -- remove from the list
|
||||
local index = group:indexOf(locationElement) -- get current index after removal of the location to move to
|
||||
if afterBoolean then index = index + 1 end -- if we want it after it, we increase the index to move to by one
|
||||
@@ -47,33 +43,29 @@ function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, location
|
||||
end
|
||||
end
|
||||
|
||||
function TestBodyLocations()
|
||||
local group = BodyLocations.getGroup("Human")
|
||||
local x = group:getAllLocations()
|
||||
|
||||
for i=0, x:size() -1 do
|
||||
|
||||
-- function TestBodyLocations()
|
||||
-- local group = BodyLocations.getGroup("Human")
|
||||
-- local x = group:getAllLocations()
|
||||
---@type BodyLocation
|
||||
local bl = x:get(i)
|
||||
|
||||
-- for i=0, x:size() -1 do
|
||||
|
||||
-- ---@type BodyLocation
|
||||
-- local bl = x:get(i)
|
||||
|
||||
-- print(bl:getId())
|
||||
-- end
|
||||
-- end
|
||||
print(bl:getId())
|
||||
end
|
||||
end
|
||||
|
||||
-- MultiItem causes a ton of issues... fucking hell
|
||||
|
||||
-- local curItem = BodyLocation.new(group, "TOC_Arm_L")
|
||||
-- group:getAllLocations():add(curItem)
|
||||
-- BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_Arm", "Shirt", true)
|
||||
-- group:setMultiItem("TOC_Arm", true)
|
||||
|
||||
-- local curItem = BodyLocation.new(group, "TOC_Arm_R")
|
||||
-- group:getAllLocations():add(curItem)
|
||||
local curItem = BodyLocation.new(group, "TOC_Arm") -- create new item
|
||||
group:getAllLocations():add(curItem) -- add to the list
|
||||
|
||||
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_ArmProst", "TOC_Arm", true)
|
||||
group:setMultiItem("TOC_ArmProst", true)
|
||||
|
||||
BodyLocationsAPI.New("TOC_Arm_L")
|
||||
BodyLocationsAPI.New("TOC_Arm_R")
|
||||
BodyLocationsAPI.New("TOC_ArmProst_L")
|
||||
BodyLocationsAPI.New("TOC_ArmProst_R")
|
||||
BodyLocationsAPI.New("TOC_ArmAccessory_L")
|
||||
BodyLocationsAPI.New("TOC_ArmAccessory_R")
|
||||
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_ArmAccessory", "TOC_ArmProst", true)
|
||||
group:setMultiItem("TOC_ArmAccessory", true)
|
||||
@@ -13,12 +13,10 @@ end
|
||||
---Print debug
|
||||
---@param string string
|
||||
function TOC_DEBUG.print(string)
|
||||
if isDebugEnabled() then
|
||||
local runningFile = TOC_DEBUG.getRunningFile()
|
||||
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
|
||||
else
|
||||
print(string)
|
||||
end
|
||||
--if isDebugEnabled() then
|
||||
local runningFile = TOC_DEBUG.getRunningFile()
|
||||
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
|
||||
--end
|
||||
end
|
||||
|
||||
---Horrendous but I don't really care about performance for this
|
||||
|
||||
@@ -49,14 +49,11 @@ StaticData.PARTS_STR = {
|
||||
"UpperArm"
|
||||
}
|
||||
|
||||
-- TODO make it a bit more elegant
|
||||
StaticData.MOD_BODYLOCS_BASE_IND_STR = {
|
||||
TOC_ArmProst_L = "TOC_ArmProst_L",
|
||||
TOC_ArmProst_R = "TOC_ArmProst_R",
|
||||
TOC_Arm_L = "TOC_Arm_L",
|
||||
TOC_Arm_R = "TOC_Arm_R",
|
||||
|
||||
--TOC_LegProst = "TOC_LegProst",
|
||||
StaticData.MOD_BODYLOCS_BASE_IND_STR = {
|
||||
TOC_ArmProst = "TOC_ArmProst",
|
||||
TOC_LegProst = "TOC_LegProst",
|
||||
TOC_Arm = "TOC_Arm",
|
||||
}
|
||||
|
||||
-- No "MAX" here.
|
||||
@@ -152,7 +149,6 @@ StaticData.AMP_GROUPS_BASE_IND_STR = {
|
||||
Bottom = "Bottom"
|
||||
}
|
||||
|
||||
-- FIX This should be aligned with the body locs, no reason anymore to keep it separated
|
||||
StaticData.AMP_GROUPS_IND_STR = {}
|
||||
StaticData.AMP_GROUPS_STR = {}
|
||||
|
||||
|
||||
BIN
common/media/models_X/Amputation/Amputation_FA_LR.fbx
Normal file
@@ -9,10 +9,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_Hand_R,
|
||||
BodyLocation = TOC_Arm_R,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
@@ -28,10 +27,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_ForeArm_R,
|
||||
BodyLocation = TOC_Arm_R,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.8,
|
||||
@@ -46,10 +44,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_UpperArm_R,
|
||||
BodyLocation = TOC_Arm_R,
|
||||
BodyLocation = TOC_Arm,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.7,
|
||||
@@ -63,10 +60,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_Hand_L,
|
||||
BodyLocation = TOC_Arm_L,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
@@ -82,10 +78,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_ForeArm_L,
|
||||
BodyLocation = TOC_Arm_L,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.8,
|
||||
@@ -101,10 +96,9 @@ module TOC
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
hidden = true,
|
||||
|
||||
ClothingItem = Amputation_UpperArm_L,
|
||||
BodyLocation = TOC_Arm_L,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.7,
|
||||
@@ -115,4 +109,24 @@ module TOC
|
||||
CanHaveHoles = false,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
item Amputation_FA_LR
|
||||
{
|
||||
Type = Clothing,
|
||||
DisplayCategory = Amputation,
|
||||
|
||||
ClothingItem = Amputation_ForeArm_LR,
|
||||
BodyLocation = TOC_Arm,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.7,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
Insulation = 1.0,
|
||||
WindResistance = 1.0,
|
||||
WaterResistance = 1.0,
|
||||
CanHaveHoles = false,
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ module TOC
|
||||
ClothingItemExtra = Prost_HookArm_R,
|
||||
ClothingItemExtraOption = InstallProstRight,
|
||||
clothingExtraSubmenu = InstallProstLeft,
|
||||
BodyLocation = TOC_ArmProst_L,
|
||||
BodyLocation = TOC_ArmProst,
|
||||
Weight = 1.5,
|
||||
CombatSpeedModifier = 1.05,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
@@ -38,7 +38,7 @@ module TOC
|
||||
ClothingItemExtra = Prost_HookArm_L,
|
||||
ClothingItemExtraOption = InstallProstLeft,
|
||||
clothingExtraSubmenu = InstallProstRight,
|
||||
BodyLocation = TOC_ArmProst_R,
|
||||
BodyLocation = TOC_ArmProst,
|
||||
Weight = 1.5,
|
||||
CombatSpeedModifier = 1.05,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
@@ -60,7 +60,7 @@ module TOC
|
||||
ClothingItemExtra = Prost_NormalArm_R,
|
||||
ClothingItemExtraOption = InstallProstRight,
|
||||
clothingExtraSubmenu = InstallProstLeft,
|
||||
BodyLocation = TOC_ArmProst_L,
|
||||
BodyLocation = TOC_ArmProst,
|
||||
Weight = 2,
|
||||
CombatSpeedModifier = 1.1,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
@@ -82,7 +82,7 @@ module TOC
|
||||
ClothingItemExtra = Prost_NormalArm_L,
|
||||
ClothingItemExtraOption = InstallProstLeft,
|
||||
clothingExtraSubmenu = InstallProstRight,
|
||||
BodyLocation = TOC_ArmProst_R,
|
||||
BodyLocation = TOC_ArmProst,
|
||||
Weight = 2,
|
||||
CombatSpeedModifier = 1.1,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
|
||||
@@ -15,7 +15,7 @@ module TOC
|
||||
ClothingItemExtra = Surg_Arm_Tourniquet_R,
|
||||
ClothingItemExtraOption = PutTourniquetArmRight,
|
||||
clothingExtraSubmenu = PutTourniquetArmLeft,
|
||||
BodyLocation = TOC_ArmAccessory_L,
|
||||
BodyLocation = TOC_ArmAccessory,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
|
||||
Weight = 0.25,
|
||||
@@ -35,7 +35,7 @@ module TOC
|
||||
ClothingItemExtra = Surg_Arm_Tourniquet_L,
|
||||
ClothingItemExtraOption = PutTourniquetArmLeft,
|
||||
clothingExtraSubmenu = PutTourniquetArmRight,
|
||||
BodyLocation = TOC_ArmAccessory_R,
|
||||
BodyLocation = TOC_ArmAccessory,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
|
||||
Weight = 0.25,
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 21 KiB |