diff --git a/common/media/clothing/clothingItems/Amputation_ForeArm_L.xml b/42/media/clothing/clothingItems/Amputation_ForeArm_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_ForeArm_L.xml rename to 42/media/clothing/clothingItems/Amputation_ForeArm_L.xml diff --git a/common/media/clothing/clothingItems/Amputation_ForeArm_R.xml b/42/media/clothing/clothingItems/Amputation_ForeArm_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_ForeArm_R.xml rename to 42/media/clothing/clothingItems/Amputation_ForeArm_R.xml diff --git a/common/media/clothing/clothingItems/Amputation_Hand_L.xml b/42/media/clothing/clothingItems/Amputation_Hand_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_Hand_L.xml rename to 42/media/clothing/clothingItems/Amputation_Hand_L.xml diff --git a/common/media/clothing/clothingItems/Amputation_Hand_R.xml b/42/media/clothing/clothingItems/Amputation_Hand_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_Hand_R.xml rename to 42/media/clothing/clothingItems/Amputation_Hand_R.xml diff --git a/common/media/clothing/clothingItems/Amputation_UpperArm_L.xml b/42/media/clothing/clothingItems/Amputation_UpperArm_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_UpperArm_L.xml rename to 42/media/clothing/clothingItems/Amputation_UpperArm_L.xml diff --git a/common/media/clothing/clothingItems/Amputation_UpperArm_R.xml b/42/media/clothing/clothingItems/Amputation_UpperArm_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Amputation_UpperArm_R.xml rename to 42/media/clothing/clothingItems/Amputation_UpperArm_R.xml diff --git a/common/media/clothing/clothingItems/Prost_HookArm_L.xml b/42/media/clothing/clothingItems/Prost_HookArm_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Prost_HookArm_L.xml rename to 42/media/clothing/clothingItems/Prost_HookArm_L.xml diff --git a/common/media/clothing/clothingItems/Prost_HookArm_R.xml b/42/media/clothing/clothingItems/Prost_HookArm_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Prost_HookArm_R.xml rename to 42/media/clothing/clothingItems/Prost_HookArm_R.xml diff --git a/common/media/clothing/clothingItems/Prost_NormalArm_L.xml b/42/media/clothing/clothingItems/Prost_NormalArm_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Prost_NormalArm_L.xml rename to 42/media/clothing/clothingItems/Prost_NormalArm_L.xml diff --git a/common/media/clothing/clothingItems/Prost_NormalArm_R.xml b/42/media/clothing/clothingItems/Prost_NormalArm_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Prost_NormalArm_R.xml rename to 42/media/clothing/clothingItems/Prost_NormalArm_R.xml diff --git a/common/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml b/42/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml similarity index 100% rename from common/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml rename to 42/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml diff --git a/common/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml b/42/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml similarity index 100% rename from common/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml rename to 42/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml diff --git a/common/media/fileGuidTable.xml b/42/media/fileGuidTable.xml similarity index 100% rename from common/media/fileGuidTable.xml rename to 42/media/fileGuidTable.xml diff --git a/42/media/lua/client/TOC-42/Controllers/LimitActionsController.lua b/42/media/lua/client/TOC-42/Controllers/LimitActionsController.lua deleted file mode 100644 index 0e57d8a..0000000 --- a/42/media/lua/client/TOC-42/Controllers/LimitActionsController.lua +++ /dev/null @@ -1,10 +0,0 @@ -local LimitActionsController = require("TOC/Controllers/LimitActionsController") -- declared in common -local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive") - -local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid") ----@diagnostic disable-next-line: duplicate-set-field -function ISClothingExtraAction:isValid() - -- TOC_DEBUG.print("Inside ISClothingExtraAction:isValid 42") - -- TOC_DEBUG.print(OverridenMethodsArchive.Get("ISClothingExtraAction_isValid")) - return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra)) -end \ No newline at end of file diff --git a/42/media/lua/client/TOC-42/Handlers/ProsthesisHandler.lua b/42/media/lua/client/TOC-42/Handlers/ProsthesisHandler.lua deleted file mode 100644 index 1a5dc66..0000000 --- a/42/media/lua/client/TOC-42/Handlers/ProsthesisHandler.lua +++ /dev/null @@ -1,40 +0,0 @@ -local ProsthesisHandler = require("TOC/Handlers/ProsthesisHandler") -- declared in common -local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive") - - - -local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid") ----@diagnostic disable-next-line: duplicate-set-field -function ISClothingExtraAction:isValid() - local isEquippable = og_ISClothingExtraAction_isValid(self) - -- self.extra is a string, not the item - local testItem = instanceItem(self.extra) - return ProsthesisHandler.Validate(testItem, isEquippable) -end - - -local og_ISClothingExtraAction_perform = OverridenMethodsArchive.Get("ISClothingExtraAction_perform") -function ISClothingExtraAction:perform() - local extraItem = instanceItem(self.extra) - ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true) - og_ISClothingExtraAction_perform(self) -end - - -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 - og_ISUnequipAction_complete(self) - - -- if isProst then - -- group:setMultiItem("TOC_ArmProst", true) - -- end - -end \ No newline at end of file diff --git a/common/media/lua/client/TOC/API.lua b/42/media/lua/client/TOC/API.lua similarity index 100% rename from common/media/lua/client/TOC/API.lua rename to 42/media/lua/client/TOC/API.lua diff --git a/common/media/lua/client/TOC/Admin.lua b/42/media/lua/client/TOC/Admin.lua similarity index 100% rename from common/media/lua/client/TOC/Admin.lua rename to 42/media/lua/client/TOC/Admin.lua diff --git a/common/media/lua/client/TOC/ClientRelayCommands.lua b/42/media/lua/client/TOC/ClientRelayCommands.lua similarity index 100% rename from common/media/lua/client/TOC/ClientRelayCommands.lua rename to 42/media/lua/client/TOC/ClientRelayCommands.lua diff --git a/common/media/lua/client/TOC/CommonMethods.lua b/42/media/lua/client/TOC/CommonMethods.lua similarity index 100% rename from common/media/lua/client/TOC/CommonMethods.lua rename to 42/media/lua/client/TOC/CommonMethods.lua diff --git a/common/media/lua/client/TOC/Compat.lua b/42/media/lua/client/TOC/Compat.lua similarity index 100% rename from common/media/lua/client/TOC/Compat.lua rename to 42/media/lua/client/TOC/Compat.lua diff --git a/common/media/lua/client/TOC/Controllers/DataController.lua b/42/media/lua/client/TOC/Controllers/DataController.lua similarity index 100% rename from common/media/lua/client/TOC/Controllers/DataController.lua rename to 42/media/lua/client/TOC/Controllers/DataController.lua diff --git a/common/media/lua/client/TOC/Controllers/ItemsController.lua b/42/media/lua/client/TOC/Controllers/ItemsController.lua similarity index 100% rename from common/media/lua/client/TOC/Controllers/ItemsController.lua rename to 42/media/lua/client/TOC/Controllers/ItemsController.lua diff --git a/common/media/lua/client/TOC/Controllers/LimitActionsController.lua b/42/media/lua/client/TOC/Controllers/LimitActionsController.lua similarity index 99% rename from common/media/lua/client/TOC/Controllers/LimitActionsController.lua rename to 42/media/lua/client/TOC/Controllers/LimitActionsController.lua index 5583217..1c855dd 100644 --- a/common/media/lua/client/TOC/Controllers/LimitActionsController.lua +++ b/42/media/lua/client/TOC/Controllers/LimitActionsController.lua @@ -397,7 +397,7 @@ end local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Save("ISClothingExtraAction_isValid", ISClothingExtraAction.isValid) ---@diagnostic disable-next-line: duplicate-set-field function ISClothingExtraAction:isValid() - return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, InventoryItemFactory.CreateItem(self.extra)) + return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra)) end diff --git a/common/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/42/media/lua/client/TOC/Controllers/LocalPlayerController.lua similarity index 97% rename from common/media/lua/client/TOC/Controllers/LocalPlayerController.lua rename to 42/media/lua/client/TOC/Controllers/LocalPlayerController.lua index cb89535..8c3668b 100644 --- a/common/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/42/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -3,6 +3,7 @@ local CommonMethods = require("TOC/CommonMethods") local CachedDataHandler = require("TOC/Handlers/CachedDataHandler") local StaticData = require("TOC/StaticData") require("TOC/Events") +local TOC = require("TOC/Registries") ----------- @@ -56,7 +57,7 @@ function LocalPlayerController.ManageTraits() local AmputationHandler = require("TOC/Handlers/AmputationHandler") for k, v in pairs(StaticData.TRAITS_BP) do - if playerObj:HasTrait(k) then + if playerObj:hasTrait(TOC.traits[k]) then -- Once we find one, we should be done since they're exclusive TOC_DEBUG.print("Player has amputation trait " .. k .. ", executing it") local tempHandler = AmputationHandler:new(v, playerObj) @@ -93,7 +94,8 @@ function LocalPlayerController.HealArea(bodyPart) bodyPart:setBleedingTime(0) bodyPart:SetBitten(false) - bodyPart:setBiteTime(0) + --bodyPart:setBiteTime(0) + bodyPart:SetInfected(false) bodyPart:setCut(false) bodyPart:setCutTime(0) @@ -110,14 +112,14 @@ end ---@param bodyPart BodyPart ---@param limbName string ---@param dcInst DataController -function LocalPlayerController.HealZombieInfection(bodyDamage, bodyPart, limbName, dcInst) +function LocalPlayerController.HealZombieInfection(bodyDamage, limbName, dcInst) + -- FIX Different in B42.13, to be set with stats? if bodyDamage:isInfected() == false then return end bodyDamage:setInfected(false) bodyDamage:setInfectionMortalityDuration(-1) bodyDamage:setInfectionTime(-1) - bodyDamage:setInfectionLevel(-1) - bodyPart:SetInfected(false) + --bodyPart:SetInfected(false) dcInst:setIsInfected(limbName, false) dcInst:apply() @@ -183,7 +185,7 @@ function LocalPlayerController.HandleDamage(character) -- Special case for bites\zombie infections if bodyPart:IsInfected() then TOC_DEBUG.print("Healed from zombie infection - " .. limbName) - LocalPlayerController.HealZombieInfection(bd, bodyPart, limbName, dcInst) + LocalPlayerController.HealZombieInfection(bd, limbName, dcInst) end else if (bodyPart:bitten() or bodyPart:IsInfected()) and not dcInst:getIsInfected(limbName) then diff --git a/common/media/lua/client/TOC/Controllers/TourniquetController.lua b/42/media/lua/client/TOC/Controllers/TourniquetController.lua similarity index 100% rename from common/media/lua/client/TOC/Controllers/TourniquetController.lua rename to 42/media/lua/client/TOC/Controllers/TourniquetController.lua diff --git a/common/media/lua/client/TOC/Events.lua b/42/media/lua/client/TOC/Events.lua similarity index 100% rename from common/media/lua/client/TOC/Events.lua rename to 42/media/lua/client/TOC/Events.lua diff --git a/common/media/lua/client/TOC/Handlers/AmputationHandler.lua b/42/media/lua/client/TOC/Handlers/AmputationHandler.lua similarity index 95% rename from common/media/lua/client/TOC/Handlers/AmputationHandler.lua rename to 42/media/lua/client/TOC/Handlers/AmputationHandler.lua index 8061a11..ee2258f 100644 --- a/common/media/lua/client/TOC/Handlers/AmputationHandler.lua +++ b/42/media/lua/client/TOC/Handlers/AmputationHandler.lua @@ -152,8 +152,8 @@ function AmputationHandler:damageAfterAmputation(surgeonFactor) bodyPart:setBleedingTime(baseDamage - surgeonFactor) bodyPart:setDeepWounded(true) bodyPart:setDeepWoundTime(baseDamage - surgeonFactor) - patientStats:setEndurance(surgeonFactor) - patientStats:setStress(baseDamage - surgeonFactor) + patientStats:set(CharacterStat.ENDURANCE, surgeonFactor) + patientStats:set(CharacterStat.STRESS, baseDamage - surgeonFactor) end ---Execute the amputation. This method doesn't check if the upper limb has been amputated or not, so if @@ -190,8 +190,10 @@ function AmputationHandler:execute(damagePlayer) -- Cache highest amputation and hand feasibility CachedDataHandler.CalculateCacheableValues(username) + -- TODO Test this again for 42.13 -- If the part was actually infected, heal the player, if they were in time (infectionLevel < 20) - if bd:getInfectionLevel() < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then + local infectionLevel = self.patientPl:getStats():get(CharacterStat.ZOMBIE_INFECTION) + if infectionLevel < 20 and bodyPart:isInfected() and not dcInst:getIsIgnoredPartInfected() then LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst) end @@ -208,4 +210,4 @@ function AmputationHandler:close() AmputationHandler.instance = nil end -return AmputationHandler \ No newline at end of file +return AmputationHandler diff --git a/common/media/lua/client/TOC/Handlers/CachedDataHandler.lua b/42/media/lua/client/TOC/Handlers/CachedDataHandler.lua similarity index 100% rename from common/media/lua/client/TOC/Handlers/CachedDataHandler.lua rename to 42/media/lua/client/TOC/Handlers/CachedDataHandler.lua diff --git a/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua b/42/media/lua/client/TOC/Handlers/ProsthesisHandler.lua similarity index 95% rename from common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua rename to 42/media/lua/client/TOC/Handlers/ProsthesisHandler.lua index 0ba1e3a..7b9434e 100644 --- a/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua +++ b/42/media/lua/client/TOC/Handlers/ProsthesisHandler.lua @@ -9,7 +9,7 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive") ---@class ProsthesisHandler local ProsthesisHandler = {} -local bodylocArmProstBaseline = "TOC_ArmProst" +local bodylocArmProstBaseline = "toc:toc_armprost" --local bodyLocLegProst = "TOC_LegProst" ---Check if the following item is a prosthesis or not @@ -17,13 +17,12 @@ local bodylocArmProstBaseline = "TOC_ArmProst" ---@return boolean function ProsthesisHandler.CheckIfProst(item) -- TODO Won't be correct when prost for legs are gonna be in - --TOC_DEBUG.print("Checking if item is prost") if item == nil then - --TOC_DEBUG.print("Not prost") + TOC_DEBUG.print("Not prost") return false end - return item:getBodyLocation():contains(bodylocArmProstBaseline) + return item:getBodyLocation():toString():contains(bodylocArmProstBaseline) end ---Get the grouping for the prosthesis @@ -35,7 +34,7 @@ function ProsthesisHandler.GetGroup(item) local bodyLocation = item:getBodyLocation() local position - if bodyLocation:contains(bodylocArmProstBaseline) then + if bodyLocation:toString():contains(bodylocArmProstBaseline) then position = "Top_" else TOC_DEBUG.print("Something is wrong, no position in this item") diff --git a/common/media/lua/client/TOC/Main.lua b/42/media/lua/client/TOC/Main.lua similarity index 98% rename from common/media/lua/client/TOC/Main.lua rename to 42/media/lua/client/TOC/Main.lua index c13f4b8..3401549 100644 --- a/common/media/lua/client/TOC/Main.lua +++ b/42/media/lua/client/TOC/Main.lua @@ -6,7 +6,7 @@ require("TOC/Events") ---@class Main local Main = { - _version = "2.2.2" + _version = "2.3" } function Main.Start() diff --git a/common/media/lua/client/TOC/Tests.lua b/42/media/lua/client/TOC/Tests.lua similarity index 100% rename from common/media/lua/client/TOC/Tests.lua rename to 42/media/lua/client/TOC/Tests.lua diff --git a/common/media/lua/client/TOC/TimedActions/CauterizeAction.lua b/42/media/lua/client/TOC/TimedActions/CauterizeAction.lua similarity index 100% rename from common/media/lua/client/TOC/TimedActions/CauterizeAction.lua rename to 42/media/lua/client/TOC/TimedActions/CauterizeAction.lua diff --git a/common/media/lua/client/TOC/TimedActions/CleanWoundAction.lua b/42/media/lua/client/TOC/TimedActions/CleanWoundAction.lua similarity index 98% rename from common/media/lua/client/TOC/TimedActions/CleanWoundAction.lua rename to 42/media/lua/client/TOC/TimedActions/CleanWoundAction.lua index 2ebfbea..406fa4a 100644 --- a/common/media/lua/client/TOC/TimedActions/CleanWoundAction.lua +++ b/42/media/lua/client/TOC/TimedActions/CleanWoundAction.lua @@ -87,7 +87,7 @@ function CleanWoundAction:perform() TOC_DEBUG.print("CleanWound for " .. self.otherPlayer:getUsername()) - if self.character:HasTrait("Hemophobic") then + if self.character:hasTrait("Hemophobic") then self.character:getStats():setPanic(self.character:getStats():getPanic() + 15) end diff --git a/common/media/lua/client/TOC/TimedActions/CutLimbAction.lua b/42/media/lua/client/TOC/TimedActions/CutLimbAction.lua similarity index 100% rename from common/media/lua/client/TOC/TimedActions/CutLimbAction.lua rename to 42/media/lua/client/TOC/TimedActions/CutLimbAction.lua diff --git a/common/media/lua/client/TOC/TimedActions/IgnoredActions.lua b/42/media/lua/client/TOC/TimedActions/IgnoredActions.lua similarity index 100% rename from common/media/lua/client/TOC/TimedActions/IgnoredActions.lua rename to 42/media/lua/client/TOC/TimedActions/IgnoredActions.lua diff --git a/common/media/lua/client/TOC/TimedActions/WashYourselfOverride.lua b/42/media/lua/client/TOC/TimedActions/WashYourselfOverride.lua similarity index 100% rename from common/media/lua/client/TOC/TimedActions/WashYourselfOverride.lua rename to 42/media/lua/client/TOC/TimedActions/WashYourselfOverride.lua diff --git a/common/media/lua/client/TOC/UI/ConfirmationPanel.lua b/42/media/lua/client/TOC/UI/ConfirmationPanel.lua similarity index 100% rename from common/media/lua/client/TOC/UI/ConfirmationPanel.lua rename to 42/media/lua/client/TOC/UI/ConfirmationPanel.lua diff --git a/common/media/lua/client/TOC/UI/HealthPanel.lua b/42/media/lua/client/TOC/UI/HealthPanel.lua similarity index 100% rename from common/media/lua/client/TOC/UI/HealthPanel.lua rename to 42/media/lua/client/TOC/UI/HealthPanel.lua diff --git a/common/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua b/42/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua similarity index 100% rename from common/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua rename to 42/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua diff --git a/common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua b/42/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua similarity index 100% rename from common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua rename to 42/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua diff --git a/common/media/lua/client/TOC/UI/Interactions/WoundCleaningInteractionHandler.lua b/42/media/lua/client/TOC/UI/Interactions/WoundCleaningInteractionHandler.lua similarity index 100% rename from common/media/lua/client/TOC/UI/Interactions/WoundCleaningInteractionHandler.lua rename to 42/media/lua/client/TOC/UI/Interactions/WoundCleaningInteractionHandler.lua diff --git a/common/media/lua/client/TOC/UI/SurgeryInteractions.lua b/42/media/lua/client/TOC/UI/SurgeryInteractions.lua similarity index 93% rename from common/media/lua/client/TOC/UI/SurgeryInteractions.lua rename to 42/media/lua/client/TOC/UI/SurgeryInteractions.lua index a49d20f..2efafe8 100644 --- a/common/media/lua/client/TOC/UI/SurgeryInteractions.lua +++ b/42/media/lua/client/TOC/UI/SurgeryInteractions.lua @@ -68,9 +68,10 @@ local function AddStoveContextMenu(playerNum, context, worldObjects, test) -- Notifications, in case the player can't do the action - local isPlayerCourageous = pl:HasTrait("Brave") or pl:HasTrait("Desensitized") or pl:getPerkLevel(Perks.Strength) > 5 - local isTempHighEnough = stoveObj:getCurrentTemperature() >= 250 + local isPlayerCourageous = pl:hasTrait(CharacterTrait.BRAVE) or pl:hasTrait(CharacterTrait.DESENSITIZED) or pl:getPerkLevel(Perks.Strength) > 5 + local isTempHighEnough = stoveObj:getCurrentTemperature()-1 >= 2.50 local isLimbFree = not dcInst:getIsProstEquipped(limbName) + TOC_DEBUG.print(stoveObj:getCurrentTemperature()) option.notAvailable = not(isPlayerCourageous and isTempHighEnough and isLimbFree) if not isTempHighEnough then diff --git a/common/media/lua/client/TOC/Zombies/ZombiesAmputation.lua b/42/media/lua/client/TOC/Zombies/ZombiesAmputation.lua similarity index 100% rename from common/media/lua/client/TOC/Zombies/ZombiesAmputation.lua rename to 42/media/lua/client/TOC/Zombies/ZombiesAmputation.lua diff --git a/common/media/lua/client/lua_timers.lua b/42/media/lua/client/lua_timers.lua similarity index 100% rename from common/media/lua/client/lua_timers.lua rename to 42/media/lua/client/lua_timers.lua diff --git a/common/media/lua/server/TOC/DebugCommands.lua b/42/media/lua/server/TOC/DebugCommands.lua similarity index 100% rename from common/media/lua/server/TOC/DebugCommands.lua rename to 42/media/lua/server/TOC/DebugCommands.lua diff --git a/common/media/lua/server/TOC/Distributions.lua b/42/media/lua/server/TOC/Distributions.lua similarity index 100% rename from common/media/lua/server/TOC/Distributions.lua rename to 42/media/lua/server/TOC/Distributions.lua diff --git a/common/media/lua/server/TOC/LimitActionsController.lua b/42/media/lua/server/TOC/LimitActionsController.lua similarity index 100% rename from common/media/lua/server/TOC/LimitActionsController.lua rename to 42/media/lua/server/TOC/LimitActionsController.lua diff --git a/common/media/lua/server/TOC/ServerDataHandler.lua b/42/media/lua/server/TOC/ServerDataHandler.lua similarity index 100% rename from common/media/lua/server/TOC/ServerDataHandler.lua rename to 42/media/lua/server/TOC/ServerDataHandler.lua diff --git a/common/media/lua/server/TOC/ServerRelayCommands.lua b/42/media/lua/server/TOC/ServerRelayCommands.lua similarity index 100% rename from common/media/lua/server/TOC/ServerRelayCommands.lua rename to 42/media/lua/server/TOC/ServerRelayCommands.lua diff --git a/42/media/lua/shared/TOC/BodyLocations.lua b/42/media/lua/shared/TOC/BodyLocations.lua new file mode 100644 index 0000000..15c71ca --- /dev/null +++ b/42/media/lua/shared/TOC/BodyLocations.lua @@ -0,0 +1,109 @@ +--Based on RabenRabo's bodylocation solution from their mod "Fantasy Bodyparts" and "Fantasy Legs" sub-mod. +--Modified by GanydeBielovzki with permission for batch use for the Frockin' Splendor franchise and spin-offs. +--To copy, further modify or otherwise use this code the original creator and the modifier must be credited. + +local function copyBodyLocationProperties(oldGroup, oldLocID, newGroup) + for k = 0, oldGroup:size()-1 do + local otherLocID = oldGroup:getLocationByIndex(k):getId() + if oldGroup:isExclusive(oldLocID, otherLocID) + then + newGroup:setExclusive(oldLocID, otherLocID) + end + if oldGroup:isHideModel(oldLocID, otherLocID) + then + newGroup:setHideModel(oldLocID, otherLocID) + end + if oldGroup:isAltModel(oldLocID, otherLocID) + then + newGroup:setAltModel(oldLocID, otherLocID) + end + end +end + +local function addBodyLocationsAt(groupName, locationList) + local results = {} + + -- get list (!!actually a view!!) of all groups and copy to array (BodyLocations.reset() will also clear the view) + local allGroupsList = BodyLocations.getAllGroups() + local allGroups = {} + for i = 0, allGroupsList:size()-1 do + allGroups[i + 1] = allGroupsList:get(i) + end + + BodyLocations.reset() + + -- recreate all groups/bodylocations and insert new bodylocations + for i = 1, #allGroups do + local oldGroup = allGroups[i] + local newGroup = BodyLocations.getGroup(oldGroup:getId()) + + -- FIRST: Process all original locations AND insert new ones at correct positions + for j = 0, oldGroup:size()-1 do + local oldLoc = oldGroup:getLocationByIndex(j) + local oldLocID = oldLoc:getId() + + -- For each location definition, check if it should be inserted here + for _, locDef in ipairs(locationList) do + if oldGroup:getId() == groupName then + local newLocID = type(locDef.name) ~= "string" and locDef.name or + ItemBodyLocation.get(ResourceLocation.of(locDef.name)) + + local refLocID = type(locDef.reference) ~= "string" and locDef.reference or + ResourceLocation.of(locDef.reference) + + local isTargetGroupAndLoc = refLocID == oldLocID + + if isTargetGroupAndLoc and locDef.before then + results[locDef.name] = newGroup:getOrCreateLocation(newLocID) + end + end + end + + -- Add the original location + newGroup:getOrCreateLocation(oldLocID) + + -- Check for "after" insertions + for _, locDef in ipairs(locationList) do + if oldGroup:getId() == groupName then + local newLocID = type(locDef.name) ~= "string" and locDef.name or + ItemBodyLocation.get(ResourceLocation.of(locDef.name)) + + local refLocID = type(locDef.reference) ~= "string" and locDef.reference or + ResourceLocation.of(locDef.reference) + + local isTargetGroupAndLoc = refLocID == oldLocID + + if isTargetGroupAndLoc and not locDef.before then + results[locDef.name] = newGroup:getOrCreateLocation(newLocID) + end + end + end + end + + -- SECOND: copy bodylocation properties from old groups to new groups + for j = 0, oldGroup:size()-1 do + local oldLocID = oldGroup:getLocationByIndex(j):getId() + newGroup:setMultiItem(oldLocID, oldGroup:isMultiItem(oldLocID)) + copyBodyLocationProperties(oldGroup, oldLocID, newGroup) + end + end + + return results +end + +local results = addBodyLocationsAt("Human", { + {name = "toc:Arm_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:Arm_R", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:ArmProst_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:ArmProst_R", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:ArmAccessory_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:ArmAccessory_R", reference = ItemBodyLocation.FULL_TOP, before = false}, +}) + + +results['toc:Arm_L']:setMultiItem(true) +results['toc:Arm_R']:setMultiItem(true) +results['toc:ArmProst_L']:setMultiItem(true) +results['toc:ArmProst_R']:setMultiItem(true) +results['toc:ArmAccessory_L']:setMultiItem(true) +results['toc:ArmAccessory_R']:setMultiItem(true) diff --git a/common/media/lua/shared/TOC/CommandsData.lua b/42/media/lua/shared/TOC/CommandsData.lua similarity index 100% rename from common/media/lua/shared/TOC/CommandsData.lua rename to 42/media/lua/shared/TOC/CommandsData.lua diff --git a/common/media/lua/shared/TOC/Debug.lua b/42/media/lua/shared/TOC/Debug.lua similarity index 100% rename from common/media/lua/shared/TOC/Debug.lua rename to 42/media/lua/shared/TOC/Debug.lua diff --git a/common/media/lua/shared/TOC/OverridenMethodsArchive.lua b/42/media/lua/shared/TOC/OverridenMethodsArchive.lua similarity index 100% rename from common/media/lua/shared/TOC/OverridenMethodsArchive.lua rename to 42/media/lua/shared/TOC/OverridenMethodsArchive.lua diff --git a/42/media/lua/shared/TOC/Registries.lua b/42/media/lua/shared/TOC/Registries.lua new file mode 100644 index 0000000..aba6942 --- /dev/null +++ b/42/media/lua/shared/TOC/Registries.lua @@ -0,0 +1 @@ +return _TOCRegistries diff --git a/common/media/lua/shared/TOC/StaticData.lua b/42/media/lua/shared/TOC/StaticData.lua similarity index 96% rename from common/media/lua/shared/TOC/StaticData.lua rename to 42/media/lua/shared/TOC/StaticData.lua index fe181bc..d4804e1 100644 --- a/common/media/lua/shared/TOC/StaticData.lua +++ b/42/media/lua/shared/TOC/StaticData.lua @@ -5,7 +5,6 @@ ---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean} --------------------------- - -- _STR = Only strings, no index -- _IND_STR = indexed Strings -- _IND_BPT = Indexed BodyPartType @@ -49,15 +48,6 @@ 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", -} -- No "MAX" here. StaticData.IGNORED_BODYLOCS_BPT = { @@ -193,8 +183,8 @@ end StaticData.TOURNIQUET_BODYLOCS_TO_GROUPS_IND_STR = { - ["HandsLeft"] = StaticData.AMP_GROUPS_IND_STR.Top_L, - ["HandsRight"] = StaticData.AMP_GROUPS_IND_STR.Top_R + [ItemBodyLocation.HANDS_LEFT] = StaticData.AMP_GROUPS_IND_STR.Top_L, + [ItemBodyLocation.HANDS_RIGHT] = StaticData.AMP_GROUPS_IND_STR.Top_R } @@ -242,7 +232,7 @@ end StaticData.TRAITS_BP = { Amputee_Hand = "Hand_L", Amputee_ForeArm = "ForeArm_L", - Amputee_UpperArm = "UpperArm_L" + Amputee_UpperArm = "UpperArm_L", } ----------------- diff --git a/common/media/lua/shared/Translate/DE/ContextMenu_DE.txt b/42/media/lua/shared/Translate/DE/ContextMenu_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/ContextMenu_DE.txt rename to 42/media/lua/shared/Translate/DE/ContextMenu_DE.txt diff --git a/common/media/lua/shared/Translate/DE/IG_UI_DE.txt b/42/media/lua/shared/Translate/DE/IG_UI_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/IG_UI_DE.txt rename to 42/media/lua/shared/Translate/DE/IG_UI_DE.txt diff --git a/common/media/lua/shared/Translate/DE/ItemName_DE.txt b/42/media/lua/shared/Translate/DE/ItemName_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/ItemName_DE.txt rename to 42/media/lua/shared/Translate/DE/ItemName_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Recipes_DE.txt b/42/media/lua/shared/Translate/DE/Recipes_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/Recipes_DE.txt rename to 42/media/lua/shared/Translate/DE/Recipes_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Sandbox_DE.txt b/42/media/lua/shared/Translate/DE/Sandbox_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/Sandbox_DE.txt rename to 42/media/lua/shared/Translate/DE/Sandbox_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Tooltip_DE.txt b/42/media/lua/shared/Translate/DE/Tooltip_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/Tooltip_DE.txt rename to 42/media/lua/shared/Translate/DE/Tooltip_DE.txt diff --git a/common/media/lua/shared/Translate/DE/UI_DE.txt b/42/media/lua/shared/Translate/DE/UI_DE.txt similarity index 100% rename from common/media/lua/shared/Translate/DE/UI_DE.txt rename to 42/media/lua/shared/Translate/DE/UI_DE.txt diff --git a/common/media/lua/shared/Translate/EN/ContextMenu_EN.txt b/42/media/lua/shared/Translate/EN/ContextMenu_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/ContextMenu_EN.txt rename to 42/media/lua/shared/Translate/EN/ContextMenu_EN.txt diff --git a/common/media/lua/shared/Translate/EN/IG_UI_EN.txt b/42/media/lua/shared/Translate/EN/IG_UI_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/IG_UI_EN.txt rename to 42/media/lua/shared/Translate/EN/IG_UI_EN.txt diff --git a/common/media/lua/shared/Translate/EN/ItemName_EN.txt b/42/media/lua/shared/Translate/EN/ItemName_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/ItemName_EN.txt rename to 42/media/lua/shared/Translate/EN/ItemName_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Recipes_EN.txt b/42/media/lua/shared/Translate/EN/Recipes_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/Recipes_EN.txt rename to 42/media/lua/shared/Translate/EN/Recipes_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Sandbox_EN.txt b/42/media/lua/shared/Translate/EN/Sandbox_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/Sandbox_EN.txt rename to 42/media/lua/shared/Translate/EN/Sandbox_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Tooltip_EN.txt b/42/media/lua/shared/Translate/EN/Tooltip_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/Tooltip_EN.txt rename to 42/media/lua/shared/Translate/EN/Tooltip_EN.txt diff --git a/common/media/lua/shared/Translate/EN/UI_EN.txt b/42/media/lua/shared/Translate/EN/UI_EN.txt similarity index 100% rename from common/media/lua/shared/Translate/EN/UI_EN.txt rename to 42/media/lua/shared/Translate/EN/UI_EN.txt diff --git a/common/media/lua/shared/Translate/FR/ContextMenu_FR.txt b/42/media/lua/shared/Translate/FR/ContextMenu_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/ContextMenu_FR.txt rename to 42/media/lua/shared/Translate/FR/ContextMenu_FR.txt diff --git a/common/media/lua/shared/Translate/FR/IG_UI_FR.txt b/42/media/lua/shared/Translate/FR/IG_UI_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/IG_UI_FR.txt rename to 42/media/lua/shared/Translate/FR/IG_UI_FR.txt diff --git a/common/media/lua/shared/Translate/FR/ItemName_FR.txt b/42/media/lua/shared/Translate/FR/ItemName_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/ItemName_FR.txt rename to 42/media/lua/shared/Translate/FR/ItemName_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Recipes_FR.txt b/42/media/lua/shared/Translate/FR/Recipes_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/Recipes_FR.txt rename to 42/media/lua/shared/Translate/FR/Recipes_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Sandbox_FR.txt b/42/media/lua/shared/Translate/FR/Sandbox_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/Sandbox_FR.txt rename to 42/media/lua/shared/Translate/FR/Sandbox_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Tooltip_FR.txt b/42/media/lua/shared/Translate/FR/Tooltip_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/Tooltip_FR.txt rename to 42/media/lua/shared/Translate/FR/Tooltip_FR.txt diff --git a/common/media/lua/shared/Translate/FR/UI_FR.txt b/42/media/lua/shared/Translate/FR/UI_FR.txt similarity index 100% rename from common/media/lua/shared/Translate/FR/UI_FR.txt rename to 42/media/lua/shared/Translate/FR/UI_FR.txt diff --git a/common/media/lua/shared/Translate/IT/ContextMenu_IT.txt b/42/media/lua/shared/Translate/IT/ContextMenu_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/ContextMenu_IT.txt rename to 42/media/lua/shared/Translate/IT/ContextMenu_IT.txt diff --git a/common/media/lua/shared/Translate/IT/IG_UI_IT.txt b/42/media/lua/shared/Translate/IT/IG_UI_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/IG_UI_IT.txt rename to 42/media/lua/shared/Translate/IT/IG_UI_IT.txt diff --git a/common/media/lua/shared/Translate/IT/ItemName_IT.txt b/42/media/lua/shared/Translate/IT/ItemName_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/ItemName_IT.txt rename to 42/media/lua/shared/Translate/IT/ItemName_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Recipes_IT.txt b/42/media/lua/shared/Translate/IT/Recipes_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/Recipes_IT.txt rename to 42/media/lua/shared/Translate/IT/Recipes_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Sandbox_IT.txt b/42/media/lua/shared/Translate/IT/Sandbox_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/Sandbox_IT.txt rename to 42/media/lua/shared/Translate/IT/Sandbox_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Tooltip_IT.txt b/42/media/lua/shared/Translate/IT/Tooltip_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/Tooltip_IT.txt rename to 42/media/lua/shared/Translate/IT/Tooltip_IT.txt diff --git a/common/media/lua/shared/Translate/IT/UI_IT.txt b/42/media/lua/shared/Translate/IT/UI_IT.txt similarity index 100% rename from common/media/lua/shared/Translate/IT/UI_IT.txt rename to 42/media/lua/shared/Translate/IT/UI_IT.txt diff --git a/common/media/lua/shared/Translate/KO/ContextMenu_KO.txt b/42/media/lua/shared/Translate/KO/ContextMenu_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/ContextMenu_KO.txt rename to 42/media/lua/shared/Translate/KO/ContextMenu_KO.txt diff --git a/common/media/lua/shared/Translate/KO/IG_UI_KO.txt b/42/media/lua/shared/Translate/KO/IG_UI_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/IG_UI_KO.txt rename to 42/media/lua/shared/Translate/KO/IG_UI_KO.txt diff --git a/common/media/lua/shared/Translate/KO/ItemName_KO.txt b/42/media/lua/shared/Translate/KO/ItemName_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/ItemName_KO.txt rename to 42/media/lua/shared/Translate/KO/ItemName_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Recipes_KO.txt b/42/media/lua/shared/Translate/KO/Recipes_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/Recipes_KO.txt rename to 42/media/lua/shared/Translate/KO/Recipes_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Sandbox_KO.txt b/42/media/lua/shared/Translate/KO/Sandbox_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/Sandbox_KO.txt rename to 42/media/lua/shared/Translate/KO/Sandbox_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Tooltip_KO.txt b/42/media/lua/shared/Translate/KO/Tooltip_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/Tooltip_KO.txt rename to 42/media/lua/shared/Translate/KO/Tooltip_KO.txt diff --git a/common/media/lua/shared/Translate/KO/UI_KO.txt b/42/media/lua/shared/Translate/KO/UI_KO.txt similarity index 100% rename from common/media/lua/shared/Translate/KO/UI_KO.txt rename to 42/media/lua/shared/Translate/KO/UI_KO.txt diff --git a/common/media/lua/shared/Translate/RU/ContextMenu_RU.txt b/42/media/lua/shared/Translate/RU/ContextMenu_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/ContextMenu_RU.txt rename to 42/media/lua/shared/Translate/RU/ContextMenu_RU.txt diff --git a/common/media/lua/shared/Translate/RU/IG_UI_RU.txt b/42/media/lua/shared/Translate/RU/IG_UI_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/IG_UI_RU.txt rename to 42/media/lua/shared/Translate/RU/IG_UI_RU.txt diff --git a/common/media/lua/shared/Translate/RU/ItemName_RU.txt b/42/media/lua/shared/Translate/RU/ItemName_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/ItemName_RU.txt rename to 42/media/lua/shared/Translate/RU/ItemName_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Recipes_RU.txt b/42/media/lua/shared/Translate/RU/Recipes_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/Recipes_RU.txt rename to 42/media/lua/shared/Translate/RU/Recipes_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Sandbox_RU.txt b/42/media/lua/shared/Translate/RU/Sandbox_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/Sandbox_RU.txt rename to 42/media/lua/shared/Translate/RU/Sandbox_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Tooltip_RU.txt b/42/media/lua/shared/Translate/RU/Tooltip_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/Tooltip_RU.txt rename to 42/media/lua/shared/Translate/RU/Tooltip_RU.txt diff --git a/common/media/lua/shared/Translate/RU/UI_RU.txt b/42/media/lua/shared/Translate/RU/UI_RU.txt similarity index 100% rename from common/media/lua/shared/Translate/RU/UI_RU.txt rename to 42/media/lua/shared/Translate/RU/UI_RU.txt diff --git a/common/media/lua/shared/Translate/TR/ContextMenu_TR.txt b/42/media/lua/shared/Translate/TR/ContextMenu_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/ContextMenu_TR.txt rename to 42/media/lua/shared/Translate/TR/ContextMenu_TR.txt diff --git a/common/media/lua/shared/Translate/TR/IG_UI_TR.txt b/42/media/lua/shared/Translate/TR/IG_UI_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/IG_UI_TR.txt rename to 42/media/lua/shared/Translate/TR/IG_UI_TR.txt diff --git a/common/media/lua/shared/Translate/TR/ItemName_TR.txt b/42/media/lua/shared/Translate/TR/ItemName_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/ItemName_TR.txt rename to 42/media/lua/shared/Translate/TR/ItemName_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Recipes_TR.txt b/42/media/lua/shared/Translate/TR/Recipes_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/Recipes_TR.txt rename to 42/media/lua/shared/Translate/TR/Recipes_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Sandbox_TR.txt b/42/media/lua/shared/Translate/TR/Sandbox_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/Sandbox_TR.txt rename to 42/media/lua/shared/Translate/TR/Sandbox_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Tooltip_TR.txt b/42/media/lua/shared/Translate/TR/Tooltip_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/Tooltip_TR.txt rename to 42/media/lua/shared/Translate/TR/Tooltip_TR.txt diff --git a/common/media/lua/shared/Translate/TR/UI_TR.txt b/42/media/lua/shared/Translate/TR/UI_TR.txt similarity index 100% rename from common/media/lua/shared/Translate/TR/UI_TR.txt rename to 42/media/lua/shared/Translate/TR/UI_TR.txt diff --git a/common/media/lua/shared/Translate/UA/ContextMenu_UA.txt b/42/media/lua/shared/Translate/UA/ContextMenu_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/ContextMenu_UA.txt rename to 42/media/lua/shared/Translate/UA/ContextMenu_UA.txt diff --git a/common/media/lua/shared/Translate/UA/IG_UI_UA.txt b/42/media/lua/shared/Translate/UA/IG_UI_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/IG_UI_UA.txt rename to 42/media/lua/shared/Translate/UA/IG_UI_UA.txt diff --git a/common/media/lua/shared/Translate/UA/ItemName_UA.txt b/42/media/lua/shared/Translate/UA/ItemName_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/ItemName_UA.txt rename to 42/media/lua/shared/Translate/UA/ItemName_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Recipes_UA.txt b/42/media/lua/shared/Translate/UA/Recipes_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/Recipes_UA.txt rename to 42/media/lua/shared/Translate/UA/Recipes_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Sandbox_UA.txt b/42/media/lua/shared/Translate/UA/Sandbox_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/Sandbox_UA.txt rename to 42/media/lua/shared/Translate/UA/Sandbox_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Tooltip_UA.txt b/42/media/lua/shared/Translate/UA/Tooltip_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/Tooltip_UA.txt rename to 42/media/lua/shared/Translate/UA/Tooltip_UA.txt diff --git a/common/media/lua/shared/Translate/UA/UI_UA.txt b/42/media/lua/shared/Translate/UA/UI_UA.txt similarity index 100% rename from common/media/lua/shared/Translate/UA/UI_UA.txt rename to 42/media/lua/shared/Translate/UA/UI_UA.txt diff --git a/common/media/models_X/Amputation/Amputation_GenericModel.fbx b/42/media/models_X/Amputation/Amputation_GenericModel.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_GenericModel.fbx rename to 42/media/models_X/Amputation/Amputation_GenericModel.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_Hand_Female.fbx b/42/media/models_X/Amputation/Amputation_Left_Hand_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_Hand_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Left_Hand_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_Hand_Male.fbx b/42/media/models_X/Amputation/Amputation_Left_Hand_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_Hand_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Left_Hand_Male.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_LowerArm_Female.fbx b/42/media/models_X/Amputation/Amputation_Left_LowerArm_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_LowerArm_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Left_LowerArm_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_LowerArm_Male.fbx b/42/media/models_X/Amputation/Amputation_Left_LowerArm_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_LowerArm_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Left_LowerArm_Male.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_UpperArm_Female.fbx b/42/media/models_X/Amputation/Amputation_Left_UpperArm_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_UpperArm_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Left_UpperArm_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Left_UpperArm_Male.fbx b/42/media/models_X/Amputation/Amputation_Left_UpperArm_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Left_UpperArm_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Left_UpperArm_Male.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_Hand_Female.fbx b/42/media/models_X/Amputation/Amputation_Right_Hand_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_Hand_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Right_Hand_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_Hand_Male.fbx b/42/media/models_X/Amputation/Amputation_Right_Hand_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_Hand_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Right_Hand_Male.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_LowerArm_Female.fbx b/42/media/models_X/Amputation/Amputation_Right_LowerArm_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_LowerArm_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Right_LowerArm_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_LowerArm_Male.fbx b/42/media/models_X/Amputation/Amputation_Right_LowerArm_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_LowerArm_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Right_LowerArm_Male.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_UpperArm_Female.fbx b/42/media/models_X/Amputation/Amputation_Right_UpperArm_Female.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_UpperArm_Female.fbx rename to 42/media/models_X/Amputation/Amputation_Right_UpperArm_Female.fbx diff --git a/common/media/models_X/Amputation/Amputation_Right_UpperArm_Male.fbx b/42/media/models_X/Amputation/Amputation_Right_UpperArm_Male.fbx similarity index 100% rename from common/media/models_X/Amputation/Amputation_Right_UpperArm_Male.fbx rename to 42/media/models_X/Amputation/Amputation_Right_UpperArm_Male.fbx diff --git a/common/media/models_X/Prosthesis/hookArm_Ground.fbx b/42/media/models_X/Prosthesis/hookArm_Ground.fbx similarity index 100% rename from common/media/models_X/Prosthesis/hookArm_Ground.fbx rename to 42/media/models_X/Prosthesis/hookArm_Ground.fbx diff --git a/common/media/models_X/Prosthesis/hookArm_L_F.fbx b/42/media/models_X/Prosthesis/hookArm_L_F.fbx similarity index 100% rename from common/media/models_X/Prosthesis/hookArm_L_F.fbx rename to 42/media/models_X/Prosthesis/hookArm_L_F.fbx diff --git a/common/media/models_X/Prosthesis/hookArm_L_M.fbx b/42/media/models_X/Prosthesis/hookArm_L_M.fbx similarity index 100% rename from common/media/models_X/Prosthesis/hookArm_L_M.fbx rename to 42/media/models_X/Prosthesis/hookArm_L_M.fbx diff --git a/common/media/models_X/Prosthesis/hookArm_R_F.fbx b/42/media/models_X/Prosthesis/hookArm_R_F.fbx similarity index 100% rename from common/media/models_X/Prosthesis/hookArm_R_F.fbx rename to 42/media/models_X/Prosthesis/hookArm_R_F.fbx diff --git a/common/media/models_X/Prosthesis/hookArm_R_M.fbx b/42/media/models_X/Prosthesis/hookArm_R_M.fbx similarity index 100% rename from common/media/models_X/Prosthesis/hookArm_R_M.fbx rename to 42/media/models_X/Prosthesis/hookArm_R_M.fbx diff --git a/common/media/models_X/Prosthesis/normalArm_Ground.fbx b/42/media/models_X/Prosthesis/normalArm_Ground.fbx similarity index 100% rename from common/media/models_X/Prosthesis/normalArm_Ground.fbx rename to 42/media/models_X/Prosthesis/normalArm_Ground.fbx diff --git a/common/media/models_X/Prosthesis/normalArm_L_F.fbx b/42/media/models_X/Prosthesis/normalArm_L_F.fbx similarity index 100% rename from common/media/models_X/Prosthesis/normalArm_L_F.fbx rename to 42/media/models_X/Prosthesis/normalArm_L_F.fbx diff --git a/common/media/models_X/Prosthesis/normalArm_L_M.fbx b/42/media/models_X/Prosthesis/normalArm_L_M.fbx similarity index 100% rename from common/media/models_X/Prosthesis/normalArm_L_M.fbx rename to 42/media/models_X/Prosthesis/normalArm_L_M.fbx diff --git a/common/media/models_X/Prosthesis/normalArm_R_F.fbx b/42/media/models_X/Prosthesis/normalArm_R_F.fbx similarity index 100% rename from common/media/models_X/Prosthesis/normalArm_R_F.fbx rename to 42/media/models_X/Prosthesis/normalArm_R_F.fbx diff --git a/common/media/models_X/Prosthesis/normalArm_R_M.fbx b/42/media/models_X/Prosthesis/normalArm_R_M.fbx similarity index 100% rename from common/media/models_X/Prosthesis/normalArm_R_M.fbx rename to 42/media/models_X/Prosthesis/normalArm_R_M.fbx diff --git a/common/media/models_X/Surgery/Tourniquet_Ground.fbx b/42/media/models_X/Surgery/Tourniquet_Ground.fbx similarity index 100% rename from common/media/models_X/Surgery/Tourniquet_Ground.fbx rename to 42/media/models_X/Surgery/Tourniquet_Ground.fbx diff --git a/common/media/models_X/Surgery/Tourniquet_Left.fbx b/42/media/models_X/Surgery/Tourniquet_Left.fbx similarity index 100% rename from common/media/models_X/Surgery/Tourniquet_Left.fbx rename to 42/media/models_X/Surgery/Tourniquet_Left.fbx diff --git a/common/media/models_X/Surgery/Tourniquet_Right.fbx b/42/media/models_X/Surgery/Tourniquet_Right.fbx similarity index 100% rename from common/media/models_X/Surgery/Tourniquet_Right.fbx rename to 42/media/models_X/Surgery/Tourniquet_Right.fbx diff --git a/common/media/perks.txt b/42/media/perks.txt similarity index 100% rename from common/media/perks.txt rename to 42/media/perks.txt diff --git a/42/media/registries.lua b/42/media/registries.lua new file mode 100644 index 0000000..eb4218e --- /dev/null +++ b/42/media/registries.lua @@ -0,0 +1,17 @@ +_TOCRegistries = {} + +_TOCRegistries.traits = { + Amputee_Hand = CharacterTrait.register("toc:amputee_hand"), + Amputee_ForeArm = CharacterTrait.register("toc:amputee_forearm"), + Amputee_UpperArm = CharacterTrait.register("toc:amputee_upperarm"), +} + +_TOCRegistries.bodylocations = { + TOC_Arm_L = ItemBodyLocation.register("toc:Arm_L"), + TOC_Arm_R = ItemBodyLocation.register("toc:Arm_R"), + TOC_ArmProst_L = ItemBodyLocation.register("toc:ArmProst_L"), + TOC_ArmProst_R = ItemBodyLocation.register("toc:ArmProst_R"), + TOC_ArmAccessory_L = ItemBodyLocation.register("toc:ArmAccessory_L"), + TOC_ArmAccessory_R = ItemBodyLocation.register("toc:ArmAccessory_R"), +} + diff --git a/common/media/sandbox-options.txt b/42/media/sandbox-options.txt similarity index 100% rename from common/media/sandbox-options.txt rename to 42/media/sandbox-options.txt diff --git a/common/media/scripts/TOC_amputation_items.txt b/42/media/scripts/TOC_amputation_items.txt similarity index 86% rename from common/media/scripts/TOC_amputation_items.txt rename to 42/media/scripts/TOC_amputation_items.txt index e34482b..cc8995b 100644 --- a/common/media/scripts/TOC_amputation_items.txt +++ b/42/media/scripts/TOC_amputation_items.txt @@ -7,12 +7,12 @@ module TOC /****************** Clothing that look like a cut limb ******************/ item Amputation_Hand_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Amputation, hidden = true, ClothingItem = Amputation_Hand_R, - BodyLocation = TOC_Arm_R, + BodyLocation = toc:Arm_R, Weight = 0, CombatSpeedModifier = 0.9, @@ -26,12 +26,12 @@ module TOC item Amputation_ForeArm_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Amputation, hidden = true, ClothingItem = Amputation_ForeArm_R, - BodyLocation = TOC_Arm_R, + BodyLocation = toc:Arm_R, Weight = 0, CombatSpeedModifier = 0.8, @@ -44,12 +44,12 @@ module TOC item Amputation_UpperArm_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Amputation, hidden = true, ClothingItem = Amputation_UpperArm_R, - BodyLocation = TOC_Arm_R, + BodyLocation = toc:Arm_R, BloodLocation = UpperArms;UpperBody, Weight = 0, CombatSpeedModifier = 0.7, @@ -61,12 +61,12 @@ module TOC item Amputation_Hand_L { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Amputation, hidden = true, ClothingItem = Amputation_Hand_L, - BodyLocation = TOC_Arm_L, + BodyLocation = toc:Arm_L, Weight = 0, CombatSpeedModifier = 0.9, @@ -80,12 +80,12 @@ module TOC item Amputation_ForeArm_L { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Amputation, hidden = true, ClothingItem = Amputation_ForeArm_L, - BodyLocation = TOC_Arm_L, + BodyLocation = toc:Arm_L, Weight = 0, CombatSpeedModifier = 0.8, @@ -104,7 +104,7 @@ module TOC hidden = true, ClothingItem = Amputation_UpperArm_L, - BodyLocation = TOC_Arm_L, + BodyLocation = toc:Arm_L, Weight = 0, CombatSpeedModifier = 0.7, diff --git a/common/media/scripts/TOC_models.txt b/42/media/scripts/TOC_models.txt similarity index 100% rename from common/media/scripts/TOC_models.txt rename to 42/media/scripts/TOC_models.txt diff --git a/common/media/scripts/TOC_prosthesis_items.txt b/42/media/scripts/TOC_prosthesis_items.txt similarity index 89% rename from common/media/scripts/TOC_prosthesis_items.txt rename to 42/media/scripts/TOC_prosthesis_items.txt index 691dbbc..2f288a0 100644 --- a/common/media/scripts/TOC_prosthesis_items.txt +++ b/42/media/scripts/TOC_prosthesis_items.txt @@ -9,14 +9,14 @@ module TOC item Prost_HookArm_L { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Prosthesis, DisplayName = ProstArmHook, ClothingItem = Prost_HookArm_L, ClothingItemExtra = Prost_HookArm_R, ClothingItemExtraOption = InstallProstRight, clothingExtraSubmenu = InstallProstLeft, - BodyLocation = TOC_ArmProst_L, + BodyLocation = toc:ArmProst_L, Weight = 1.5, CombatSpeedModifier = 1.05, BloodLocation = UpperArms;UpperBody, @@ -31,14 +31,14 @@ module TOC } item Prost_HookArm_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Prosthesis, DisplayName = ProstArmHook, ClothingItem = Prost_HookArm_R, ClothingItemExtra = Prost_HookArm_L, ClothingItemExtraOption = InstallProstLeft, clothingExtraSubmenu = InstallProstRight, - BodyLocation = TOC_ArmProst_R, + BodyLocation = toc:ArmProst_R, Weight = 1.5, CombatSpeedModifier = 1.05, BloodLocation = UpperArms;UpperBody, @@ -53,14 +53,14 @@ module TOC item Prost_NormalArm_L { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Prosthesis, DisplayName = ProstArmHook, ClothingItem = Prost_NormalArm_L, ClothingItemExtra = Prost_NormalArm_R, ClothingItemExtraOption = InstallProstRight, clothingExtraSubmenu = InstallProstLeft, - BodyLocation = TOC_ArmProst_L, + BodyLocation = toc:ArmProst_L, Weight = 2, CombatSpeedModifier = 1.1, BloodLocation = UpperArms;UpperBody, @@ -75,14 +75,14 @@ module TOC item Prost_NormalArm_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Prosthesis, DisplayName = ProstArmHook, ClothingItem = Prost_NormalArm_R, ClothingItemExtra = Prost_NormalArm_L, ClothingItemExtraOption = InstallProstLeft, clothingExtraSubmenu = InstallProstRight, - BodyLocation = TOC_ArmProst_R, + BodyLocation = toc:ArmProst_R, Weight = 2, CombatSpeedModifier = 1.1, BloodLocation = UpperArms;UpperBody, diff --git a/common/media/scripts/TOC_sounds.txt b/42/media/scripts/TOC_sounds.txt similarity index 100% rename from common/media/scripts/TOC_sounds.txt rename to 42/media/scripts/TOC_sounds.txt diff --git a/common/media/scripts/TOC_surgery_items.txt b/42/media/scripts/TOC_surgery_items.txt similarity index 87% rename from common/media/scripts/TOC_surgery_items.txt rename to 42/media/scripts/TOC_surgery_items.txt index aa21297..0d2d954 100644 --- a/common/media/scripts/TOC_surgery_items.txt +++ b/42/media/scripts/TOC_surgery_items.txt @@ -7,7 +7,7 @@ module TOC item Surg_Arm_Tourniquet_L { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Surgery, DisplayName = Tourniquet, @@ -15,7 +15,7 @@ module TOC ClothingItemExtra = Surg_Arm_Tourniquet_R, ClothingItemExtraOption = PutTourniquetArmRight, clothingExtraSubmenu = PutTourniquetArmLeft, - BodyLocation = TOC_ArmAccessory_L, + BodyLocation = toc:ArmAccessory_L, BloodLocation = UpperArms;UpperBody, Weight = 0.25, @@ -27,7 +27,7 @@ module TOC item Surg_Arm_Tourniquet_R { - Type = Clothing, + ItemType = base:Clothing, DisplayCategory = Surgery, DisplayName = Tourniquet, @@ -35,7 +35,7 @@ module TOC ClothingItemExtra = Surg_Arm_Tourniquet_L, ClothingItemExtraOption = PutTourniquetArmLeft, clothingExtraSubmenu = PutTourniquetArmRight, - BodyLocation = TOC_ArmAccessory_R, + BodyLocation = toc:ArmAccessory_R, BloodLocation = UpperArms;UpperBody, Weight = 0.25, diff --git a/42/media/scripts/TOC_traits.txt b/42/media/scripts/TOC_traits.txt new file mode 100644 index 0000000..6a92931 --- /dev/null +++ b/42/media/scripts/TOC_traits.txt @@ -0,0 +1,43 @@ +module TOC +{ + character_trait_definition toc:amputee_hand + { + CharacterTrait = toc:amputee_hand, + IsProfessionTrait = false, + DisabledInMultiplayer = false, + Cost = -8, + UIName = UI_trait_Amputee_Hand, + UIDescription = UI_trait_Amputee_Hand_desc, + XPBoosts = Side_L=4;Fitness=-1;Strength=-1, + GrantedRecipes = Lockpicking;AlarmCheck;CreateBobbyPin;CreateBobbyPin2, + MutuallyExclusiveTraits = toc:amputee_forearm;toc:amputee_upperarm, + + } + + + character_trait_definition toc:amputee_forearm + { + IsProfessionTrait = false, + DisabledInMultiplayer = false, + CharacterTrait = toc:amputee_forearm, + Cost = -10, + UIName = UI_trait_Amputee_ForeArm, + UIDescription = UI_trait_Amputee_ForeArm_desc, + XPBoosts = Side_L=4;Fitness=-1;Strength=-1, + MutuallyExclusiveTraits = toc:amputee_hand;toc:amputee_upperarm, + } + + character_trait_definition toc:amputee_upperarm + { + IsProfessionTrait = false, + DisabledInMultiplayer = false, + CharacterTrait = toc:amputee_upperarm, + Cost = -20, + UIName = UI_trait_Amputee_UpperArm, + UIDescription = UI_trait_Amputee_UpperArm_desc, + XPBoosts = Side_L=4;Fitness=-1;Strength=-1, + GrantedRecipes = Lockpicking;AlarmCheck;CreateBobbyPin;CreateBobbyPin2, + MutuallyExclusiveTraits = toc:amputee_hand;toc:amputee_forearm, + + } +} \ No newline at end of file diff --git a/common/media/sound/Amputation.ogg b/42/media/sound/Amputation.ogg similarity index 100% rename from common/media/sound/Amputation.ogg rename to 42/media/sound/Amputation.ogg diff --git a/common/media/sound/Cauterization.ogg b/42/media/sound/Cauterization.ogg similarity index 100% rename from common/media/sound/Cauterization.ogg rename to 42/media/sound/Cauterization.ogg diff --git a/common/media/textures/Amputations/Human/Forearm/skin01_b.png b/42/media/textures/Amputations/Human/Forearm/skin01_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin01_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin01_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin01_hairy_b.png b/42/media/textures/Amputations/Human/Forearm/skin01_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin01_hairy_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin01_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin02_b.png b/42/media/textures/Amputations/Human/Forearm/skin02_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin02_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin02_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin02_hairy_b.png b/42/media/textures/Amputations/Human/Forearm/skin02_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin02_hairy_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin02_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin03_b.png b/42/media/textures/Amputations/Human/Forearm/skin03_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin03_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin03_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin03_hairy_b.png b/42/media/textures/Amputations/Human/Forearm/skin03_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin03_hairy_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin03_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin04_b.png b/42/media/textures/Amputations/Human/Forearm/skin04_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin04_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin04_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin04_hairy_b.png b/42/media/textures/Amputations/Human/Forearm/skin04_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin04_hairy_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin04_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin05_b.png b/42/media/textures/Amputations/Human/Forearm/skin05_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin05_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin05_b.png diff --git a/common/media/textures/Amputations/Human/Forearm/skin05_hairy_b.png b/42/media/textures/Amputations/Human/Forearm/skin05_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Forearm/skin05_hairy_b.png rename to 42/media/textures/Amputations/Human/Forearm/skin05_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin01_b.png b/42/media/textures/Amputations/Human/Hand/skin01_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin01_b.png rename to 42/media/textures/Amputations/Human/Hand/skin01_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin01_hairy_b.png b/42/media/textures/Amputations/Human/Hand/skin01_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin01_hairy_b.png rename to 42/media/textures/Amputations/Human/Hand/skin01_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin02_b.png b/42/media/textures/Amputations/Human/Hand/skin02_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin02_b.png rename to 42/media/textures/Amputations/Human/Hand/skin02_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin02_hairy_b.png b/42/media/textures/Amputations/Human/Hand/skin02_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin02_hairy_b.png rename to 42/media/textures/Amputations/Human/Hand/skin02_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin03_b.png b/42/media/textures/Amputations/Human/Hand/skin03_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin03_b.png rename to 42/media/textures/Amputations/Human/Hand/skin03_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin03_hairy_b.png b/42/media/textures/Amputations/Human/Hand/skin03_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin03_hairy_b.png rename to 42/media/textures/Amputations/Human/Hand/skin03_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin04_b.png b/42/media/textures/Amputations/Human/Hand/skin04_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin04_b.png rename to 42/media/textures/Amputations/Human/Hand/skin04_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin04_hairy_b.png b/42/media/textures/Amputations/Human/Hand/skin04_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin04_hairy_b.png rename to 42/media/textures/Amputations/Human/Hand/skin04_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin05_b.png b/42/media/textures/Amputations/Human/Hand/skin05_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin05_b.png rename to 42/media/textures/Amputations/Human/Hand/skin05_b.png diff --git a/common/media/textures/Amputations/Human/Hand/skin05_hairy_b.png b/42/media/textures/Amputations/Human/Hand/skin05_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Hand/skin05_hairy_b.png rename to 42/media/textures/Amputations/Human/Hand/skin05_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin01_b.png b/42/media/textures/Amputations/Human/Upperarm/skin01_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin01_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin01_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin01_hairy_b.png b/42/media/textures/Amputations/Human/Upperarm/skin01_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin01_hairy_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin01_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin02_b.png b/42/media/textures/Amputations/Human/Upperarm/skin02_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin02_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin02_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin02_hairy_b.png b/42/media/textures/Amputations/Human/Upperarm/skin02_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin02_hairy_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin02_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin03_b.png b/42/media/textures/Amputations/Human/Upperarm/skin03_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin03_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin03_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin03_hairy_b.png b/42/media/textures/Amputations/Human/Upperarm/skin03_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin03_hairy_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin03_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin04_b.png b/42/media/textures/Amputations/Human/Upperarm/skin04_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin04_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin04_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin04_hairy_b.png b/42/media/textures/Amputations/Human/Upperarm/skin04_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin04_hairy_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin04_hairy_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin05_b.png b/42/media/textures/Amputations/Human/Upperarm/skin05_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin05_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin05_b.png diff --git a/common/media/textures/Amputations/Human/Upperarm/skin05_hairy_b.png b/42/media/textures/Amputations/Human/Upperarm/skin05_hairy_b.png similarity index 100% rename from common/media/textures/Amputations/Human/Upperarm/skin05_hairy_b.png rename to 42/media/textures/Amputations/Human/Upperarm/skin05_hairy_b.png diff --git a/common/media/textures/Amputations/Masks/Belt.png b/42/media/textures/Amputations/Masks/Belt.png similarity index 100% rename from common/media/textures/Amputations/Masks/Belt.png rename to 42/media/textures/Amputations/Masks/Belt.png diff --git a/common/media/textures/Amputations/Masks/Chest.png b/42/media/textures/Amputations/Masks/Chest.png similarity index 100% rename from common/media/textures/Amputations/Masks/Chest.png rename to 42/media/textures/Amputations/Masks/Chest.png diff --git a/common/media/textures/Amputations/Masks/Crotch.png b/42/media/textures/Amputations/Masks/Crotch.png similarity index 100% rename from common/media/textures/Amputations/Masks/Crotch.png rename to 42/media/textures/Amputations/Masks/Crotch.png diff --git a/common/media/textures/Amputations/Masks/Dress.png b/42/media/textures/Amputations/Masks/Dress.png similarity index 100% rename from common/media/textures/Amputations/Masks/Dress.png rename to 42/media/textures/Amputations/Masks/Dress.png diff --git a/common/media/textures/Amputations/Masks/Head.png b/42/media/textures/Amputations/Masks/Head.png similarity index 100% rename from common/media/textures/Amputations/Masks/Head.png rename to 42/media/textures/Amputations/Masks/Head.png diff --git a/common/media/textures/Amputations/Masks/LeftArm.png b/42/media/textures/Amputations/Masks/LeftArm.png similarity index 100% rename from common/media/textures/Amputations/Masks/LeftArm.png rename to 42/media/textures/Amputations/Masks/LeftArm.png diff --git a/common/media/textures/Amputations/Masks/LeftFoot.png b/42/media/textures/Amputations/Masks/LeftFoot.png similarity index 100% rename from common/media/textures/Amputations/Masks/LeftFoot.png rename to 42/media/textures/Amputations/Masks/LeftFoot.png diff --git a/common/media/textures/Amputations/Masks/LeftHand.png b/42/media/textures/Amputations/Masks/LeftHand.png similarity index 100% rename from common/media/textures/Amputations/Masks/LeftHand.png rename to 42/media/textures/Amputations/Masks/LeftHand.png diff --git a/common/media/textures/Amputations/Masks/LeftLeg.png b/42/media/textures/Amputations/Masks/LeftLeg.png similarity index 100% rename from common/media/textures/Amputations/Masks/LeftLeg.png rename to 42/media/textures/Amputations/Masks/LeftLeg.png diff --git a/common/media/textures/Amputations/Masks/Mask.png b/42/media/textures/Amputations/Masks/Mask.png similarity index 100% rename from common/media/textures/Amputations/Masks/Mask.png rename to 42/media/textures/Amputations/Masks/Mask.png diff --git a/common/media/textures/Amputations/Masks/RightArm.png b/42/media/textures/Amputations/Masks/RightArm.png similarity index 100% rename from common/media/textures/Amputations/Masks/RightArm.png rename to 42/media/textures/Amputations/Masks/RightArm.png diff --git a/common/media/textures/Amputations/Masks/RightFoot.png b/42/media/textures/Amputations/Masks/RightFoot.png similarity index 100% rename from common/media/textures/Amputations/Masks/RightFoot.png rename to 42/media/textures/Amputations/Masks/RightFoot.png diff --git a/common/media/textures/Amputations/Masks/RightHand.png b/42/media/textures/Amputations/Masks/RightHand.png similarity index 100% rename from common/media/textures/Amputations/Masks/RightHand.png rename to 42/media/textures/Amputations/Masks/RightHand.png diff --git a/common/media/textures/Amputations/Masks/RightLeg.png b/42/media/textures/Amputations/Masks/RightLeg.png similarity index 100% rename from common/media/textures/Amputations/Masks/RightLeg.png rename to 42/media/textures/Amputations/Masks/RightLeg.png diff --git a/common/media/textures/Amputations/Masks/Waist.png b/42/media/textures/Amputations/Masks/Waist.png similarity index 100% rename from common/media/textures/Amputations/Masks/Waist.png rename to 42/media/textures/Amputations/Masks/Waist.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin01_l1.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin01_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin01_l1.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin01_l1.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin01_l2.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin01_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin01_l2.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin01_l2.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin01_l3.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin01_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin01_l3.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin01_l3.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin02_l1.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin02_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin02_l1.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin02_l1.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin02_l2.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin02_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin02_l2.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin02_l2.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin02_l3.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin02_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin02_l3.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin02_l3.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin03_l1.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin03_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin03_l1.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin03_l1.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin03_l2.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin03_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin03_l2.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin03_l2.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin03_l3.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin03_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin03_l3.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin03_l3.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin04_l1.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin04_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin04_l1.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin04_l1.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin04_l2.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin04_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin04_l2.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin04_l2.png diff --git a/common/media/textures/Amputations/Zombie/Forearm/z_skin04_l3.png b/42/media/textures/Amputations/Zombie/Forearm/z_skin04_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Forearm/z_skin04_l3.png rename to 42/media/textures/Amputations/Zombie/Forearm/z_skin04_l3.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l1.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l1.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l1.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l2.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l2.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l2.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l3.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin01_l3.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin01_l3.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l1.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l1.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l1.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l2.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l2.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l2.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l3.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin02_l3.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin02_l3.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l1.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l1.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l1.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l2.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l2.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l2.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l3.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin03_l3.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin03_l3.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l1.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l1.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l1.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l1.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l2.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l2.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l2.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l2.png diff --git a/common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l3.png b/42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l3.png similarity index 100% rename from common/media/textures/Amputations/Zombie/Upperarm/z_skin04_l3.png rename to 42/media/textures/Amputations/Zombie/Upperarm/z_skin04_l3.png diff --git a/common/media/textures/Prosthesis/hookArm.png b/42/media/textures/Prosthesis/hookArm.png similarity index 100% rename from common/media/textures/Prosthesis/hookArm.png rename to 42/media/textures/Prosthesis/hookArm.png diff --git a/common/media/textures/Prosthesis/normalArm.png b/42/media/textures/Prosthesis/normalArm.png similarity index 100% rename from common/media/textures/Prosthesis/normalArm.png rename to 42/media/textures/Prosthesis/normalArm.png diff --git a/common/media/textures/Surgery/tourniquet.png b/42/media/textures/Surgery/tourniquet.png similarity index 100% rename from common/media/textures/Surgery/tourniquet.png rename to 42/media/textures/Surgery/tourniquet.png diff --git a/common/media/textures/item_armProsthetic.png b/42/media/textures/item_armProsthetic.png similarity index 100% rename from common/media/textures/item_armProsthetic.png rename to 42/media/textures/item_armProsthetic.png diff --git a/common/media/textures/item_tourniquet.png b/42/media/textures/item_tourniquet.png similarity index 100% rename from common/media/textures/item_tourniquet.png rename to 42/media/textures/item_tourniquet.png diff --git a/common/media/ui/ProstArm_L.png b/42/media/ui/ProstArm_L.png similarity index 100% rename from common/media/ui/ProstArm_L.png rename to 42/media/ui/ProstArm_L.png diff --git a/common/media/ui/ProstArm_R.png b/42/media/ui/ProstArm_R.png similarity index 100% rename from common/media/ui/ProstArm_R.png rename to 42/media/ui/ProstArm_R.png diff --git a/common/media/ui/Traits/trait_Amputee_ForeArm.png b/42/media/ui/Traits/trait_Amputee_ForeArm.png similarity index 100% rename from common/media/ui/Traits/trait_Amputee_ForeArm.png rename to 42/media/ui/Traits/trait_Amputee_ForeArm.png diff --git a/common/media/ui/Traits/trait_Amputee_Hand.png b/42/media/ui/Traits/trait_Amputee_Hand.png similarity index 100% rename from common/media/ui/Traits/trait_Amputee_Hand.png rename to 42/media/ui/Traits/trait_Amputee_Hand.png diff --git a/common/media/ui/Traits/trait_Amputee_UpperArm.png b/42/media/ui/Traits/trait_Amputee_UpperArm.png similarity index 100% rename from common/media/ui/Traits/trait_Amputee_UpperArm.png rename to 42/media/ui/Traits/trait_Amputee_UpperArm.png diff --git a/common/media/ui/Traits/trait_insensitive.png b/42/media/ui/Traits/trait_insensitive.png similarity index 100% rename from common/media/ui/Traits/trait_insensitive.png rename to 42/media/ui/Traits/trait_insensitive.png diff --git a/common/media/ui/male_base_test.png b/42/media/ui/male_base_test.png similarity index 100% rename from common/media/ui/male_base_test.png rename to 42/media/ui/male_base_test.png diff --git a/common/media/ui/test.png b/42/media/ui/test.png similarity index 100% rename from common/media/ui/test.png rename to 42/media/ui/test.png diff --git a/42/mod.info b/42/mod.info index c7729e9..0d14aa6 100644 --- a/42/mod.info +++ b/42/mod.info @@ -4,8 +4,8 @@ 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 -versionMin=42.6 +modversion=2.3 +versionMin=42.13 loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework incompatible=\BB_FirstAidOverhaul \ No newline at end of file diff --git a/common/media/lua/shared/TOC/BodyLocations.lua b/common/media/lua/shared/TOC/BodyLocations.lua deleted file mode 100644 index 5c55c13..0000000 --- a/common/media/lua/shared/TOC/BodyLocations.lua +++ /dev/null @@ -1,79 +0,0 @@ -require("TOC/Debug") -require("NPCs/BodyLocations") -local StaticData = require("TOC/StaticData") - -local BodyLocationsAPI = {} -local function customGetVal(obj, int) return getClassFieldVal(obj, getClassField(obj, int)) end -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 ----@return BodyLocation -function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, locationElement, afterBoolean) - -- Check type of arg 2 == string - if not error out. - if type(locationElement) ~= "string" then error("Argument 2 is not of type string. Please re-check!", 2) end - local itemToMoveTo = group:getLocation(locationElement) -- get location to move to - if itemToMoveTo ~= nil then - -- 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) - 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 - list:add(index, curItem) -- we add the item again - - - return curItem - else -- we did not find the location to move to, so we throw an error. - error("Could not find the BodyLocation [".. tostring(locationElement) .."] - please check the passed arguments!", 2) - end -end - - - --- function TestBodyLocations() --- local group = BodyLocations.getGroup("Human") --- local x = group:getAllLocations() - --- for i=0, x:size() -1 do - --- ---@type BodyLocation --- local bl = x:get(i) - --- 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) - --- local curItem = BodyLocation.new(group, "TOC_Arm_R") --- group:getAllLocations():add(curItem) - - -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") \ No newline at end of file diff --git a/common/media/scripts/TOC_recipes.txt b/common/media/scripts/TOC_recipes.txt deleted file mode 100644 index bce7df3..0000000 --- a/common/media/scripts/TOC_recipes.txt +++ /dev/null @@ -1,33 +0,0 @@ -module TOC -{ - imports - { - Base - } - /*************Craft Prosthetics*******************/ - recipe Craft Prosthetic Arm - { - MetalPipe=4, - Plank=2, - keep [Recipe.GetItemTypes.WeldingMask], - - Result:Prost_NormalArm_L, - Time:150.0, - Category:Welding, - OnGiveXP:Recipe.OnGiveXP.MetalWelding10, - NeedToBeLearn:false, - } - - recipe Craft Prosthetic Hook - { - MetalPipe=2, - Plank=2, - keep [Recipe.GetItemTypes.WeldingMask], - - Result:Prost_HookArm_L, - Time:100.0, - Category:Welding, - OnGiveXP:Recipe.OnGiveXP.MetalWelding10, - NeedToBeLearn:false, - } -} \ No newline at end of file diff --git a/common/media/ui/Female/ForeArm_L.png b/common/media/ui/Female/ForeArm_L.png deleted file mode 100644 index 1902325..0000000 Binary files a/common/media/ui/Female/ForeArm_L.png and /dev/null differ diff --git a/common/media/ui/Female/ForeArm_R.png b/common/media/ui/Female/ForeArm_R.png deleted file mode 100644 index caa8607..0000000 Binary files a/common/media/ui/Female/ForeArm_R.png and /dev/null differ diff --git a/common/media/ui/Female/Hand_L.png b/common/media/ui/Female/Hand_L.png deleted file mode 100644 index c473072..0000000 Binary files a/common/media/ui/Female/Hand_L.png and /dev/null differ diff --git a/common/media/ui/Female/Hand_R.png b/common/media/ui/Female/Hand_R.png deleted file mode 100644 index e338f69..0000000 Binary files a/common/media/ui/Female/Hand_R.png and /dev/null differ diff --git a/common/media/ui/Female/UpperArm_L.png b/common/media/ui/Female/UpperArm_L.png deleted file mode 100644 index bcf269a..0000000 Binary files a/common/media/ui/Female/UpperArm_L.png and /dev/null differ diff --git a/common/media/ui/Female/UpperArm_R.png b/common/media/ui/Female/UpperArm_R.png deleted file mode 100644 index 5b605dd..0000000 Binary files a/common/media/ui/Female/UpperArm_R.png and /dev/null differ diff --git a/common/media/ui/Male/ForeArm_L.png b/common/media/ui/Male/ForeArm_L.png deleted file mode 100644 index 1030bbf..0000000 Binary files a/common/media/ui/Male/ForeArm_L.png and /dev/null differ diff --git a/common/media/ui/Male/ForeArm_R.png b/common/media/ui/Male/ForeArm_R.png deleted file mode 100644 index 77d0045..0000000 Binary files a/common/media/ui/Male/ForeArm_R.png and /dev/null differ diff --git a/common/media/ui/Male/Hand_L.png b/common/media/ui/Male/Hand_L.png deleted file mode 100644 index fc3ac08..0000000 Binary files a/common/media/ui/Male/Hand_L.png and /dev/null differ diff --git a/common/media/ui/Male/Hand_R.png b/common/media/ui/Male/Hand_R.png deleted file mode 100644 index c0c1998..0000000 Binary files a/common/media/ui/Male/Hand_R.png and /dev/null differ diff --git a/common/media/ui/Male/UpperArm_L.png b/common/media/ui/Male/UpperArm_L.png deleted file mode 100644 index ebc4b6c..0000000 Binary files a/common/media/ui/Male/UpperArm_L.png and /dev/null differ diff --git a/common/media/ui/Male/UpperArm_R.png b/common/media/ui/Male/UpperArm_R.png deleted file mode 100644 index 646605d..0000000 Binary files a/common/media/ui/Male/UpperArm_R.png and /dev/null differ diff --git a/common/media/ui/test_pattern.png b/common/media/ui/test_pattern.png deleted file mode 100644 index 8bd9be4..0000000 Binary files a/common/media/ui/test_pattern.png and /dev/null differ diff --git a/test/42.12/media/shared/TOC/BodyLocationsInit.lua b/test/42.12/media/shared/TOC/BodyLocationsInit.lua new file mode 100644 index 0000000..08a9f90 --- /dev/null +++ b/test/42.12/media/shared/TOC/BodyLocationsInit.lua @@ -0,0 +1,8 @@ +local BodyLocationsAPI = require("TOC/BodyLocations") + +BodyLocationsAPI.New("Arm_L") +BodyLocationsAPI.New("Arm_R") +BodyLocationsAPI.New("ArmProst_L") +BodyLocationsAPI.New("ArmProst_R") +BodyLocationsAPI.New("ArmAccessory_L") +BodyLocationsAPI.New("ArmAccessory_R") \ No newline at end of file diff --git a/common/media/lua/shared/TOC/Traits.lua b/test/42.12/media/shared/TOC/Traits.lua similarity index 100% rename from common/media/lua/shared/TOC/Traits.lua rename to test/42.12/media/shared/TOC/Traits.lua diff --git a/test/42.12/mod.info b/test/42.12/mod.info new file mode 100644 index 0000000..391ea6c --- /dev/null +++ b/test/42.12/mod.info @@ -0,0 +1,11 @@ +name=The Only Cure +poster=poster.png +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.3 +versionMin=42.12 + +loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework +incompatible=\BB_FirstAidOverhaul \ No newline at end of file