Compare commits
1 Commits
dev
...
dev-bandag
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52de7e8b06 |
36
.vscode/tasks.json
vendored
36
.vscode/tasks.json
vendored
@@ -9,7 +9,12 @@
|
|||||||
"options": {"statusbar": {"label": "$(combine) Assemble Mod - B42"}},
|
"options": {"statusbar": {"label": "$(combine) Assemble Mod - B42"}},
|
||||||
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"42\" \"picch\" \"${workspaceFolderBasename}\" \"\"",
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"42\" \"picch\" \"${workspaceFolderBasename}\" \"\"",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Create Workshop folder",
|
||||||
|
"type": "shell",
|
||||||
|
"options": {"statusbar": {"label": "$(combine) Assemble Mod - B41"}},
|
||||||
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"41\" \"picch\" \"${workspaceFolderBasename}\" \"\"",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Create Workshop folder",
|
"label": "Create Workshop folder",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
@@ -28,27 +33,24 @@
|
|||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "groupZomboid"
|
"group": "groupZomboid"
|
||||||
},
|
},
|
||||||
"command": "\"${config:zomboid_folder_b42}\\ProjectZomboid64_Debug_NoSteam.bat\"",
|
"command": "\"${config:zomboid_folder_b42}\\ProjectZomboid64 - nosteam-debug 42.bat\"",
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid client (42)"}},
|
"options": {"statusbar": {"label": "$(run) Zomboid client (42)"}},
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$eslint-stylish"
|
"$eslint-stylish"
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Run Zomboid Debug No Steam (42) - 2nd Instance",
|
"label": "Run Zomboid Debug No Steam (41)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "groupZomboid"
|
"group": "groupZomboid"
|
||||||
},
|
},
|
||||||
"command": "\"${config:zomboid_folder_b42}\\ProjectZomboid64_Debug_NoSteam.bat\"",
|
"command": "\"${config:zomboid_folder_b41}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid client (42) - 2nd Instance"}},
|
"options": {"statusbar": {"label": "$(run) Zomboid client (41)"}},
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$eslint-stylish"
|
"$eslint-stylish"
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// "label": "Run Zomboid Debug No Steam",
|
// "label": "Run Zomboid Debug No Steam",
|
||||||
// "type": "shell",
|
// "type": "shell",
|
||||||
@@ -82,15 +84,15 @@
|
|||||||
// "Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"],
|
// "Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"],
|
||||||
// "problemMatcher": []
|
// "problemMatcher": []
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
"label": "Run Zomboid Test Server",
|
// "label": "Run Zomboid Test Server",
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid Server (TOC)"}},
|
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC)"}},
|
||||||
"type": "shell",
|
// "type": "shell",
|
||||||
"command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC",
|
// "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC",
|
||||||
"problemMatcher": [
|
// "problemMatcher": [
|
||||||
"$eslint-stylish"
|
// "$eslint-stylish"
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// "label": "Run Zomboid Test Server 2",
|
// "label": "Run Zomboid Test Server 2",
|
||||||
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH)"}},
|
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH)"}},
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
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
|
||||||
40
42/media/lua/client/TOC-42/Handlers/ProsthesisHandler.lua
Normal file
40
42/media/lua/client/TOC-42/Handlers/ProsthesisHandler.lua
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
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
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
require ("TOC/Debug")
|
|
||||||
local CommandsData = require("TOC/CommandsData")
|
|
||||||
local ItemsController = require("TOC/Controllers/ItemsController")
|
|
||||||
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
local ServerItemsCommands = {}
|
|
||||||
|
|
||||||
function ServerItemsCommands.SpawnAmputationItem(_, args)
|
|
||||||
local playerObj = getPlayerByOnlineID(args.playerNum)
|
|
||||||
local limbName = args.limbName
|
|
||||||
ItemsController.Player.SpawnAmputationItem(playerObj, limbName)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ServerItemsCommands.DeleteOldAmputationItem(_, args)
|
|
||||||
local patientPl = getPlayerByOnlineID(args.playerNum)
|
|
||||||
local limbName = args.limbName
|
|
||||||
|
|
||||||
ItemsController.Player.DeleteOldAmputationItem(patientPl, limbName)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ServerItemsCommands.DeleteAllOldAmputationItems(_, args)
|
|
||||||
local playerObj = getPlayerByOnlineID(args.playerNum)
|
|
||||||
ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ServerItemsCommands.OverrideAmputationItemVisuals(_, args)
|
|
||||||
local playerObj = getPlayerByOnlineID(args.playerNum)
|
|
||||||
local limbName = args.limbName
|
|
||||||
local isCicatrized = args.isCicatrized
|
|
||||||
|
|
||||||
ItemsController.Player.OverrideAmputationItemVisuals(playerObj, limbName, isCicatrized)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
|
||||||
local function OnClientItemsCommands(module, command, playerObj, args)
|
|
||||||
if module == CommandsData.modules.TOC_ITEMS and ServerItemsCommands[command] then
|
|
||||||
TOC_DEBUG.print("Received ItemsController command - " .. tostring(command))
|
|
||||||
ServerItemsCommands[command](playerObj, args)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Events.OnClientCommand.Add(OnClientItemsCommands)
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
--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)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
return _TOCRegistries
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
IG_UI_FR = {
|
|
||||||
IGUI_Yes = "Oui",
|
|
||||||
IGUI_No = "Non",
|
|
||||||
|
|
||||||
IGUI_perks_Amputations = "Amputations",
|
|
||||||
IGUI_perks_Side_R = "Côté droit",
|
|
||||||
IGUI_perks_Side_L = "Côté gauche",
|
|
||||||
IGUI_perks_Prosthesis = "Prothèse",
|
|
||||||
IGUI_perks_ProstFamiliarity = "Familiarité",
|
|
||||||
|
|
||||||
IGUI_ItemCat_Prosthesis = "Prothèse",
|
|
||||||
IGUI_ItemCat_Surgery = "Chirurgie",
|
|
||||||
IGUI_ItemCat_Amputation = "Amputation",
|
|
||||||
|
|
||||||
IGUI_HealthPanel_Cicatrization = "Cicatrisation",
|
|
||||||
IGUI_HealthPanel_Cicatrized = "Cicatrisé",
|
|
||||||
IGUI_HealthPanel_Cauterized = "Cautérisé",
|
|
||||||
IGUI_HealthPanel_WoundDirtyness = "Saleté de la plaie",
|
|
||||||
IGUI_HealthPanel_ProstEquipped = "Prothèse équipée",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
ItemName_FR = {
|
|
||||||
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_L = "Garrot",
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_R = "Garrot",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_NormalArm_L = "Bras prothétique",
|
|
||||||
ItemName_TOC.Prost_NormalArm_R = "Bras prothétique",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_HookArm_L = "Bras prothétique - Crochet",
|
|
||||||
ItemName_TOC.Prost_HookArm_R = "Bras prothétique - Crochet",
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
Recipes_FR = {
|
|
||||||
Recipe_Craft_Prosthetic_Arm = "Fabriquer un bras prothétique",
|
|
||||||
Recipe_Craft_Prosthetic_Hook = "Fabriquer un crochet prothétique",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
UI_FR = {
|
|
||||||
UI_trait_Amputee_Hand = "Main gauche amputée",
|
|
||||||
UI_trait_Amputee_Hand_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Amputee_ForeArm = "Avant-bras gauche amputée",
|
|
||||||
UI_trait_Amputee_ForeArm_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Amputee_UpperArm = "Bras supérieur gauche amputée",
|
|
||||||
UI_trait_Amputee_UpperArm_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Insensitive = "Insensible",
|
|
||||||
UI_trait_Insensitive_desc = "",
|
|
||||||
|
|
||||||
UI_Say_CantEquip = "Je ne peux pas l'équiper comme ça..."
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
ContextMenu_RU = {
|
|
||||||
ContextMenu_Amputate = "Ампутировать",
|
|
||||||
ContextMenu_Amputate_Bandage = "Ампутировать и перевязать",
|
|
||||||
ContextMenu_Amputate_Stitch = "Ампутировать и наложить швы",
|
|
||||||
ContextMenu_Amputate_Stitch_Bandage = "Ампутировать, наложить швы и перевязать",
|
|
||||||
|
|
||||||
ContextMenu_Cauterize = "Прижечь",
|
|
||||||
|
|
||||||
ContextMenu_Limb_Hand_L = "Левая рука",
|
|
||||||
ContextMenu_Limb_ForeArm_L = "Левая предплечье",
|
|
||||||
ContextMenu_Limb_UpperArm_L = "Левое плечо"
|
|
||||||
ContextMenu_Limb_Hand_R = "Правая рука",
|
|
||||||
ContextMenu_Limb_ForeArm_R = "Правая предплечье",
|
|
||||||
ContextMenu_Limb_UpperArm_R = "Правая плечо",
|
|
||||||
|
|
||||||
ContextMenu_InstallProstRight = "Установить протез на правую руку",
|
|
||||||
ContextMenu_InstallProstLeft = "Установить протез на левую руку",
|
|
||||||
|
|
||||||
ContextMenu_PutTourniquetArmLeft = "Наложить жгут на левую руку",
|
|
||||||
ContextMenu_PutTourniquetLegL = "Наложить жгут на левую ногу",
|
|
||||||
ContextMenu_PutTourniquetArmRight = "Наложить жгут на правую руку",
|
|
||||||
ContextMenu_PutTourniquetLegR = "Наложить жгут на правую ногу",
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_CleanWound = "Очистить рану",
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_Admin_TOC = "TOC",
|
|
||||||
ContextMenu_Admin_ResetTOC = "Сбросить ампутации",
|
|
||||||
ContextMenu_Admin_ForceAmputation = "Моментально ампутировать",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
IG_UI_RU = {
|
|
||||||
IGUI_perks_Amputations = "Ампутации",
|
|
||||||
IGUI_perks_Side_R = "Правая сторона",
|
|
||||||
IGUI_perks_Side_L = "Левая сторона",
|
|
||||||
IGUI_perks_Prosthesis = "Протез",
|
|
||||||
IGUI_perks_ProstFamiliarity= "Приспособленность",
|
|
||||||
|
|
||||||
IGUI_ItemCat_Prosthesis = "Протез",
|
|
||||||
IGUI_ItemCat_Surgery = "Хирургия",
|
|
||||||
IGUI_ItemCat_Amputation = "Ампутация"
|
|
||||||
|
|
||||||
IGUI_HealthPanel_Cicatrization = "Заживление",
|
|
||||||
IGUI_HealthPanel_Cicatrized = "Заживлено",
|
|
||||||
IGUI_HealthPanel_Cauterized = "Прижженно",
|
|
||||||
IGUI_HealthPanel_WoundDirtyness = "Загрезнённая рана",
|
|
||||||
IGUI_HealthPanel_ProstEquipped = "Протез экипирован",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
ItemName_RU = {
|
|
||||||
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_L = "Жгут",
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_R = "Жгут",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_NormalArm_L = "Протез руки",
|
|
||||||
ItemName_TOC.Prost_NormalArm_R = "Протез руки",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_HookArm_L = "Протез руки - Крюк",
|
|
||||||
ItemName_TOC.Prost_HookArm_R = "Протез руки - Крюк",
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Recipes_RU = {
|
|
||||||
Recipe_Craft_Prosthetic_Arm = "Изготовить протез руки",
|
|
||||||
Recipe_Craft_Prosthetic_Hook = "Изготовить протез ввиде крючка",
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
Sandbox_RU = {
|
|
||||||
Sandbox_TOC = "Спасенье в Отсечении",
|
|
||||||
Sandbox_TOC_CicatrizationSpeed = "Скорость заживления",
|
|
||||||
Sandbox_TOC_WoundDirtynessMultiplier = "Множитель загрязнения ран",
|
|
||||||
Sandbox_TOC_SurgeonAbilityImportance = "Значимость способностей врача-хирурга",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
Tooltip_RU = {
|
|
||||||
|
|
||||||
Tooltip_Surgery_CantCauterize = "Нельзя прижигать рану",
|
|
||||||
|
|
||||||
Tooltip_Surgery_And = " и "
|
|
||||||
Tooltip_Surgery_TempTooLow = "Температура все еще слишком низкая",
|
|
||||||
Tooltip_Surgery_Coward = "У тебя не хватит смелости сделать это",
|
|
||||||
Tooltip_Surgery_LimbNotFree = "Сначала нужно снять протез",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
UI_RU = {
|
|
||||||
UI_trait_Amputee_Hand = "Ампутированная левая рука",
|
|
||||||
UI_trait_Amputee_Hand_desc = "Вы начинаете с ампутированной левой рукой.",
|
|
||||||
|
|
||||||
UI_trait_Amputee_ForeArm = "Ампутированное левое предплечье",
|
|
||||||
UI_trait_Amputee_ForeArm_desc = "Вы начинаете с ампутированным левым предплечьем.",
|
|
||||||
|
|
||||||
UI_trait_Amputee_UpperArm = "Ампутированное левое плечо",
|
|
||||||
UI_trait_Amputee_UpperArm_desc = "Вы начинаете с ампутированнвм левым плечём.",
|
|
||||||
|
|
||||||
UI_trait_Insensitive = "Нечувствительный",
|
|
||||||
UI_trait_Insensitive_desc = "",
|
|
||||||
|
|
||||||
|
|
||||||
UI_Say_CantEquip = "Я не могу его так экипировать..."
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
ContextMenu_TR = {
|
|
||||||
ContextMenu_Amputate = "Ampute Et",
|
|
||||||
ContextMenu_Amputate_Bandage = "Ampute Et ve Bandajla",
|
|
||||||
ContextMenu_Amputate_Stitch = "Ampute Et ve Dikiþ At",
|
|
||||||
ContextMenu_Amputate_Stitch_Bandage = "Ampute Et, Dikiþ At ve Bandajla",
|
|
||||||
|
|
||||||
ContextMenu_Cauterize = "Daðla",
|
|
||||||
|
|
||||||
ContextMenu_Limb_Hand_L = "Sol El",
|
|
||||||
ContextMenu_Limb_ForeArm_L = "Sol Ön Kol",
|
|
||||||
ContextMenu_Limb_UpperArm_L = "Sol Üst Kol",
|
|
||||||
ContextMenu_Limb_Hand_R = "Sað El",
|
|
||||||
ContextMenu_Limb_ForeArm_R = "Sað Ön Kol",
|
|
||||||
ContextMenu_Limb_UpperArm_R = "Sað Üst Kol",
|
|
||||||
|
|
||||||
ContextMenu_InstallProstRight = "Sað kola protez tak",
|
|
||||||
ContextMenu_InstallProstLeft = "Sol kola protez tak",
|
|
||||||
|
|
||||||
ContextMenu_PutTourniquetArmLeft = "Sol kola turnike tak",
|
|
||||||
ContextMenu_PutTourniquetLegL = "Sol bacaðýna turnike tak",
|
|
||||||
ContextMenu_PutTourniquetArmRight = "Sað kola turnike tak",
|
|
||||||
ContextMenu_PutTourniquetLegR = "Sað bacaðýna turnike tak",
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_CleanWound = "Yarayý Temizle",
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_Admin_TOC = "TOC",
|
|
||||||
ContextMenu_Admin_ResetTOC = "Amputasyonlarý Sýfýrla",
|
|
||||||
ContextMenu_Admin_ForceAmputation = "Zorla Amputasyon Yap",
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
IG_UI_TR = {
|
|
||||||
IGUI_perks_Amputations = "Amputasyonlar",
|
|
||||||
IGUI_perks_Side_R = "Sağ Taraf",
|
|
||||||
IGUI_perks_Side_L = "Sol Taraf",
|
|
||||||
IGUI_perks_Prosthesis = "Protez",
|
|
||||||
IGUI_perks_ProstFamiliarity = "Aşinalık",
|
|
||||||
|
|
||||||
IGUI_ItemCat_Prosthesis = "Protez",
|
|
||||||
IGUI_ItemCat_Surgery = "Cerrahi",
|
|
||||||
IGUI_ItemCat_Amputation = "Amputasyon",
|
|
||||||
|
|
||||||
IGUI_HealthPanel_Cicatrization = "Yara İyileşmesi",
|
|
||||||
IGUI_HealthPanel_Cicatrized = "İyileşti",
|
|
||||||
IGUI_HealthPanel_Cauterized = "Dağlandı",
|
|
||||||
IGUI_HealthPanel_WoundDirtyness = "Yara Kirliliği",
|
|
||||||
IGUI_HealthPanel_ProstEquipped = "Protez Takılı",
|
|
||||||
|
|
||||||
IGUI_Confirmation_Amputate = " <CENTRE> Bu uzvu gerçekten ampute etmek istiyor musunuz?"
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
Sandbox_TR = {
|
|
||||||
Sandbox_TOC = "The Only Cure",
|
|
||||||
Sandbox_TOC_CicatrizationSpeed = "Yara İyileşme Hızı",
|
|
||||||
Sandbox_TOC_WoundDirtynessMultiplier = "Yara Kirlilik Çarpanı",
|
|
||||||
Sandbox_TOC_SurgeonAbilityImportance = "Cerrahın Yetenek Önemi",
|
|
||||||
Sandbox_TOC_EnableZombieAmputations = "Zombi Amputasyonlarını Etkinleştir",
|
|
||||||
Sandbox_TOC_ZombieAmputationDamageThreshold = "Zombi Amputasyon Hasar Eşiği",
|
|
||||||
Sandbox_TOC_ZombieAmputationDamageChance = "Zombi Amputasyon Hasar Şansı",
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
Tooltip_TR = {
|
|
||||||
Tooltip_Surgery_CantCauterize = "Yarayı dağlayamazsın",
|
|
||||||
|
|
||||||
Tooltip_Surgery_And = " ve ",
|
|
||||||
Tooltip_Surgery_TempTooLow = "Sıcaklık hâlâ çok düşük",
|
|
||||||
Tooltip_Surgery_Coward = "Bunu yapacak cesaretin yok. KORKUYORSUN!",
|
|
||||||
Tooltip_Surgery_LimbNotFree = "Önce protezi çıkarman gerekiyor",
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
ContextMenu_UA = {
|
|
||||||
ContextMenu_Amputate = "Ампутувати",
|
|
||||||
ContextMenu_Amputate_Bandage = "Ампутувати та перев'язати",
|
|
||||||
ContextMenu_Amputate_Stitch = "Ампутувати та накласти шви",
|
|
||||||
ContextMenu_Amputate_Stitch_Bandage = "Ампутувати, накласти шви та перев'язати",
|
|
||||||
|
|
||||||
ContextMenu_Cauterize = "Припекти",
|
|
||||||
|
|
||||||
ContextMenu_Limb_Hand_L = "Ліва Рука",
|
|
||||||
ContextMenu_Limb_ForeArm_L = "Ліве Передпліччя",
|
|
||||||
ContextMenu_Limb_UpperArm_L = "Ліве Плече"
|
|
||||||
ContextMenu_Limb_Hand_R = "Права Рука",
|
|
||||||
ContextMenu_Limb_ForeArm_R = "Праве Передпліччя",
|
|
||||||
ContextMenu_Limb_UpperArm_R = "Праве Плече",
|
|
||||||
|
|
||||||
ContextMenu_InstallProstRight = "Установити протез на праву руку",
|
|
||||||
ContextMenu_InstallProstLeft = "Установити протез на ліву руку",
|
|
||||||
|
|
||||||
ContextMenu_PutTourniquetArmLeft = "Накласти джгут на ліву руку",
|
|
||||||
ContextMenu_PutTourniquetLegL = "Накласти джгут на ліву ногу",
|
|
||||||
ContextMenu_PutTourniquetArmRight = "Накласти джгут на праву руку",
|
|
||||||
ContextMenu_PutTourniquetLegR = "Накласти джгут на праву ногу",
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_CleanWound = "Очистити рану",
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ContextMenu_Admin_TOC = "TOC",
|
|
||||||
ContextMenu_Admin_ResetTOC = "Скинути Ампутації",
|
|
||||||
ContextMenu_Admin_ForceAmputation = "Примусово Ампутувати",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
IG_UI_UA = {
|
|
||||||
IGUI_perks_Amputations = "Ампутації",
|
|
||||||
IGUI_perks_Side_R = "Права сторона",
|
|
||||||
IGUI_perks_Side_L = "Ліва сторона",
|
|
||||||
IGUI_perks_Prosthesis = "Протез",
|
|
||||||
IGUI_perks_ProstFamiliarity= "Пристосованість",
|
|
||||||
|
|
||||||
IGUI_ItemCat_Prosthesis = "Протез",
|
|
||||||
IGUI_ItemCat_Surgery = "Хірургія",
|
|
||||||
IGUI_ItemCat_Amputation = "Ампутація"
|
|
||||||
|
|
||||||
IGUI_HealthPanel_Cicatrization = "Рубцювання",
|
|
||||||
IGUI_HealthPanel_Cicatrized = "Зарубцьована",
|
|
||||||
IGUI_HealthPanel_Cauterized = "Припечена",
|
|
||||||
IGUI_HealthPanel_WoundDirtyness = "Забруднена рана",
|
|
||||||
IGUI_HealthPanel_ProstEquipped = "Протез установлено",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
ItemName_UA = {
|
|
||||||
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_L = "Джгут",
|
|
||||||
ItemName_TOC.Surg_Arm_Tourniquet_R = "Джгут",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_NormalArm_L = "Протез Руки",
|
|
||||||
ItemName_TOC.Prost_NormalArm_R = "Протез Руки",
|
|
||||||
|
|
||||||
ItemName_TOC.Prost_HookArm_L = "Протез Руки - Гак",
|
|
||||||
ItemName_TOC.Prost_HookArm_R = "Протез Руки - Гак",
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Recipes_UA = {
|
|
||||||
Recipe_Craft_Prosthetic_Arm = "Створити Протез Руки",
|
|
||||||
Recipe_Craft_Prosthetic_Hook = "Створити Протез Руки - Гак",
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
Sandbox_UA = {
|
|
||||||
Sandbox_TOC = "The Only Cure",
|
|
||||||
Sandbox_TOC_CicatrizationSpeed = "Швидкість рубцювання",
|
|
||||||
Sandbox_TOC_WoundDirtynessMultiplier = "Множник забруднення рани",
|
|
||||||
Sandbox_TOC_SurgeonAbilityImportance = "Важливість медичних навичок лікаря",
|
|
||||||
Sandbox_TOC_EnableZombieAmputations = "Увімкнути ампутації зомбі",
|
|
||||||
Sandbox_TOC_ZombieAmputationDamageThreshold = "Поріг шкоди при ампутації зомбі",
|
|
||||||
Sandbox_TOC_ZombieAmputationDamageChance = "Шанс нанесення шкоди при ампутації зомбі",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
Tooltip_UA = {
|
|
||||||
|
|
||||||
Tooltip_Surgery_CantCauterize = "Не можна припекти рану",
|
|
||||||
|
|
||||||
Tooltip_Surgery_And = " та "
|
|
||||||
Tooltip_Surgery_TempTooLow = "Температура занадто низька",
|
|
||||||
Tooltip_Surgery_Coward = "Вам не вистачає сміливості зробити це",
|
|
||||||
Tooltip_Surgery_LimbNotFree = "Спочатку необхідно зняти протез",
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
UI_UA = {
|
|
||||||
UI_trait_Amputee_Hand = "Ампутована Ліва Рука",
|
|
||||||
UI_trait_Amputee_Hand_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Amputee_ForeArm = "Ампутоване Ліве Передпліччя",
|
|
||||||
UI_trait_Amputee_ForeArm_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Amputee_UpperArm = "Ампутоване Ліве Плече",
|
|
||||||
UI_trait_Amputee_UpperArm_desc = "",
|
|
||||||
|
|
||||||
UI_trait_Insensitive = "Нечутливий",
|
|
||||||
UI_trait_Insensitive_desc = "",
|
|
||||||
|
|
||||||
|
|
||||||
UI_Say_CantEquip = "Я не можу встановити це таким чином..."
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
_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"),
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
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,
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,8 @@ description=You've been bitten. You have only two choices.
|
|||||||
id=TheOnlyCure
|
id=TheOnlyCure
|
||||||
icon=icon.png
|
icon=icon.png
|
||||||
url=https://github.com/ZioPao/The-Only-Cure
|
url=https://github.com/ZioPao/The-Only-Cure
|
||||||
modversion=2.3
|
modversion=2.2.2
|
||||||
versionMin=42.13
|
versionMin=42.6
|
||||||
|
|
||||||
loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework
|
loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework
|
||||||
incompatible=\BB_FirstAidOverhaul
|
incompatible=\BB_FirstAidOverhaul
|
||||||
15
common/media/clothing/clothingItems/Bandage_LeftLowerArm.xml
Normal file
15
common/media/clothing/clothingItems/Bandage_LeftLowerArm.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<clothingItem>
|
||||||
|
<m_MaleModel></m_MaleModel>
|
||||||
|
<m_FemaleModel></m_FemaleModel>
|
||||||
|
<m_GUID>c99332ec-18fa-4d37-9049-9e6f6f7468e5</m_GUID>
|
||||||
|
<m_Static>false</m_Static>
|
||||||
|
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||||
|
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||||
|
<m_AttachBone></m_AttachBone>
|
||||||
|
<m_BaseTextures>bodydmg\malebody01_bandages_lower_left_arm</m_BaseTextures>
|
||||||
|
<m_BaseTextures>Amputations\Bandages\MaleBody01_bandages_lower_left_arm</m_BaseTextures>
|
||||||
|
<m_BaseTextures>Amputations\Bandages\test</m_BaseTextures>
|
||||||
|
|
||||||
|
|
||||||
|
</clothingItem>
|
||||||
@@ -12,7 +12,7 @@ local ClientRelayCommands = {}
|
|||||||
local function InitAmputationHandler(limbName, surgeonNum)
|
local function InitAmputationHandler(limbName, surgeonNum)
|
||||||
|
|
||||||
-- TODO Pretty unclean
|
-- TODO Pretty unclean
|
||||||
local surgeonPl = getSpecificPlayer(surgeonNum) -- fix broken, getOnlineID not working anymore
|
local surgeonPl = getSpecificPlayer(surgeonNum)
|
||||||
local handler = AmputationHandler:new(limbName, surgeonPl)
|
local handler = AmputationHandler:new(limbName, surgeonPl)
|
||||||
return handler
|
return handler
|
||||||
end
|
end
|
||||||
@@ -46,14 +46,6 @@ function ClientRelayCommands.ReceiveApplyFromServer()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--* WEAR AMPUTATION ITEM *--
|
|
||||||
function ClientRelayCommands.ReceiveWearAmputation(args)
|
|
||||||
local itemName = args.itemName
|
|
||||||
local clothingItem = getPlayer():getInventory():FindAndReturn(itemName)
|
|
||||||
getPlayer():setWornItem(clothingItem:getBodyLocation(), clothingItem)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
--* TRIGGERED BY ADMINS *--
|
--* TRIGGERED BY ADMINS *--
|
||||||
|
|
||||||
function ClientRelayCommands.ReceiveExecuteInitialization()
|
function ClientRelayCommands.ReceiveExecuteInitialization()
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
-- TODO Should be server side in 42.13
|
|
||||||
|
|
||||||
local StaticData = require("TOC/StaticData")
|
local StaticData = require("TOC/StaticData")
|
||||||
local CommonMethods = require("TOC/CommonMethods")
|
local CommonMethods = require("TOC/CommonMethods")
|
||||||
local CommandsData = require("TOC/CommandsData")
|
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
--- Submodule to handle spawning the correct items after certain actions (ie: cutting a hand). LOCAL ONLY!
|
--- Submodule to handle spawning the correct items after certain actions (ie: cutting a hand). LOCAL ONLY!
|
||||||
@@ -51,8 +47,6 @@ function ItemsController.Player.RemoveClothingItem(playerObj, clothingItem)
|
|||||||
|
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch
|
||||||
playerObj:getInventory():Remove(clothingItem) -- Umbrella is wrong, can be an InventoryItem too
|
playerObj:getInventory():Remove(clothingItem) -- Umbrella is wrong, can be an InventoryItem too
|
||||||
sendRemoveItemFromContainer(playerObj:getInventory(), clothingItem)
|
|
||||||
|
|
||||||
TOC_DEBUG.print("found and deleted" .. tostring(clothingItem))
|
TOC_DEBUG.print("found and deleted" .. tostring(clothingItem))
|
||||||
|
|
||||||
-- Reset model
|
-- Reset model
|
||||||
@@ -99,7 +93,11 @@ function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
|||||||
---@cast clothItem InventoryItem
|
---@cast clothItem InventoryItem
|
||||||
ItemsController.Player.RemoveClothingItem(playerObj, clothItem)
|
ItemsController.Player.RemoveClothingItem(playerObj, clothItem)
|
||||||
end
|
end
|
||||||
|
-- Reset model just in case
|
||||||
|
playerObj:resetModel()
|
||||||
|
|
||||||
|
-- group:setMultiItem("TOC_Arm", true)
|
||||||
|
-- group:setMultiItem("TOC_ArmProst", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Spawns and equips the correct amputation item to the player.
|
---Spawns and equips the correct amputation item to the player.
|
||||||
@@ -107,15 +105,12 @@ end
|
|||||||
---@param limbName string
|
---@param limbName string
|
||||||
function ItemsController.Player.SpawnAmputationItem(playerObj, limbName)
|
function ItemsController.Player.SpawnAmputationItem(playerObj, limbName)
|
||||||
TOC_DEBUG.print("clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
|
TOC_DEBUG.print("clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
|
||||||
local itemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName
|
local clothingItem = playerObj:getInventory():AddItem(StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
|
||||||
local clothingItem = playerObj:getInventory():AddItem(itemName)
|
|
||||||
|
|
||||||
local texId = ItemsController.Player.GetAmputationTexturesIndex(playerObj, false)
|
local texId = ItemsController.Player.GetAmputationTexturesIndex(playerObj, false)
|
||||||
|
|
||||||
---@cast clothingItem InventoryItem
|
---@cast clothingItem InventoryItem
|
||||||
clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1
|
clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1
|
||||||
sendAddItemToContainer(playerObj:getInventory(), clothingItem)
|
playerObj:setWornItem(clothingItem:getBodyLocation(), clothingItem)
|
||||||
sendServerCommand(playerObj, CommandsData.modules.TOC_RELAY, CommandsData.client.Relay.ReceiveWearAmputation, {itemName = itemName, texId = texId})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---Search through worn items and modifies a specific amputation item
|
---Search through worn items and modifies a specific amputation item
|
||||||
@@ -397,7 +397,7 @@ end
|
|||||||
local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Save("ISClothingExtraAction_isValid", ISClothingExtraAction.isValid)
|
local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Save("ISClothingExtraAction_isValid", ISClothingExtraAction.isValid)
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ISClothingExtraAction:isValid()
|
function ISClothingExtraAction:isValid()
|
||||||
return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra))
|
return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, InventoryItemFactory.CreateItem(self.extra))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
local DataController = require("TOC/Controllers/DataController")
|
local DataController = require("TOC/Controllers/DataController")
|
||||||
local CommonMethods = require("TOC/CommonMethods")
|
local CommonMethods = require("TOC/CommonMethods")
|
||||||
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
||||||
local CommandsData = require("TOC/CommandsData")
|
|
||||||
|
|
||||||
local StaticData = require("TOC/StaticData")
|
local StaticData = require("TOC/StaticData")
|
||||||
require("TOC/Events")
|
require("TOC/Events")
|
||||||
local TOC = require("TOC/Registries")
|
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +37,8 @@ function LocalPlayerController.InitializePlayer(isForced)
|
|||||||
|
|
||||||
-- Since isForced is used to reset an existing player data, we're gonna clean their ISHealthPanel table too
|
-- Since isForced is used to reset an existing player data, we're gonna clean their ISHealthPanel table too
|
||||||
if isForced then
|
if isForced then
|
||||||
sendClientCommand(CommandsData.modules.TOC_ITEMS, "DeleteAllOldAmputationItems", {playerNum = playerObj:getOnlineID()})
|
local ItemsController = require("TOC/Controllers/ItemsController")
|
||||||
|
ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
||||||
CachedDataHandler.Setup(username)
|
CachedDataHandler.Setup(username)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -58,7 +56,7 @@ function LocalPlayerController.ManageTraits()
|
|||||||
|
|
||||||
local AmputationHandler = require("TOC/Handlers/AmputationHandler")
|
local AmputationHandler = require("TOC/Handlers/AmputationHandler")
|
||||||
for k, v in pairs(StaticData.TRAITS_BP) do
|
for k, v in pairs(StaticData.TRAITS_BP) do
|
||||||
if playerObj:hasTrait(TOC.traits[k]) then
|
if playerObj:HasTrait(k) then
|
||||||
-- Once we find one, we should be done since they're exclusive
|
-- Once we find one, we should be done since they're exclusive
|
||||||
TOC_DEBUG.print("Player has amputation trait " .. k .. ", executing it")
|
TOC_DEBUG.print("Player has amputation trait " .. k .. ", executing it")
|
||||||
local tempHandler = AmputationHandler:new(v, playerObj)
|
local tempHandler = AmputationHandler:new(v, playerObj)
|
||||||
@@ -95,8 +93,7 @@ function LocalPlayerController.HealArea(bodyPart)
|
|||||||
bodyPart:setBleedingTime(0)
|
bodyPart:setBleedingTime(0)
|
||||||
|
|
||||||
bodyPart:SetBitten(false)
|
bodyPart:SetBitten(false)
|
||||||
--bodyPart:setBiteTime(0)
|
bodyPart:setBiteTime(0)
|
||||||
bodyPart:SetInfected(false)
|
|
||||||
|
|
||||||
bodyPart:setCut(false)
|
bodyPart:setCut(false)
|
||||||
bodyPart:setCutTime(0)
|
bodyPart:setCutTime(0)
|
||||||
@@ -113,14 +110,14 @@ end
|
|||||||
---@param bodyPart BodyPart
|
---@param bodyPart BodyPart
|
||||||
---@param limbName string
|
---@param limbName string
|
||||||
---@param dcInst DataController
|
---@param dcInst DataController
|
||||||
function LocalPlayerController.HealZombieInfection(bodyDamage, limbName, dcInst)
|
function LocalPlayerController.HealZombieInfection(bodyDamage, bodyPart, limbName, dcInst)
|
||||||
-- FIX Different in B42.13, to be set with stats?
|
|
||||||
if bodyDamage:isInfected() == false then return end
|
if bodyDamage:isInfected() == false then return end
|
||||||
|
|
||||||
bodyDamage:setInfected(false)
|
bodyDamage:setInfected(false)
|
||||||
bodyDamage:setInfectionMortalityDuration(-1)
|
bodyDamage:setInfectionMortalityDuration(-1)
|
||||||
bodyDamage:setInfectionTime(-1)
|
bodyDamage:setInfectionTime(-1)
|
||||||
--bodyPart:SetInfected(false)
|
bodyDamage:setInfectionLevel(-1)
|
||||||
|
bodyPart:SetInfected(false)
|
||||||
|
|
||||||
dcInst:setIsInfected(limbName, false)
|
dcInst:setIsInfected(limbName, false)
|
||||||
dcInst:apply()
|
dcInst:apply()
|
||||||
@@ -186,7 +183,7 @@ function LocalPlayerController.HandleDamage(character)
|
|||||||
-- Special case for bites\zombie infections
|
-- Special case for bites\zombie infections
|
||||||
if bodyPart:IsInfected() then
|
if bodyPart:IsInfected() then
|
||||||
TOC_DEBUG.print("Healed from zombie infection - " .. limbName)
|
TOC_DEBUG.print("Healed from zombie infection - " .. limbName)
|
||||||
LocalPlayerController.HealZombieInfection(bd, limbName, dcInst)
|
LocalPlayerController.HealZombieInfection(bd, bodyPart, limbName, dcInst)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (bodyPart:bitten() or bodyPart:IsInfected()) and not dcInst:getIsInfected(limbName) then
|
if (bodyPart:bitten() or bodyPart:IsInfected()) and not dcInst:getIsInfected(limbName) then
|
||||||
@@ -320,10 +317,9 @@ function LocalPlayerController.HandleSetCicatrization(dcInst, playerObj, limbNam
|
|||||||
dcInst:setIsCicatrized(limbName, true)
|
dcInst:setIsCicatrized(limbName, true)
|
||||||
dcInst:setCicatrizationTime(limbName, 0)
|
dcInst:setCicatrizationTime(limbName, 0)
|
||||||
|
|
||||||
-- -- Set visuals for the amputation
|
-- Set visuals for the amputation
|
||||||
sendClientCommand(CommandsData.modules.TOC_ITEMS, "OverrideAmputationItemVisuals",
|
local ItemsController = require("TOC/Controllers/ItemsController")
|
||||||
{playerNum = playerObj:getOnlineID(), limbName = limbName, isCicatrized = true})
|
ItemsController.Player.OverrideAmputationItemVisuals(playerObj, limbName, true)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--* Object drop handling when amputation occurs
|
--* Object drop handling when amputation occurs
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
-- TODO Move this to server side for 42.13
|
|
||||||
|
|
||||||
|
|
||||||
local DataController = require("TOC/Controllers/DataController")
|
local DataController = require("TOC/Controllers/DataController")
|
||||||
local CommandsData = require("TOC/CommandsData")
|
local ItemsController = require("TOC/Controllers/ItemsController")
|
||||||
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
||||||
local LocalPlayerController = require("TOC/Controllers/LocalPlayerController")
|
local LocalPlayerController = require("TOC/Controllers/LocalPlayerController")
|
||||||
local StaticData = require("TOC/StaticData")
|
local StaticData = require("TOC/StaticData")
|
||||||
@@ -155,11 +152,11 @@ function AmputationHandler:damageAfterAmputation(surgeonFactor)
|
|||||||
bodyPart:setBleedingTime(baseDamage - surgeonFactor)
|
bodyPart:setBleedingTime(baseDamage - surgeonFactor)
|
||||||
bodyPart:setDeepWounded(true)
|
bodyPart:setDeepWounded(true)
|
||||||
bodyPart:setDeepWoundTime(baseDamage - surgeonFactor)
|
bodyPart:setDeepWoundTime(baseDamage - surgeonFactor)
|
||||||
patientStats:set(CharacterStat.ENDURANCE, surgeonFactor)
|
patientStats:setEndurance(surgeonFactor)
|
||||||
patientStats:set(CharacterStat.STRESS, baseDamage - surgeonFactor)
|
patientStats:setStress(baseDamage - surgeonFactor)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Execute the amputation. This method doesn't check if the upper limb has been amputated or not, so if
|
---Execute the amputation. This method doesn't check if the upper limb has been amputated or not, so if
|
||||||
--- somehow the method gets triggered and we're trying to cut off a part that doesn't really exist anymore,
|
--- somehow the method gets triggered and we're trying to cut off a part that doesn't really exist anymore,
|
||||||
--- it will still be executed. This is by design, additional checks must be made BEFORE running the AmputationHandler
|
--- it will still be executed. This is by design, additional checks must be made BEFORE running the AmputationHandler
|
||||||
---@param damagePlayer boolean
|
---@param damagePlayer boolean
|
||||||
@@ -177,13 +174,8 @@ function AmputationHandler:execute(damagePlayer)
|
|||||||
LocalPlayerController.HealArea(bodyPart)
|
LocalPlayerController.HealArea(bodyPart)
|
||||||
|
|
||||||
-- Give the player the correct amputation item
|
-- Give the player the correct amputation item
|
||||||
|
ItemsController.Player.DeleteOldAmputationItem(self.patientPl, self.limbName)
|
||||||
-- FIX This can be done in a single step instead of this crap
|
ItemsController.Player.SpawnAmputationItem(self.patientPl, self.limbName)
|
||||||
sendClientCommand(CommandsData.modules.TOC_ITEMS, "DeleteOldAmputationItem",
|
|
||||||
{playerNum = self.patientPl:getOnlineID(), limbName = self.limbName})
|
|
||||||
sendClientCommand(CommandsData.modules.TOC_ITEMS, "SpawnAmputationItem",
|
|
||||||
{playerNum = self.patientPl:getOnlineID(), limbName = self.limbName})
|
|
||||||
|
|
||||||
|
|
||||||
-- Add it to the list of cut limbs on this local client
|
-- Add it to the list of cut limbs on this local client
|
||||||
local username = self.patientPl:getUsername()
|
local username = self.patientPl:getUsername()
|
||||||
@@ -198,13 +190,8 @@ function AmputationHandler:execute(damagePlayer)
|
|||||||
-- Cache highest amputation and hand feasibility
|
-- Cache highest amputation and hand feasibility
|
||||||
CachedDataHandler.CalculateCacheableValues(username)
|
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 the part was actually infected, heal the player, if they were in time (infectionLevel < 20)
|
||||||
local infectionLevel = self.patientPl:getStats():get(CharacterStat.ZOMBIE_INFECTION)
|
if bd:getInfectionLevel() < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if infectionLevel < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then
|
|
||||||
LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst)
|
LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -216,7 +203,7 @@ function AmputationHandler:execute(damagePlayer)
|
|||||||
triggerEvent("OnAmputatedLimb", self.limbName)
|
triggerEvent("OnAmputatedLimb", self.limbName)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Delete the instance
|
---Deletes the instance
|
||||||
function AmputationHandler:close()
|
function AmputationHandler:close()
|
||||||
AmputationHandler.instance = nil
|
AmputationHandler.instance = nil
|
||||||
end
|
end
|
||||||
@@ -9,7 +9,7 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
|||||||
---@class ProsthesisHandler
|
---@class ProsthesisHandler
|
||||||
local ProsthesisHandler = {}
|
local ProsthesisHandler = {}
|
||||||
|
|
||||||
local bodylocArmProstBaseline = "toc:toc_armprost"
|
local bodylocArmProstBaseline = "TOC_ArmProst"
|
||||||
--local bodyLocLegProst = "TOC_LegProst"
|
--local bodyLocLegProst = "TOC_LegProst"
|
||||||
|
|
||||||
---Check if the following item is a prosthesis or not
|
---Check if the following item is a prosthesis or not
|
||||||
@@ -17,12 +17,13 @@ local bodylocArmProstBaseline = "toc:toc_armprost"
|
|||||||
---@return boolean
|
---@return boolean
|
||||||
function ProsthesisHandler.CheckIfProst(item)
|
function ProsthesisHandler.CheckIfProst(item)
|
||||||
-- TODO Won't be correct when prost for legs are gonna be in
|
-- 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
|
if item == nil then
|
||||||
TOC_DEBUG.print("Not prost")
|
--TOC_DEBUG.print("Not prost")
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return item:getBodyLocation():toString():contains(bodylocArmProstBaseline)
|
return item:getBodyLocation():contains(bodylocArmProstBaseline)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Get the grouping for the prosthesis
|
---Get the grouping for the prosthesis
|
||||||
@@ -34,7 +35,7 @@ function ProsthesisHandler.GetGroup(item)
|
|||||||
|
|
||||||
local bodyLocation = item:getBodyLocation()
|
local bodyLocation = item:getBodyLocation()
|
||||||
local position
|
local position
|
||||||
if bodyLocation:toString():contains(bodylocArmProstBaseline) then
|
if bodyLocation:contains(bodylocArmProstBaseline) then
|
||||||
position = "Top_"
|
position = "Top_"
|
||||||
else
|
else
|
||||||
TOC_DEBUG.print("Something is wrong, no position in this item")
|
TOC_DEBUG.print("Something is wrong, no position in this item")
|
||||||
@@ -6,7 +6,7 @@ require("TOC/Events")
|
|||||||
|
|
||||||
---@class Main
|
---@class Main
|
||||||
local Main = {
|
local Main = {
|
||||||
_version = "2.3"
|
_version = "2.2.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Main.Start()
|
function Main.Start()
|
||||||
@@ -87,7 +87,7 @@ function CleanWoundAction:perform()
|
|||||||
|
|
||||||
TOC_DEBUG.print("CleanWound for " .. self.otherPlayer:getUsername())
|
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)
|
self.character:getStats():setPanic(self.character:getStats():getPanic() + 15)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -24,7 +24,9 @@ local CutLimbAction = ISBaseTimedAction:derive("CutLimbAction")
|
|||||||
---@param bandageItem InventoryItem?
|
---@param bandageItem InventoryItem?
|
||||||
---@return CutLimbAction
|
---@return CutLimbAction
|
||||||
function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, bandageItem)
|
function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, bandageItem)
|
||||||
local o = ISBaseTimedAction.new(self, surgeon)
|
local o = {}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
|
||||||
-- We need to follow ISBaseTimedAction. self.character is gonna be the surgeon
|
-- We need to follow ISBaseTimedAction. self.character is gonna be the surgeon
|
||||||
o.character = surgeon
|
o.character = surgeon
|
||||||
@@ -41,21 +43,12 @@ function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, banda
|
|||||||
o.stopOnWalk = true
|
o.stopOnWalk = true
|
||||||
o.stopOnRun = true
|
o.stopOnRun = true
|
||||||
|
|
||||||
o.maxTime = o:getDuration()
|
o.maxTime = 1000 - (surgeon:getPerkLevel(Perks.Doctor) * 50)
|
||||||
|
if o.character:isTimedActionInstant() then o.maxTime = 1 end
|
||||||
|
|
||||||
return o
|
return o
|
||||||
end
|
end
|
||||||
|
|
||||||
function CutLimbAction:getDuration()
|
|
||||||
if self.character:isTimedActionInstant() then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
local baseTime = 1000
|
|
||||||
local perkLevel = self.character:getPerkLevel(Perks.Doctor)
|
|
||||||
return baseTime - (perkLevel * 50)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function CutLimbAction:isValid()
|
function CutLimbAction:isValid()
|
||||||
return not ISHealthPanel.DidPatientMove(self.character,self.patient, self.patientX, self.patientY)
|
return not ISHealthPanel.DidPatientMove(self.character,self.patient, self.patientX, self.patientY)
|
||||||
end
|
end
|
||||||
@@ -96,16 +89,6 @@ function CutLimbAction:start()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function CutLimbAction:serverStart()
|
|
||||||
|
|
||||||
-- emulateAnimEvent(self.netAction, 200, "")
|
|
||||||
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- function CutLimbAction:animEvent(event, parameter)
|
|
||||||
|
|
||||||
-- end
|
|
||||||
|
|
||||||
function CutLimbAction:waitToStart()
|
function CutLimbAction:waitToStart()
|
||||||
if self.character == self.patient then
|
if self.character == self.patient then
|
||||||
return false
|
return false
|
||||||
@@ -134,30 +117,22 @@ function CutLimbAction:stop()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function CutLimbAction:perform()
|
function CutLimbAction:perform()
|
||||||
|
-- Stop the sound
|
||||||
self:stopSound()
|
self:stopSound()
|
||||||
|
|
||||||
|
if self.patient == self.character then
|
||||||
|
TOC_DEBUG.print("patient and surgeon are the same, executing on the client")
|
||||||
|
local handler = AmputationHandler:new(self.limbName)
|
||||||
|
handler:execute(true)
|
||||||
|
else
|
||||||
|
TOC_DEBUG.print("patient and surgeon not the same, sending relay to server")
|
||||||
|
-- Other player
|
||||||
|
---@type relayExecuteAmputationActionParams
|
||||||
|
local params = {patientNum = self.patient:getOnlineID(), limbName = self.limbName}
|
||||||
|
sendClientCommand(CommandsData.modules.TOC_RELAY, CommandsData.server.Relay.RelayExecuteAmputationAction, params )
|
||||||
|
end
|
||||||
|
|
||||||
ISBaseTimedAction.perform(self)
|
ISBaseTimedAction.perform(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function CutLimbAction:complete()
|
|
||||||
-- TODO AmputationHandler runs client side, by doing this this would run on the server. AM I missing something?
|
|
||||||
local handler = AmputationHandler:new(self.limbName, self.character)
|
|
||||||
handler:execute(true)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- function CutLimbAction:perform()
|
|
||||||
-- -- Stop the sound
|
|
||||||
-- if self.patient == self.character then
|
|
||||||
-- TOC_DEBUG.print("patient and surgeon are the same, executing on the client")
|
|
||||||
-- local handler = AmputationHandler:new(self.limbName)
|
|
||||||
-- handler:execute(true)
|
|
||||||
-- else
|
|
||||||
-- TOC_DEBUG.print("patient and surgeon not the same, sending relay to server")
|
|
||||||
-- -- Other player
|
|
||||||
-- ---@type relayExecuteAmputationActionParams
|
|
||||||
-- local params = {patientNum = self.patient:getOnlineID(), limbName = self.limbName}
|
|
||||||
-- sendClientCommand(CommandsData.modules.TOC_RELAY, CommandsData.server.Relay.RelayExecuteAmputationAction, params )
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- end
|
|
||||||
|
|
||||||
return CutLimbAction
|
return CutLimbAction
|
||||||
@@ -68,10 +68,9 @@ local function AddStoveContextMenu(playerNum, context, worldObjects, test)
|
|||||||
|
|
||||||
|
|
||||||
-- Notifications, in case the player can't do the action
|
-- Notifications, in case the player can't do the action
|
||||||
local isPlayerCourageous = pl:hasTrait(CharacterTrait.BRAVE) or pl:hasTrait(CharacterTrait.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()-1 >= 2.50
|
local isTempHighEnough = stoveObj:getCurrentTemperature() >= 250
|
||||||
local isLimbFree = not dcInst:getIsProstEquipped(limbName)
|
local isLimbFree = not dcInst:getIsProstEquipped(limbName)
|
||||||
TOC_DEBUG.print(stoveObj:getCurrentTemperature())
|
|
||||||
|
|
||||||
option.notAvailable = not(isPlayerCourageous and isTempHighEnough and isLimbFree)
|
option.notAvailable = not(isPlayerCourageous and isTempHighEnough and isLimbFree)
|
||||||
if not isTempHighEnough then
|
if not isTempHighEnough then
|
||||||
@@ -21,7 +21,7 @@ end
|
|||||||
---@param args relayExecuteAmputationActionParams
|
---@param args relayExecuteAmputationActionParams
|
||||||
function ServerRelayCommands.RelayExecuteAmputationAction(surgeonPl, args)
|
function ServerRelayCommands.RelayExecuteAmputationAction(surgeonPl, args)
|
||||||
local patientPl = getPlayerByOnlineID(args.patientNum)
|
local patientPl = getPlayerByOnlineID(args.patientNum)
|
||||||
local surgeonNum = surgeonPl:getPlayerNum()
|
local surgeonNum = surgeonPl:getOnlineID()
|
||||||
|
|
||||||
---@type receiveDamageDuringAmputationParams
|
---@type receiveDamageDuringAmputationParams
|
||||||
local params = {surgeonNum = surgeonNum, limbName = args.limbName, damagePlayer = true}
|
local params = {surgeonNum = surgeonNum, limbName = args.limbName, damagePlayer = true}
|
||||||
@@ -43,7 +43,7 @@ end
|
|||||||
---@param args relayForcedAmputationParams
|
---@param args relayForcedAmputationParams
|
||||||
function ServerRelayCommands.RelayForcedAmputation(adminObj, args)
|
function ServerRelayCommands.RelayForcedAmputation(adminObj, args)
|
||||||
local patientPl = getPlayerByOnlineID(args.patientNum)
|
local patientPl = getPlayerByOnlineID(args.patientNum)
|
||||||
local adminNum = adminObj:getPlayerNum()
|
local adminNum = adminObj:getOnlineID()
|
||||||
|
|
||||||
---@type receiveDamageDuringAmputationParams
|
---@type receiveDamageDuringAmputationParams
|
||||||
local ampParams = {surgeonNum = adminNum, limbName = args.limbName, damagePlayer = false} -- the only difference between relayExecuteAmputationAction and this is the damage
|
local ampParams = {surgeonNum = adminNum, limbName = args.limbName, damagePlayer = false} -- the only difference between relayExecuteAmputationAction and this is the damage
|
||||||
@@ -53,11 +53,7 @@ function ServerRelayCommands.RelayForcedAmputation(adminObj, args)
|
|||||||
sendServerCommand(patientPl, CommandsData.modules.TOC_RELAY, CommandsData.client.Relay.ReceiveForcedCicatrization, {limbName = args.limbName})
|
sendServerCommand(patientPl, CommandsData.modules.TOC_RELAY, CommandsData.client.Relay.ReceiveForcedCicatrization, {limbName = args.limbName})
|
||||||
end
|
end
|
||||||
|
|
||||||
function ServerRelayCommands.DeleteAllOldAmputationItems(_, args)
|
|
||||||
local playerObj = getPlayerByOnlineID(args.playerNum)
|
|
||||||
local ItemsController = require("TOC/Controllers/ItemsController")
|
|
||||||
ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
|
||||||
end
|
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
79
common/media/lua/shared/TOC/BodyLocations.lua
Normal file
79
common/media/lua/shared/TOC/BodyLocations.lua
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
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")
|
||||||
@@ -5,8 +5,7 @@ local CommandsData = {}
|
|||||||
|
|
||||||
CommandsData.modules = {
|
CommandsData.modules = {
|
||||||
TOC_DEBUG = "TOC_DEBUG",
|
TOC_DEBUG = "TOC_DEBUG",
|
||||||
TOC_RELAY = "TOC_RELAY",
|
TOC_RELAY = "TOC_RELAY"
|
||||||
TOC_ITEMS = "TOC_ITEMS"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandsData.client = {
|
CommandsData.client = {
|
||||||
@@ -16,7 +15,6 @@ CommandsData.client = {
|
|||||||
|
|
||||||
--* APPLY *--
|
--* APPLY *--
|
||||||
ReceiveApplyFromServer = "ReceiveApplyFromServer",
|
ReceiveApplyFromServer = "ReceiveApplyFromServer",
|
||||||
ReceiveWearAmputation = "ReceiveWearAmputation",
|
|
||||||
|
|
||||||
--* ADMIN ONLY --*
|
--* ADMIN ONLY --*
|
||||||
ReceiveExecuteInitialization = "ReceiveExecuteInitialization",
|
ReceiveExecuteInitialization = "ReceiveExecuteInitialization",
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean}
|
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
||||||
-- _STR = Only strings, no index
|
-- _STR = Only strings, no index
|
||||||
-- _IND_STR = indexed Strings
|
-- _IND_STR = indexed Strings
|
||||||
-- _IND_BPT = Indexed BodyPartType
|
-- _IND_BPT = Indexed BodyPartType
|
||||||
@@ -48,6 +49,15 @@ StaticData.PARTS_STR = {
|
|||||||
"UpperArm"
|
"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.
|
-- No "MAX" here.
|
||||||
StaticData.IGNORED_BODYLOCS_BPT = {
|
StaticData.IGNORED_BODYLOCS_BPT = {
|
||||||
@@ -183,8 +193,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
StaticData.TOURNIQUET_BODYLOCS_TO_GROUPS_IND_STR = {
|
StaticData.TOURNIQUET_BODYLOCS_TO_GROUPS_IND_STR = {
|
||||||
[ItemBodyLocation.HANDS_LEFT] = StaticData.AMP_GROUPS_IND_STR.Top_L,
|
["HandsLeft"] = StaticData.AMP_GROUPS_IND_STR.Top_L,
|
||||||
[ItemBodyLocation.HANDS_RIGHT] = StaticData.AMP_GROUPS_IND_STR.Top_R
|
["HandsRight"] = StaticData.AMP_GROUPS_IND_STR.Top_R
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -232,7 +242,7 @@ end
|
|||||||
StaticData.TRAITS_BP = {
|
StaticData.TRAITS_BP = {
|
||||||
Amputee_Hand = "Hand_L",
|
Amputee_Hand = "Hand_L",
|
||||||
Amputee_ForeArm = "ForeArm_L",
|
Amputee_ForeArm = "ForeArm_L",
|
||||||
Amputee_UpperArm = "UpperArm_L",
|
Amputee_UpperArm = "UpperArm_L"
|
||||||
}
|
}
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
@@ -4,17 +4,17 @@ ContextMenu_FR = {
|
|||||||
ContextMenu_Amputate_Stitch = "Amputer et suturer",
|
ContextMenu_Amputate_Stitch = "Amputer et suturer",
|
||||||
ContextMenu_Amputate_Stitch_Bandage = "Amputer, suturer et bander",
|
ContextMenu_Amputate_Stitch_Bandage = "Amputer, suturer et bander",
|
||||||
|
|
||||||
ContextMenu_Cauterize = "Cautériser",
|
ContextMenu_Cauterize = "Cautériser",
|
||||||
|
|
||||||
ContextMenu_Limb_Hand_L = "Main gauche",
|
ContextMenu_Limb_Hand_L = "Main gauche",
|
||||||
ContextMenu_Limb_ForeArm_L = "Avant-bras gauche",
|
ContextMenu_Limb_ForeArm_L = "Avant-bras gauche",
|
||||||
ContextMenu_Limb_UpperArm_L = "Bras supérieur gauche",
|
ContextMenu_Limb_UpperArm_L = "Bras supérieur gauche",
|
||||||
ContextMenu_Limb_Hand_R = "Main droite",
|
ContextMenu_Limb_Hand_R = "Main droite",
|
||||||
ContextMenu_Limb_ForeArm_R = "Avant-bras droit",
|
ContextMenu_Limb_ForeArm_R = "Avant-bras droit",
|
||||||
ContextMenu_Limb_UpperArm_R = "Bras supérieur droit",
|
ContextMenu_Limb_UpperArm_R = "Bras supérieur droit",
|
||||||
|
|
||||||
ContextMenu_InstallProstRight = "Installer une prothèse sur le bras droit",
|
ContextMenu_InstallProstRight = "Installer une prothèse sur le bras droit",
|
||||||
ContextMenu_InstallProstLeft = "Installer une prothèse sur le bras gauche",
|
ContextMenu_InstallProstLeft = "Installer une prothèse sur le bras gauche",
|
||||||
|
|
||||||
ContextMenu_PutTourniquetArmLeft = "Mettre un garrot sur le bras gauche",
|
ContextMenu_PutTourniquetArmLeft = "Mettre un garrot sur le bras gauche",
|
||||||
ContextMenu_PutTourniquetLegL = "Mettre un garrot sur la jambe gauche",
|
ContextMenu_PutTourniquetLegL = "Mettre un garrot sur la jambe gauche",
|
||||||
@@ -24,6 +24,6 @@ ContextMenu_FR = {
|
|||||||
ContextMenu_CleanWound = "Nettoyer la plaie",
|
ContextMenu_CleanWound = "Nettoyer la plaie",
|
||||||
|
|
||||||
ContextMenu_Admin_TOC = "TOC",
|
ContextMenu_Admin_TOC = "TOC",
|
||||||
ContextMenu_Admin_ResetTOC = "Réinitialiser les amputations",
|
ContextMenu_Admin_ResetTOC = "Réinitialiser les amputations",
|
||||||
ContextMenu_Admin_ForceAmputation = "Forcer l'amputation",
|
ContextMenu_Admin_ForceAmputation = "Forcer l'amputation",
|
||||||
}
|
}
|
||||||
21
common/media/lua/shared/Translate/FR/IG_UI_FR.txt
Normal file
21
common/media/lua/shared/Translate/FR/IG_UI_FR.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
IG_UI_FR = {
|
||||||
|
IGUI_Yes = "Oui",
|
||||||
|
IGUI_No = "Non",
|
||||||
|
|
||||||
|
IGUI_perks_Amputations = "Amputations",
|
||||||
|
IGUI_perks_Side_R = "C<>t<EFBFBD> droit",
|
||||||
|
IGUI_perks_Side_L = "C<>t<EFBFBD> gauche",
|
||||||
|
IGUI_perks_Prosthesis = "Proth<74>se",
|
||||||
|
IGUI_perks_ProstFamiliarity = "Familiarit<69>",
|
||||||
|
|
||||||
|
IGUI_ItemCat_Prosthesis = "Proth<74>se",
|
||||||
|
IGUI_ItemCat_Surgery = "Chirurgie",
|
||||||
|
IGUI_ItemCat_Amputation = "Amputation",
|
||||||
|
|
||||||
|
IGUI_HealthPanel_Cicatrization = "Cicatrisation",
|
||||||
|
IGUI_HealthPanel_Cicatrized = "Cicatris<69>",
|
||||||
|
IGUI_HealthPanel_Cauterized = "Caut<75>ris<69>",
|
||||||
|
IGUI_HealthPanel_WoundDirtyness = "Salet<65> de la plaie",
|
||||||
|
IGUI_HealthPanel_ProstEquipped = "Proth<74>se <20>quip<69>e",
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user