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 99% rename from common/media/lua/client/TOC/Controllers/LocalPlayerController.lua rename to 42/media/lua/client/TOC/Controllers/LocalPlayerController.lua index cb89535..b464a5a 100644 --- a/common/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/42/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -56,7 +56,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(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) 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 100% rename from common/media/lua/client/TOC/Handlers/AmputationHandler.lua rename to 42/media/lua/client/TOC/Handlers/AmputationHandler.lua 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 89% rename from common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua rename to 42/media/lua/client/TOC/Handlers/ProsthesisHandler.lua index 0ba1e3a..fa42ff5 100644 --- a/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua +++ b/42/media/lua/client/TOC/Handlers/ProsthesisHandler.lua @@ -133,19 +133,14 @@ function ISClothingExtraAction:isValid() local isEquippable = og_ISClothingExtraAction_isValid(self) -- self.extra is a string, not the item - -- B42 Compatibility to add - local testItem = InventoryItemFactory.CreateItem(self.extra) + local testItem = instanceItem(self.extra) return ProsthesisHandler.Validate(testItem, isEquippable) end local og_ISClothingExtraAction_perform = OverridenMethodsArchive.Save("ISClothingExtraAction_perform", ISClothingExtraAction.perform) ---@diagnostic disable-next-line: duplicate-set-field function ISClothingExtraAction:perform() - - - -- B42 Compatibility to add - - local extraItem = InventoryItemFactory.CreateItem(self.extra) + local extraItem = instanceItem(self.extra) ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true) og_ISClothingExtraAction_perform(self) end @@ -187,4 +182,22 @@ function ISUnequipAction:perform() end 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 + return ProsthesisHandler 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 96% rename from common/media/lua/client/TOC/UI/SurgeryInteractions.lua rename to 42/media/lua/client/TOC/UI/SurgeryInteractions.lua index a49d20f..5367293 100644 --- a/common/media/lua/client/TOC/UI/SurgeryInteractions.lua +++ b/42/media/lua/client/TOC/UI/SurgeryInteractions.lua @@ -68,7 +68,7 @@ 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 isPlayerCourageous = pl:hasTrait("Brave") or pl:hasTrait("Desensitized") or pl:getPerkLevel(Perks.Strength) > 5 local isTempHighEnough = stoveObj:getCurrentTemperature() >= 250 local isLimbFree = not dcInst:getIsProstEquipped(limbName) 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..8cae511 --- /dev/null +++ b/42/media/lua/shared/TOC/BodyLocations.lua @@ -0,0 +1,110 @@ +--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:TOC_Arm_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:TOC_Arm_R", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:TOC_ArmProst_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:TOC_ArmProst_R", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:TOC_ArmAccessory_L", reference = ItemBodyLocation.FULL_TOP, before = false}, + {name = "toc:TOC_ArmAccessory_R", reference = ItemBodyLocation.FULL_TOP, before = false}, +}) + + +results['toc:TOC_Arm_L']:setMultiItem(true) +results['toc:TOC_Arm_R']:setMultiItem(true) +results['toc:TOC_ArmProst_L']:setMultiItem(true) +results['toc:TOC_ArmProst_R']:setMultiItem(true) +results['toc:TOC_ArmAccessory_L']:setMultiItem(true) +results['toc: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..653123a --- /dev/null +++ b/42/media/lua/shared/TOC/Registries.lua @@ -0,0 +1 @@ +return TOC_Registries \ No newline at end of file diff --git a/common/media/lua/shared/TOC/StaticData.lua b/42/media/lua/shared/TOC/StaticData.lua similarity index 100% rename from common/media/lua/shared/TOC/StaticData.lua rename to 42/media/lua/shared/TOC/StaticData.lua diff --git a/common/media/lua/shared/Translate/DE/ContextMenu_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/ContextMenu_DE.txt diff --git a/common/media/lua/shared/Translate/DE/IG_UI_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/IG_UI_DE.txt diff --git a/common/media/lua/shared/Translate/DE/ItemName_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/ItemName_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Recipes_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/Recipes_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Sandbox_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/Sandbox_DE.txt diff --git a/common/media/lua/shared/Translate/DE/Tooltip_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/Tooltip_DE.txt diff --git a/common/media/lua/shared/Translate/DE/UI_DE.txt b/42/media/lua/shared/TOC/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/TOC/Translate/DE/UI_DE.txt diff --git a/common/media/lua/shared/Translate/EN/ContextMenu_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/ContextMenu_EN.txt diff --git a/common/media/lua/shared/Translate/EN/IG_UI_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/IG_UI_EN.txt diff --git a/common/media/lua/shared/Translate/EN/ItemName_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/ItemName_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Recipes_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/Recipes_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Sandbox_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/Sandbox_EN.txt diff --git a/common/media/lua/shared/Translate/EN/Tooltip_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/Tooltip_EN.txt diff --git a/common/media/lua/shared/Translate/EN/UI_EN.txt b/42/media/lua/shared/TOC/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/TOC/Translate/EN/UI_EN.txt diff --git a/common/media/lua/shared/Translate/FR/ContextMenu_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/ContextMenu_FR.txt diff --git a/common/media/lua/shared/Translate/FR/IG_UI_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/IG_UI_FR.txt diff --git a/common/media/lua/shared/Translate/FR/ItemName_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/ItemName_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Recipes_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/Recipes_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Sandbox_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/Sandbox_FR.txt diff --git a/common/media/lua/shared/Translate/FR/Tooltip_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/Tooltip_FR.txt diff --git a/common/media/lua/shared/Translate/FR/UI_FR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/FR/UI_FR.txt diff --git a/common/media/lua/shared/Translate/IT/ContextMenu_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/ContextMenu_IT.txt diff --git a/common/media/lua/shared/Translate/IT/IG_UI_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/IG_UI_IT.txt diff --git a/common/media/lua/shared/Translate/IT/ItemName_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/ItemName_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Recipes_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/Recipes_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Sandbox_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/Sandbox_IT.txt diff --git a/common/media/lua/shared/Translate/IT/Tooltip_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/Tooltip_IT.txt diff --git a/common/media/lua/shared/Translate/IT/UI_IT.txt b/42/media/lua/shared/TOC/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/TOC/Translate/IT/UI_IT.txt diff --git a/common/media/lua/shared/Translate/KO/ContextMenu_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/ContextMenu_KO.txt diff --git a/common/media/lua/shared/Translate/KO/IG_UI_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/IG_UI_KO.txt diff --git a/common/media/lua/shared/Translate/KO/ItemName_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/ItemName_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Recipes_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/Recipes_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Sandbox_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/Sandbox_KO.txt diff --git a/common/media/lua/shared/Translate/KO/Tooltip_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/Tooltip_KO.txt diff --git a/common/media/lua/shared/Translate/KO/UI_KO.txt b/42/media/lua/shared/TOC/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/TOC/Translate/KO/UI_KO.txt diff --git a/common/media/lua/shared/Translate/RU/ContextMenu_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/ContextMenu_RU.txt diff --git a/common/media/lua/shared/Translate/RU/IG_UI_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/IG_UI_RU.txt diff --git a/common/media/lua/shared/Translate/RU/ItemName_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/ItemName_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Recipes_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/Recipes_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Sandbox_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/Sandbox_RU.txt diff --git a/common/media/lua/shared/Translate/RU/Tooltip_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/Tooltip_RU.txt diff --git a/common/media/lua/shared/Translate/RU/UI_RU.txt b/42/media/lua/shared/TOC/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/TOC/Translate/RU/UI_RU.txt diff --git a/common/media/lua/shared/Translate/TR/ContextMenu_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/ContextMenu_TR.txt diff --git a/common/media/lua/shared/Translate/TR/IG_UI_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/IG_UI_TR.txt diff --git a/common/media/lua/shared/Translate/TR/ItemName_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/ItemName_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Recipes_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/Recipes_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Sandbox_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/Sandbox_TR.txt diff --git a/common/media/lua/shared/Translate/TR/Tooltip_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/Tooltip_TR.txt diff --git a/common/media/lua/shared/Translate/TR/UI_TR.txt b/42/media/lua/shared/TOC/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/TOC/Translate/TR/UI_TR.txt diff --git a/common/media/lua/shared/Translate/UA/ContextMenu_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/ContextMenu_UA.txt diff --git a/common/media/lua/shared/Translate/UA/IG_UI_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/IG_UI_UA.txt diff --git a/common/media/lua/shared/Translate/UA/ItemName_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/ItemName_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Recipes_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/Recipes_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Sandbox_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/Sandbox_UA.txt diff --git a/common/media/lua/shared/Translate/UA/Tooltip_UA.txt b/42/media/lua/shared/TOC/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/TOC/Translate/UA/Tooltip_UA.txt diff --git a/common/media/lua/shared/Translate/UA/UI_UA.txt b/42/media/lua/shared/TOC/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/TOC/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..b87145a --- /dev/null +++ b/42/media/registries.lua @@ -0,0 +1,15 @@ +TOC_Registries = { + Traits = { + Amputee_Hand = CharacterTrait.register("toc:amputee_hand"), + Amputee_Forearm = CharacterTrait.register("toc:amputee_forearm"), + Amputee_Upperarm = CharacterTrait.register("toc:amputee_upperarm") + } +} + + +ItemBodyLocation.register("toc:TOC_Arm_L") +ItemBodyLocation.register("toc:TOC_Arm_R") +ItemBodyLocation.register("toc:TOC_ArmProst_L") +ItemBodyLocation.register("toc:TOC_ArmProst_R") +ItemBodyLocation.register("toc:TOC_ArmAccessory_L") +ItemBodyLocation.register("toc: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 100% rename from common/media/scripts/TOC_amputation_items.txt rename to 42/media/scripts/TOC_amputation_items.txt 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 100% rename from common/media/scripts/TOC_prosthesis_items.txt rename to 42/media/scripts/TOC_prosthesis_items.txt 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 100% rename from common/media/scripts/TOC_surgery_items.txt rename to 42/media/scripts/TOC_surgery_items.txt 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 c3691a2..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 = group:getOrCreateLocation(bodyLoc) -- get current item - or create - 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..3cc757c --- /dev/null +++ b/test/42.12/media/shared/TOC/BodyLocationsInit.lua @@ -0,0 +1,8 @@ +local BodyLocationsAPI = require("TOC/BodyLocations") + +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/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