2
.gitignore
vendored
@@ -1 +1 @@
|
|||||||
.vscode
|
/media
|
||||||
33
.vscode/settings.json
vendored
@@ -1,16 +1,23 @@
|
|||||||
{
|
{
|
||||||
"todo-tree.tree.scanMode": "workspace",
|
"Lua.workspace.library": [
|
||||||
"mod_id": "3236152598",
|
"${addons}/umbrella-unstable/module/library"
|
||||||
"zomboid_user_folder": "C:/Users/picch/Zomboid",
|
|
||||||
"zomboid_folder": "E:\\Steam\\steamapps\\common\\ProjectZomboid",
|
|
||||||
"zomboid_server_folder": "E:\\Steam\\steamapps\\common\\Project Zomboid Dedicated Server",
|
|
||||||
"Lua.diagnostics.globals": [
|
|
||||||
"ModOptions",
|
|
||||||
"zombie",
|
|
||||||
"_"
|
|
||||||
],
|
],
|
||||||
"Lua.format.defaultConfig": {
|
"Lua.runtime.version": "Lua 5.1",
|
||||||
"indent_style": "space",
|
"Lua.runtime.path": [
|
||||||
"indent_size": "2"
|
"?.lua",
|
||||||
}
|
"?/init.lua",
|
||||||
|
"server/?.lua"
|
||||||
|
],
|
||||||
|
"Lua.completion.requireSeparator": "/",
|
||||||
|
"Lua.runtime.builtin": {
|
||||||
|
"debug": "disable",
|
||||||
|
"io": "disable",
|
||||||
|
"package": "disable"
|
||||||
|
},
|
||||||
|
"Lua.workspace.checkThirdParty": false,
|
||||||
|
"Lua.workspace.ignoreDir": [
|
||||||
|
".vscode",
|
||||||
|
"dev_stuff",
|
||||||
|
"workshop_files"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
128
.vscode/tasks.json
vendored
@@ -7,73 +7,109 @@
|
|||||||
"label": "Create Workshop folder",
|
"label": "Create Workshop folder",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"options": {"statusbar": {"label": "$(combine) Assemble Mod"}},
|
"options": {"statusbar": {"label": "$(combine) Assemble Mod"}},
|
||||||
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py picch ${workspaceFolderBasename}",
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"picch\" \"${workspaceFolderBasename}\" \"\"",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Create Workshop folder",
|
||||||
|
"type": "shell",
|
||||||
|
"options": {"statusbar": {"label": "$(combine) Assemble Mod (B41 ONLY)"}},
|
||||||
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack_b41.py \"picch\" \"${workspaceFolderBasename}\"",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Create Workshop folder",
|
||||||
|
"type": "shell",
|
||||||
|
"options": {"statusbar": {"label": "$(combine) Assemble Mod (Test)"}},
|
||||||
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"picch\" \"${workspaceFolderBasename}\" \"test\"",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Bump Mod Version",
|
"label": "Bump Mod Version",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"options": {"statusbar": {"label": "$(arrow-up) Bump Mod Version"}},
|
"options": {"statusbar": {"label": "$(arrow-up) Bump Mod Version"}},
|
||||||
"command": "python ${config:zomboid_user_folder}/PaosCrap/bump_version.py media/lua/client/TOC/Main.lua",
|
"command": "python ${config:zomboid_user_folder}/PaosCrap/bump_version.py 42/media/lua/client/TOC/Main.lua",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Run Zomboid Debug No Steam",
|
"label": "Run Zomboid Debug No Steam (42)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "groupZomboid"
|
"group": "groupZomboid"
|
||||||
},
|
},
|
||||||
"command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
"command": "\"${config:zomboid_folder_b42}\\ProjectZomboid64 - nosteam-debug 42.bat\"",
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid client"}},
|
"options": {"statusbar": {"label": "$(run) Zomboid client (42)"}},
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$eslint-stylish"
|
"$eslint-stylish"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Run Zomboid Debug No Steam 2",
|
"label": "Run Zomboid Debug No Steam (41)",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
|
||||||
"options": {"statusbar": {"hide": true}},
|
|
||||||
|
|
||||||
"problemMatcher": [
|
|
||||||
"$eslint-stylish"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Run two instances of Zomboid Debug No Steam",
|
|
||||||
"options": {"statusbar": {"label": "$(run-all) Two Zomboid Clients"}},
|
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "always",
|
"group": "groupZomboid"
|
||||||
"panel": "new"
|
},
|
||||||
},
|
"command": "\"${config:zomboid_folder_b41}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
||||||
"dependsOn": [
|
"options": {"statusbar": {"label": "$(run) Zomboid client (41)"}},
|
||||||
"Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"],
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Run Zomboid Test Server",
|
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid Server (TOC)"}},
|
|
||||||
"type": "shell",
|
|
||||||
"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 Debug No Steam",
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH)"}},
|
// "type": "shell",
|
||||||
"type": "shell",
|
// "presentation": {
|
||||||
"command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH",
|
// "group": "groupZomboid"
|
||||||
"problemMatcher": [
|
// },
|
||||||
"$eslint-stylish"
|
// "command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
||||||
]
|
// "options": {"statusbar": {"label": "$(run) Zomboid client"}},
|
||||||
},
|
// "problemMatcher": [
|
||||||
{
|
// "$eslint-stylish"
|
||||||
"label": "Run Zomboid Test Server 3",
|
// ]
|
||||||
"options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH+iMedsFixed)"}},
|
// },
|
||||||
"type": "shell",
|
// {
|
||||||
"command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH_imeds",
|
// "label": "Run Zomboid Debug No Steam 2",
|
||||||
"problemMatcher": [
|
// "type": "shell",
|
||||||
"$eslint-stylish"
|
// "command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
|
||||||
]
|
// "options": {"statusbar": {"hide": true}},
|
||||||
}
|
|
||||||
|
// "problemMatcher": [
|
||||||
|
// "$eslint-stylish"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "label": "Run two instances of Zomboid Debug No Steam",
|
||||||
|
// "options": {"statusbar": {"label": "$(run-all) Two Zomboid Clients"}},
|
||||||
|
// "presentation": {
|
||||||
|
// "reveal": "always",
|
||||||
|
// "panel": "new"
|
||||||
|
// },
|
||||||
|
// "dependsOn": [
|
||||||
|
// "Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"],
|
||||||
|
// "problemMatcher": []
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "label": "Run Zomboid Test Server",
|
||||||
|
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC)"}},
|
||||||
|
// "type": "shell",
|
||||||
|
// "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC",
|
||||||
|
// "problemMatcher": [
|
||||||
|
// "$eslint-stylish"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "label": "Run Zomboid Test Server 2",
|
||||||
|
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH)"}},
|
||||||
|
// "type": "shell",
|
||||||
|
// "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH",
|
||||||
|
// "problemMatcher": [
|
||||||
|
// "$eslint-stylish"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "label": "Run Zomboid Test Server 3",
|
||||||
|
// "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH+iMedsFixed)"}},
|
||||||
|
// "type": "shell",
|
||||||
|
// "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH_imeds",
|
||||||
|
// "problemMatcher": [
|
||||||
|
// "$eslint-stylish"
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -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
@@ -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
|
||||||
BIN
42/media/ui/Female/ForeArm_L.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
42/media/ui/Female/ForeArm_R.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
42/media/ui/Female/Hand_L.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/Female/Hand_R.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/Female/UpperArm_L.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/Female/UpperArm_R.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/Male/ForeArm_L.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/Male/ForeArm_R.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
42/media/ui/Male/Hand_L.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
42/media/ui/Male/Hand_R.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
42/media/ui/Male/UpperArm_L.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
42/media/ui/Male/UpperArm_R.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
42/media/ui/test_pattern.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
11
42/mod.info
Normal file
@@ -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.2
|
||||||
|
versionMin=42.6
|
||||||
|
|
||||||
|
loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework
|
||||||
|
incompatible=\BB_FirstAidOverhaul
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {}
|
|
||||||
}
|
|
||||||
@@ -31,6 +31,7 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- ugly This whole section should be done better
|
||||||
for _, pl in pairs(players) do
|
for _, pl in pairs(players) do
|
||||||
---@cast pl IsoPlayer
|
---@cast pl IsoPlayer
|
||||||
|
|
||||||
@@ -45,7 +46,6 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
|
|||||||
sendClientCommand(CommandsData.modules.TOC_RELAY, CommandsData.server.Relay.RelayExecuteInitialization,
|
sendClientCommand(CommandsData.modules.TOC_RELAY, CommandsData.server.Relay.RelayExecuteInitialization,
|
||||||
{ patientNum = clickedPlayerNum })
|
{ patientNum = clickedPlayerNum })
|
||||||
else
|
else
|
||||||
-- TODO ugly
|
|
||||||
ClientRelayCommands.ReceiveExecuteInitialization()
|
ClientRelayCommands.ReceiveExecuteInitialization()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -65,7 +65,6 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
|
|||||||
{ patientNum = clickedPlayerNum, limbName = limbName })
|
{ patientNum = clickedPlayerNum, limbName = limbName })
|
||||||
else
|
else
|
||||||
ClientRelayCommands.ReceiveExecuteAmputationAction({surgeonNum=clickedPlayerNum, limbName=limbName, damagePlayer=false})
|
ClientRelayCommands.ReceiveExecuteAmputationAction({surgeonNum=clickedPlayerNum, limbName=limbName, damagePlayer=false})
|
||||||
-- todo ugly
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end)
|
end)
|
||||||
@@ -50,6 +50,10 @@ Compat.handlers = {
|
|||||||
['iMedsFixed'] = {
|
['iMedsFixed'] = {
|
||||||
fun = Compat.iMeds,
|
fun = Compat.iMeds,
|
||||||
isActive = false}
|
isActive = false}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- TODO Check if FirstAidOverhaul can be made compatible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ local StaticData = require("TOC/StaticData")
|
|||||||
----------------
|
----------------
|
||||||
|
|
||||||
--- An instance will be abbreviated with dcInst
|
--- An instance will be abbreviated with dcInst
|
||||||
|
-- https://github.com/ZioPao/The-Only-Cure/issues/187
|
||||||
|
|
||||||
--- Handle all TOC mod data related stuff
|
--- Handle all TOC mod data related stuff
|
||||||
---@class DataController
|
---@class DataController
|
||||||
@@ -103,6 +103,10 @@ end
|
|||||||
---In case of desync between the table on ModData and the table here
|
---In case of desync between the table on ModData and the table here
|
||||||
---@param tocData tocModDataType
|
---@param tocData tocModDataType
|
||||||
function DataController:applyOnlineData(tocData)
|
function DataController:applyOnlineData(tocData)
|
||||||
|
if not tocData or not tocData.limbs then
|
||||||
|
TOC_DEBUG.print("Received invalid tocData")
|
||||||
|
return
|
||||||
|
end
|
||||||
local key = CommandsData.GetKey(self.username)
|
local key = CommandsData.GetKey(self.username)
|
||||||
ModData.add(key, tocData)
|
ModData.add(key, tocData)
|
||||||
self.tocData = ModData.get(key)
|
self.tocData = ModData.get(key)
|
||||||
@@ -229,12 +233,8 @@ end
|
|||||||
---@param limbName string
|
---@param limbName string
|
||||||
---@return boolean
|
---@return boolean
|
||||||
function DataController:getIsCut(limbName)
|
function DataController:getIsCut(limbName)
|
||||||
if not self.isDataReady then return false end
|
if not self.isDataReady or not self.tocData or not self.tocData.limbs then return false end
|
||||||
if self.tocData.limbs[limbName] then
|
return self.tocData.limbs[limbName] and self.tocData.limbs[limbName].isCut or false
|
||||||
return self.tocData.limbs[limbName].isCut
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---Get isVisible
|
---Get isVisible
|
||||||
@@ -403,9 +403,6 @@ function DataController.ReceiveData(key, data)
|
|||||||
handler:setup(key)
|
handler:setup(key)
|
||||||
elseif data and data.limbs then
|
elseif data and data.limbs then
|
||||||
-- Let's validate that the data structure is actually valid to prevent issues
|
-- Let's validate that the data structure is actually valid to prevent issues
|
||||||
if data.isUpdateFromServer then
|
|
||||||
TOC_DEBUG.print("Update from the server")
|
|
||||||
end
|
|
||||||
handler:applyOnlineData(data)
|
handler:applyOnlineData(data)
|
||||||
elseif username == getPlayer():getUsername() then
|
elseif username == getPlayer():getUsername() then
|
||||||
TOC_DEBUG.print("Trying to load local data or no data is available")
|
TOC_DEBUG.print("Trying to load local data or no data is available")
|
||||||
@@ -5,14 +5,50 @@ local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
|||||||
local CommonMethods = require("TOC/CommonMethods")
|
local CommonMethods = require("TOC/CommonMethods")
|
||||||
local StaticData = require("TOC/StaticData")
|
local StaticData = require("TOC/StaticData")
|
||||||
|
|
||||||
|
local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
||||||
-----------------
|
-----------------
|
||||||
|
---@class LimitActionsController
|
||||||
|
local LimitActionsController = {}
|
||||||
|
|
||||||
|
|
||||||
--* TIMED ACTIONS *--
|
--* DISABLE WEARING CERTAIN ITEMS WHEN NO LIMB
|
||||||
-- We want to be able to modify how long actions are gonna take,
|
|
||||||
-- depending on amputation status and kind of action. Also, when the
|
function LimitActionsController.CheckLimbFeasibility(limbName)
|
||||||
-- player has not completely cicatrized their own wounds, and try to do any action with
|
local dcInst = DataController.GetInstance()
|
||||||
-- a prosthesis on, that can trigger random bleeds.
|
local isFeasible = not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(limbName)
|
||||||
|
--TOC_DEBUG.print("isFeasible="..tostring(isFeasible))
|
||||||
|
return isFeasible
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param obj any
|
||||||
|
---@param wrappedFunc function
|
||||||
|
---@param item InventoryItem
|
||||||
|
---@return boolean
|
||||||
|
function LimitActionsController.WrapClothingAction(obj, wrappedFunc, item)
|
||||||
|
local isEquippable = wrappedFunc(obj)
|
||||||
|
if not isEquippable then return isEquippable end
|
||||||
|
|
||||||
|
local itemBodyLoc = item:getBodyLocation()
|
||||||
|
|
||||||
|
local limbToCheck = StaticData.AFFECTED_BODYLOCS_TO_LIMBS_IND_STR[itemBodyLoc]
|
||||||
|
if LimitActionsController.CheckLimbFeasibility(limbToCheck) then return isEquippable else return false end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------
|
||||||
|
--* TIMED ACTIONS
|
||||||
|
--* We want to be able to modify how long actions are gonna take,
|
||||||
|
--* depending on amputation status and kind of action. Also, when the
|
||||||
|
--* player has not completely cicatrized their own wounds, and try to do any action with
|
||||||
|
--* a prosthesis on, that can trigger random bleeds.
|
||||||
|
|
||||||
local function CheckHandFeasibility(limbName)
|
local function CheckHandFeasibility(limbName)
|
||||||
TOC_DEBUG.print("Checking hand feasibility: " .. limbName)
|
TOC_DEBUG.print("Checking hand feasibility: " .. limbName)
|
||||||
@@ -24,18 +60,18 @@ local function CheckHandFeasibility(limbName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--* Time to perform actions overrides *--
|
--* Time to perform actions overrides
|
||||||
local og_ISBaseTimedAction_adjustMaxTime = ISBaseTimedAction.adjustMaxTime
|
local og_ISBaseTimedAction_adjustMaxTime = ISBaseTimedAction.adjustMaxTime
|
||||||
--- Adjust time
|
--- Adjust time
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ISBaseTimedAction:adjustMaxTime(maxTime)
|
function ISBaseTimedAction:adjustMaxTime(maxTime)
|
||||||
local time = og_ISBaseTimedAction_adjustMaxTime(self, maxTime)
|
local time = og_ISBaseTimedAction_adjustMaxTime(self, maxTime)
|
||||||
|
--TOC_DEBUG.print("Running override for adjustMaxTime")
|
||||||
-- Exceptions handling, if we find that parameter then we just use the original time
|
-- Exceptions handling, if we find that parameter then we just use the original time
|
||||||
local actionsQueue = ISTimedActionQueue.getTimedActionQueue(getPlayer())
|
local actionsQueue = ISTimedActionQueue.getTimedActionQueue(getPlayer())
|
||||||
|
|
||||||
if actionsQueue and actionsQueue.current and actionsQueue.skipTOC then
|
if actionsQueue and actionsQueue.current and actionsQueue.current.skipTOC then
|
||||||
--TOC_DEBUG.print("Should skip TOC stuff")
|
TOC_DEBUG.print("Should skip TOC stuff")
|
||||||
return time
|
return time
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -78,37 +114,58 @@ function ISBaseTimedAction:adjustMaxTime(maxTime)
|
|||||||
return time
|
return time
|
||||||
end
|
end
|
||||||
|
|
||||||
--* Random bleeding during cicatrization + Perks leveling override *--
|
--* Random bleeding during cicatrization + Perks leveling override
|
||||||
local og_ISBaseTimedAction_perform = ISBaseTimedAction.perform
|
local og_ISBaseTimedAction_perform = ISBaseTimedAction.perform
|
||||||
--- After each action, level up perks
|
--- After each action, level up perks
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ISBaseTimedAction:perform()
|
function ISBaseTimedAction:perform()
|
||||||
og_ISBaseTimedAction_perform(self)
|
og_ISBaseTimedAction_perform(self)
|
||||||
|
|
||||||
TOC_DEBUG.print("Running ISBaseTimedAction.perform override")
|
|
||||||
TOC_DEBUG.print("max time: " .. tostring(self.maxTime))
|
--TOC_DEBUG.print("Running ISBaseTimedAction.perform override")
|
||||||
|
--TOC_DEBUG.print("max time: " .. tostring(self.maxTime))
|
||||||
|
|
||||||
local dcInst = DataController.GetInstance()
|
local dcInst = DataController.GetInstance()
|
||||||
if not dcInst:getIsAnyLimbCut() then return end
|
if not dcInst:getIsAnyLimbCut() or self.noExp then return end
|
||||||
|
|
||||||
|
|
||||||
|
--* LEVELING
|
||||||
|
-- First check level of perks. if already at max, skip
|
||||||
local amputatedLimbs = CachedDataHandler.GetAmputatedLimbs(LocalPlayerController.username)
|
local amputatedLimbs = CachedDataHandler.GetAmputatedLimbs(LocalPlayerController.username)
|
||||||
local xp = self.maxTime / 100
|
local xp = self.maxTime / 100
|
||||||
|
-- TODO Exp should be added while doing the action, not after it's done
|
||||||
|
|
||||||
|
-- Prevent xp from being negative and decreasing perks
|
||||||
|
if xp < 0 then xp = 0 end
|
||||||
for k, _ in pairs(amputatedLimbs) do
|
for k, _ in pairs(amputatedLimbs) do
|
||||||
local limbName = k
|
local limbName = k
|
||||||
|
|
||||||
-- We're checking for only "visible" amputations to prevent from having bleeds everywhere
|
-- We're checking for only "visible" amputations to prevent from having bleeds everywhere
|
||||||
if dcInst:getIsCut(limbName) and dcInst:getIsVisible(limbName) then
|
if dcInst:getIsCut(limbName) and dcInst:getIsVisible(limbName) then
|
||||||
local side = CommonMethods.GetSide(limbName)
|
local side = CommonMethods.GetSide(limbName)
|
||||||
LocalPlayerController.playerObj:getXp():AddXP(Perks["Side_" .. side], xp)
|
|
||||||
if not dcInst:getIsCicatrized(limbName) and dcInst:getIsProstEquipped(limbName) then
|
local ampPerk = Perks["Side_" .. side]
|
||||||
TOC_DEBUG.print("Trying for bleed, player met the criteria")
|
local ampPerkLevel = LocalPlayerController.playerObj:getPerkLevel(ampPerk)
|
||||||
LocalPlayerController.TryRandomBleed(self.character, limbName)
|
|
||||||
|
if ampPerkLevel < 10 then
|
||||||
|
--TOC_DEBUG.print("Levelling")
|
||||||
|
LocalPlayerController.playerObj:getXp():AddXP(ampPerk, xp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Level up prosthesis perk
|
-- Level up prosthesis perk
|
||||||
if dcInst:getIsProstEquipped(limbName) then
|
if dcInst:getIsProstEquipped(limbName) then
|
||||||
LocalPlayerController.playerObj:getXp():AddXP(Perks["ProstFamiliarity"], xp)
|
local prostPerk = Perks["ProstFamiliarity"]
|
||||||
|
local prostPerkLevel = LocalPlayerController.playerObj:getPerkLevel(prostPerk)
|
||||||
|
if prostPerkLevel < 10 then
|
||||||
|
LocalPlayerController.playerObj:getXp():AddXP(prostPerk, xp)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Bleeding when not cicatrized
|
||||||
|
if not dcInst:getIsCicatrized(limbName) and dcInst:getIsProstEquipped(limbName) then
|
||||||
|
--TOC_DEBUG.print("Trying for bleed, player met the criteria")
|
||||||
|
LocalPlayerController.TryRandomBleed(self.character, limbName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -124,7 +181,7 @@ end
|
|||||||
--* Equipping items overrides *--
|
--* Equipping items overrides *--
|
||||||
local og_ISEquipWeaponAction_isValid = ISEquipWeaponAction.isValid
|
local og_ISEquipWeaponAction_isValid = ISEquipWeaponAction.isValid
|
||||||
---Add a condition to check the feasibility of having 2 handed weapons or if both arms are cut off
|
---Add a condition to check the feasibility of having 2 handed weapons or if both arms are cut off
|
||||||
---@return boolean
|
---@return boolean?
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ISEquipWeaponAction:isValid()
|
function ISEquipWeaponAction:isValid()
|
||||||
local isValid = og_ISEquipWeaponAction_isValid(self)
|
local isValid = og_ISEquipWeaponAction_isValid(self)
|
||||||
@@ -328,42 +385,30 @@ function ISWorldObjectContextMenu.createMenu(player, worldobjects, x, y, test)
|
|||||||
return ogContext
|
return ogContext
|
||||||
end
|
end
|
||||||
|
|
||||||
--* DISABLE WEARING CERTAIN ITEMS WHEN NO LIMB
|
|
||||||
|
|
||||||
local function CheckLimbFeasibility(limbName)
|
|
||||||
local dcInst = DataController.GetInstance()
|
|
||||||
local isFeasible = not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(limbName)
|
|
||||||
--TOC_DEBUG.print("isFeasible="..tostring(isFeasible))
|
|
||||||
return isFeasible
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---@param obj any
|
|
||||||
---@param wrappedFunc function
|
|
||||||
---@param item InventoryItem
|
|
||||||
---@return boolean
|
|
||||||
local function WrapClothingAction(obj, wrappedFunc, item)
|
|
||||||
local isEquippable = wrappedFunc(obj)
|
|
||||||
if not isEquippable then return isEquippable end
|
|
||||||
|
|
||||||
local itemBodyLoc = item:getBodyLocation()
|
|
||||||
|
|
||||||
local limbToCheck = StaticData.AFFECTED_BODYLOCS_TO_LIMBS_IND_STR[itemBodyLoc]
|
|
||||||
if CheckLimbFeasibility(limbToCheck) then return isEquippable else return false end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
local og_ISWearClothing_isValid = ISWearClothing.isValid
|
local og_ISWearClothing_isValid = ISWearClothing.isValid
|
||||||
function ISWearClothing:isValid()
|
function ISWearClothing:isValid()
|
||||||
return WrapClothingAction(self, og_ISWearClothing_isValid, self.item)
|
return LimitActionsController.WrapClothingAction(self, og_ISWearClothing_isValid, self.item)
|
||||||
end
|
end
|
||||||
|
|
||||||
local og_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 WrapClothingAction(self, og_ISClothingExtraAction_isValid, InventoryItemFactory.CreateItem(self.extra))
|
return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, InventoryItemFactory.CreateItem(self.extra))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--* Book exception for exp
|
||||||
|
|
||||||
|
local og_ISReadABook_perform = ISReadABook.perform
|
||||||
|
function ISReadABook:perform()
|
||||||
|
self.noExp = true
|
||||||
|
og_ISReadABook_perform(self)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return LimitActionsController
|
||||||
@@ -2,6 +2,8 @@ local CommonMethods = require("TOC/CommonMethods")
|
|||||||
local StaticData = require("TOC/StaticData")
|
local StaticData = require("TOC/StaticData")
|
||||||
local DataController = require("TOC/Controllers/DataController")
|
local DataController = require("TOC/Controllers/DataController")
|
||||||
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
||||||
|
|
||||||
|
local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
---@class ProsthesisHandler
|
---@class ProsthesisHandler
|
||||||
@@ -88,14 +90,7 @@ function ProsthesisHandler.SearchAndSetupProsthesis(item, isEquipping)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------
|
function ProsthesisHandler.Validate(item, isEquippable)
|
||||||
--* Overrides *--
|
|
||||||
|
|
||||||
|
|
||||||
---@param item InventoryItem
|
|
||||||
---@param isEquippable boolean
|
|
||||||
---@return unknown
|
|
||||||
local function HandleProsthesisValidation(item, isEquippable)
|
|
||||||
local isProst = ProsthesisHandler.CheckIfProst(item)
|
local isProst = ProsthesisHandler.CheckIfProst(item)
|
||||||
if not isProst then return isEquippable end
|
if not isProst then return isEquippable end
|
||||||
|
|
||||||
@@ -110,11 +105,16 @@ local function HandleProsthesisValidation(item, isEquippable)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
--* Overrides *--
|
||||||
|
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
local og_ISWearClothing_isValid = ISWearClothing.isValid
|
local og_ISWearClothing_isValid = ISWearClothing.isValid
|
||||||
function ISWearClothing:isValid()
|
function ISWearClothing:isValid()
|
||||||
local isEquippable = og_ISWearClothing_isValid(self)
|
local isEquippable = og_ISWearClothing_isValid(self)
|
||||||
return HandleProsthesisValidation(self.item, isEquippable)
|
return ProsthesisHandler.Validate(self.item, isEquippable)
|
||||||
end
|
end
|
||||||
|
|
||||||
local og_ISWearClothing_perform = ISWearClothing.perform
|
local og_ISWearClothing_perform = ISWearClothing.perform
|
||||||
@@ -123,17 +123,22 @@ function ISWearClothing:perform()
|
|||||||
og_ISWearClothing_perform(self)
|
og_ISWearClothing_perform(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
local og_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()
|
||||||
local isEquippable = og_ISClothingExtraAction_isValid(self)
|
local isEquippable = og_ISClothingExtraAction_isValid(self)
|
||||||
-- self.extra is a string, not the item
|
-- self.extra is a string, not the item
|
||||||
local testItem = InventoryItemFactory.CreateItem(self.extra)
|
local testItem = InventoryItemFactory.CreateItem(self.extra)
|
||||||
return HandleProsthesisValidation(testItem, isEquippable)
|
return ProsthesisHandler.Validate(testItem, isEquippable)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local og_ISClothingExtraAction_perform = OverridenMethodsArchive.Save("ISClothingExtraAction_perform", ISClothingExtraAction.perform)
|
||||||
local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform
|
|
||||||
function ISClothingExtraAction:perform()
|
function ISClothingExtraAction:perform()
|
||||||
local extraItem = InventoryItemFactory.CreateItem(self.extra)
|
local extraItem = InventoryItemFactory.CreateItem(self.extra)
|
||||||
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
|
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
|
||||||
@@ -172,7 +177,6 @@ function ISUnequipAction:perform()
|
|||||||
-- This could break if amputated limbs aren't cached for some reason
|
-- This could break if amputated limbs aren't cached for some reason
|
||||||
triggerEvent("OnProsthesisUnequipped", hal)
|
triggerEvent("OnProsthesisUnequipped", hal)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -6,7 +6,7 @@ require("TOC/Events")
|
|||||||
|
|
||||||
---@class Main
|
---@class Main
|
||||||
local Main = {
|
local Main = {
|
||||||
_version = "2.1.5"
|
_version = "2.1.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Main.Start()
|
function Main.Start()
|
||||||
@@ -160,7 +160,6 @@ TestFramework.registerTestModule("Various", "Player", function()
|
|||||||
return Tests
|
return Tests
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
TestFramework.registerTestModule("Various", "Visuals", function()
|
TestFramework.registerTestModule("Various", "Visuals", function()
|
||||||
local Tests = {}
|
local Tests = {}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ function CleanWoundAction:new(doctor, otherPlayer, bandage, bodyPart)
|
|||||||
if doctor:isTimedActionInstant() then
|
if doctor:isTimedActionInstant() then
|
||||||
o.maxTime = 1
|
o.maxTime = 1
|
||||||
end
|
end
|
||||||
if doctor:getAccessLevel() ~= "None" then
|
if doctor:getAccessLevel() ~= "None" then -- TODO Fix for B42
|
||||||
o.doctorLevel = 10
|
o.doctorLevel = 10
|
||||||
end
|
end
|
||||||
return o
|
return o
|
||||||
139
common/media/lua/client/TOC/TimedActions/IgnoredActions.lua
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
-- TODO This section must be overhauled
|
||||||
|
|
||||||
|
local DataController = require("TOC/Controllers/DataController")
|
||||||
|
local StaticData = require("TOC/StaticData")
|
||||||
|
|
||||||
|
---@diagnostic disable: duplicate-set-field
|
||||||
|
-- Bunch of actions shouldn't be modified by the adjusted time
|
||||||
|
|
||||||
|
-----------------------------------------------
|
||||||
|
---* Some actions have specific maxTime calculations and we must account for that
|
||||||
|
---ISAttachItemHotbar
|
||||||
|
---ISDetachItemHotbar
|
||||||
|
---ISEquipWeaponAction
|
||||||
|
---ISUnequipAction
|
||||||
|
|
||||||
|
--- We're forced to re-run this crap to fix it
|
||||||
|
---@param action ISBaseTimedAction
|
||||||
|
local function OverrideAction(action, maxTime)
|
||||||
|
-- TODO Add forced debuff instead of just relying on the vanilla values?
|
||||||
|
action.skipTOC = true
|
||||||
|
action.maxTime = maxTime
|
||||||
|
action.animSpeed = 1.0
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISAttachItemHotbar_new = ISAttachItemHotbar.new
|
||||||
|
function ISAttachItemHotbar:new(character, item, slot, slotIndex, slotDef)
|
||||||
|
local action = og_ISAttachItemHotbar_new(self, character, item, slot, slotIndex, slotDef)
|
||||||
|
OverrideAction(action, 30) -- Default time for this action
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISDetachItemHotbar_new = ISDetachItemHotbar.new
|
||||||
|
function ISDetachItemHotbar:new(character, item)
|
||||||
|
local action = og_ISDetachItemHotbar_new(self, character, item)
|
||||||
|
OverrideAction(action, 25) -- Default time for this action
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local og_ISEquipWeaponAction_new = ISEquipWeaponAction.new
|
||||||
|
function ISEquipWeaponAction:new(character, item, time, primary, twoHands)
|
||||||
|
|
||||||
|
local action = og_ISEquipWeaponAction_new(self, character, item, time, primary, twoHands)
|
||||||
|
TOC_DEBUG.print("Override ISEquipWeaponAction New")
|
||||||
|
|
||||||
|
|
||||||
|
-- check if right arm is cut off or not. if it is, penality shall apply
|
||||||
|
-- if we got here, the action is valid, so we know that we have a prosthesis.
|
||||||
|
|
||||||
|
local dcInst = DataController.GetInstance()
|
||||||
|
|
||||||
|
-- Brutal Handwork should be considered. Use the twohands thing
|
||||||
|
if not (dcInst:getIsAnyLimbCut() and twoHands) then
|
||||||
|
OverrideAction(action, time)
|
||||||
|
end
|
||||||
|
|
||||||
|
return action
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISUnequipAction_new = ISUnequipAction.new
|
||||||
|
function ISUnequipAction:new(character, item, time)
|
||||||
|
local action = og_ISUnequipAction_new(self, character, item, time)
|
||||||
|
---@cast item InventoryItem
|
||||||
|
|
||||||
|
-- TODO Consider other cases where unequipping something should skip TOC.
|
||||||
|
if instanceof(item, 'HandWeapon') then
|
||||||
|
OverrideAction(action, time)
|
||||||
|
end
|
||||||
|
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
------------------------------------------------------
|
||||||
|
--- Normal cases
|
||||||
|
|
||||||
|
|
||||||
|
local og_ISEatFoodAction_new = ISEatFoodAction.new
|
||||||
|
function ISEatFoodAction:new(character, item, percentage)
|
||||||
|
local action = og_ISEatFoodAction_new(self, character, item, percentage)
|
||||||
|
--TOC_DEBUG.print("Override ISEatFoodAction")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISReadABook_new = ISReadABook.new
|
||||||
|
function ISReadABook:new(character, item, time)
|
||||||
|
local action = og_ISReadABook_new(self, character, item, time)
|
||||||
|
--TOC_DEBUG.print("Override ISReadABook")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISTakePillAction_new = ISTakePillAction.new
|
||||||
|
function ISTakePillAction:new(character, item, time)
|
||||||
|
local action = og_ISTakePillAction_new(self, character, item, time)
|
||||||
|
--TOC_DEBUG.print("Override ISTakePillAction")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISTakeWaterAction_new = ISTakeWaterAction.new
|
||||||
|
function ISTakeWaterAction:new(character, item, waterUnit, waterObject, time, oldItem)
|
||||||
|
local action = og_ISTakeWaterAction_new(self, character, item, waterUnit, waterObject, time, oldItem)
|
||||||
|
--TOC_DEBUG.print("Override ISTakeWaterAction")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
local og_ISDrinkFromBottle_new = ISDrinkFromBottle.new
|
||||||
|
function ISDrinkFromBottle:new(character, item, uses)
|
||||||
|
local action = og_ISDrinkFromBottle_new(self, character, item, uses)
|
||||||
|
--TOC_DEBUG.print("Override ISDrinkFromBottle")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if StaticData.COMPAT_42 == false then
|
||||||
|
-- TODO confirm that this doesn't exist anymore in B42
|
||||||
|
-- B42 nenen
|
||||||
|
local og_ISFinalizeDealAction_new = ISFinalizeDealAction.new
|
||||||
|
function ISFinalizeDealAction:new(player, otherPlayer, itemsToGive, itemsToReceive, time)
|
||||||
|
local action = og_ISFinalizeDealAction_new(self, player, otherPlayer, itemsToGive, itemsToReceive, time)
|
||||||
|
--TOC_DEBUG.print("Override ISFinalizeDealAction")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local og_ISCampingInfoAction_new = ISCampingInfoAction.new
|
||||||
|
function ISCampingInfoAction:new(character, campfireObject, campfire)
|
||||||
|
local action = og_ISCampingInfoAction_new(self, character, campfireObject, campfire)
|
||||||
|
--TOC_DEBUG.print("Override ISCampingInfoAction")
|
||||||
|
action.skipTOC = true
|
||||||
|
return action
|
||||||
|
end
|
||||||
@@ -53,14 +53,14 @@ function ConfirmationPanel:createChildren()
|
|||||||
|
|
||||||
local yButton = self:getHeight() - yPadding - btnHeight
|
local yButton = self:getHeight() - yPadding - btnHeight
|
||||||
|
|
||||||
self.btnYes = ISButton:new(xPadding, yButton, btnWidth, btnHeight, "Yes", self, self.onClick)
|
self.btnYes = ISButton:new(xPadding, yButton, btnWidth, btnHeight, getText("IGUI_Yes"), self, self.onClick)
|
||||||
self.btnYes.internal = "YES"
|
self.btnYes.internal = "YES"
|
||||||
self.btnYes:initialise()
|
self.btnYes:initialise()
|
||||||
self.btnYes.borderColor = { r = 1, g = 0, b = 0, a = 1 }
|
self.btnYes.borderColor = { r = 1, g = 0, b = 0, a = 1 }
|
||||||
self.btnYes:setEnable(true)
|
self.btnYes:setEnable(true)
|
||||||
self:addChild(self.btnYes)
|
self:addChild(self.btnYes)
|
||||||
|
|
||||||
self.btnNo = ISButton:new(self:getWidth() - xPadding - btnWidth, yButton, btnWidth, btnHeight, "No", self,
|
self.btnNo = ISButton:new(self:getWidth() - xPadding - btnWidth, yButton, btnWidth, btnHeight, getText("IGUI_No"), self,
|
||||||
self.onClick)
|
self.onClick)
|
||||||
self.btnNo.internal = "NO"
|
self.btnNo.internal = "NO"
|
||||||
self.btnNo:initialise()
|
self.btnNo:initialise()
|
||||||
@@ -10,10 +10,22 @@ local WoundCleaningInteractionHandler = require("TOC/UI/Interactions/WoundCleani
|
|||||||
|
|
||||||
local isReady = false
|
local isReady = false
|
||||||
|
|
||||||
|
|
||||||
|
local xMod, yMod
|
||||||
|
|
||||||
|
if StaticData.COMPAT_42 then
|
||||||
|
-- B42 For some reason (I didn't investigate), when applying stuff to the health panel there is an un-accounted shift in B42.
|
||||||
|
xMod = 5
|
||||||
|
yMod = 13
|
||||||
|
else
|
||||||
|
xMod = 0
|
||||||
|
yMod = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function SetHealthPanelTOC()
|
function SetHealthPanelTOC()
|
||||||
|
|
||||||
-- depending on compatibility
|
-- depending on compatibility
|
||||||
|
|
||||||
isReady = true
|
isReady = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -101,14 +113,14 @@ function ISHealthPanel:tryDrawAmputation(highestAmputations, side, username)
|
|||||||
local sexPl = self.character:isFemale() and "Female" or "Male"
|
local sexPl = self.character:isFemale() and "Female" or "Male"
|
||||||
texture = StaticData.HEALTH_PANEL_TEXTURES[sexPl][limbName]
|
texture = StaticData.HEALTH_PANEL_TEXTURES[sexPl][limbName]
|
||||||
end
|
end
|
||||||
|
-- B42, for some reason the positioning of the texture changed. Realigned it manually with those fixed values
|
||||||
self:drawTexture(texture, self.healthPanel.x, self.healthPanel.y, 1, redColor, 0, 0)
|
self:drawTexture(texture, self.healthPanel.x - xMod, self.healthPanel.y - yMod, 1, redColor, 0, 0)
|
||||||
end
|
end
|
||||||
function ISHealthPanel:tryDrawProsthesis(highestAmputations, side, username)
|
function ISHealthPanel:tryDrawProsthesis(highestAmputations, side, username)
|
||||||
local dc = DataController.GetInstance(username) -- TODO CACHE PROSTHESIS!!! Don't use DC here
|
local dc = DataController.GetInstance(username) -- TODO CACHE PROSTHESIS!!! Don't use DC here
|
||||||
local limbName = highestAmputations[side]
|
local limbName = highestAmputations[side]
|
||||||
if limbName and dc:getIsProstEquipped(limbName) then
|
if limbName and dc:getIsProstEquipped(limbName) then
|
||||||
self:drawTexture(StaticData.HEALTH_PANEL_TEXTURES.ProstArm[side], self.healthPanel.x, self.healthPanel.y, 1, 1, 1, 1)
|
self:drawTexture(StaticData.HEALTH_PANEL_TEXTURES.ProstArm[side], self.healthPanel.x - xMod, self.healthPanel.y - yMod, 1, 1, 1, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ function BaseHandler:toPlayerInventory(item, previousAction)
|
|||||||
if item:getContainer() ~= self:getDoctor():getInventory() then
|
if item:getContainer() ~= self:getDoctor():getInventory() then
|
||||||
local action = ISInventoryTransferAction:new(self:getDoctor(), item, item:getContainer(), self:getDoctor():getInventory())
|
local action = ISInventoryTransferAction:new(self:getDoctor(), item, item:getContainer(), self:getDoctor():getInventory())
|
||||||
ISTimedActionQueue.addAfter(previousAction, action)
|
ISTimedActionQueue.addAfter(previousAction, action)
|
||||||
-- FIXME: ISHealthPanel.actions never gets cleared
|
-- FIX: ISHealthPanel.actions never gets cleared
|
||||||
self.panel.actions = self.panel.actions or {}
|
self.panel.actions = self.panel.actions or {}
|
||||||
self.panel.actions[action] = self.bodyPart
|
self.panel.actions[action] = self.bodyPart
|
||||||
return action
|
return action
|
||||||
@@ -68,7 +68,7 @@ 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("Brave") 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 isTempHighEnough = stoveObj:getCurrentTemperature() >= 250
|
||||||
local isLimbFree = not dcInst:getIsProstEquipped(limbName)
|
local isLimbFree = not dcInst:getIsProstEquipped(limbName)
|
||||||
|
|
||||||
171
common/media/lua/client/lua_timers.lua
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
-- Made by Vyshnia
|
||||||
|
-- Workshop ID: 2875394066
|
||||||
|
-- Mod ID: LuaTimers
|
||||||
|
|
||||||
|
local os_time = os.time
|
||||||
|
local table_insert = table.insert
|
||||||
|
local table_remove = table.remove
|
||||||
|
local assert = assert
|
||||||
|
local type = type
|
||||||
|
local pairs = pairs
|
||||||
|
|
||||||
|
timer = {
|
||||||
|
Timers = {},
|
||||||
|
SimpleTimers = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function timer:Simple(delay, func)
|
||||||
|
assert(type(delay) == "number", "Delay of timer should be a number type")
|
||||||
|
assert(type(func) == "function", "Func of timer should be a function type (lol)")
|
||||||
|
|
||||||
|
table_insert(self.SimpleTimers, {
|
||||||
|
EndTime = os_time() + delay,
|
||||||
|
Func = func
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:Create(name, delay, repetitions, func)
|
||||||
|
assert(type(name) == "string", "ID of timer should be a string type")
|
||||||
|
assert(type(delay) == "number", "Delay of timer should be a number type")
|
||||||
|
assert(type(repetitions) == "number", "Repetitions of timer should be a number type")
|
||||||
|
assert(type(func) == "function", "Func of timer should be a function type (lol)")
|
||||||
|
|
||||||
|
self.Timers[name] = {
|
||||||
|
Delay = delay,
|
||||||
|
StartRepetitions = repetitions,
|
||||||
|
Repetitions = repetitions,
|
||||||
|
Infinity = repetitions == 0,
|
||||||
|
LastFuncTime = os_time(),
|
||||||
|
Func = func,
|
||||||
|
Paused = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function timerUpdate()
|
||||||
|
local cur_time = os_time()
|
||||||
|
|
||||||
|
for k, v in pairs(timer.Timers) do
|
||||||
|
if not v.Paused then
|
||||||
|
if cur_time >= v.LastFuncTime + v.Delay then
|
||||||
|
v.Func()
|
||||||
|
|
||||||
|
v.LastFuncTime = cur_time
|
||||||
|
|
||||||
|
if not v.Infinity then
|
||||||
|
v.Repetitions = v.Repetitions - 1
|
||||||
|
|
||||||
|
if v.Repetitions <= 0 then
|
||||||
|
timer.Timers[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local simple_timers = timer.SimpleTimers
|
||||||
|
|
||||||
|
for i = #simple_timers, 1, -1 do
|
||||||
|
local t = simple_timers[i]
|
||||||
|
|
||||||
|
if t.EndTime <= cur_time then
|
||||||
|
t.Func()
|
||||||
|
|
||||||
|
table_remove(simple_timers, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Events.OnTickEvenPaused.Add(timerUpdate)
|
||||||
|
|
||||||
|
function timer:Remove(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return false end
|
||||||
|
|
||||||
|
self.Timers[name] = nil
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:Exists(name)
|
||||||
|
return self.Timers[name] and true or false
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:Start(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return false end
|
||||||
|
|
||||||
|
t.Repetitions = t.StartRepetitions
|
||||||
|
t.LastFuncTime = os_time()
|
||||||
|
t.Paused = false
|
||||||
|
t.PausedTime = nil
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:Pause(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return false end
|
||||||
|
|
||||||
|
if t.Paused then return false end
|
||||||
|
|
||||||
|
t.Paused = true
|
||||||
|
t.PausedTime = os_time()
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:UnPause(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return false end
|
||||||
|
|
||||||
|
if not t.Paused then return false end
|
||||||
|
|
||||||
|
t.Paused = false
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
timer.Resume = timer.UnPause
|
||||||
|
|
||||||
|
function timer:Toggle(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return false end
|
||||||
|
|
||||||
|
t.Paused = not t.Paused
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:TimeLeft(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return end
|
||||||
|
|
||||||
|
if t.Paused then
|
||||||
|
return (t.Repetitions - 1) * t.Delay + (t.LastFuncTime + t.Delay - t.PausedTime)
|
||||||
|
else
|
||||||
|
return (t.Repetitions - 1) * t.Delay + (t.LastFuncTime + t.Delay - os_time())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:NextTimeLeft(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
if not t then return end
|
||||||
|
|
||||||
|
if t.Paused then
|
||||||
|
return t.LastFuncTime + t.Delay - t.PausedTime
|
||||||
|
else
|
||||||
|
return t.LastFuncTime + t.Delay - os_time()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function timer:RepsLeft(name)
|
||||||
|
local t = self.Timers[name]
|
||||||
|
|
||||||
|
return t and t.Repetitions
|
||||||
|
end
|
||||||
@@ -24,8 +24,6 @@ function ServerDataHandler.AddTable(key, table)
|
|||||||
--TOC_DEBUG.printTable(table)
|
--TOC_DEBUG.printTable(table)
|
||||||
|
|
||||||
-- Set that the data has been modified and it's updated on the server
|
-- Set that the data has been modified and it's updated on the server
|
||||||
table.isUpdateFromServer = true -- FIX this is useless as of now
|
|
||||||
|
|
||||||
ModData.add(key, table) -- Add it to the server mod data
|
ModData.add(key, table) -- Add it to the server mod data
|
||||||
ServerDataHandler.modData[key] = table
|
ServerDataHandler.modData[key] = table
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ CommandsData.server = {
|
|||||||
Relay = {
|
Relay = {
|
||||||
RelayDamageDuringAmputation = "RelayDamageDuringAmputation", ---@alias relayDamageDuringAmputationParams {patientNum : number, limbName : string}
|
RelayDamageDuringAmputation = "RelayDamageDuringAmputation", ---@alias relayDamageDuringAmputationParams {patientNum : number, limbName : string}
|
||||||
RelayExecuteAmputationAction = "RelayExecuteAmputationAction", ---@alias relayExecuteAmputationActionParams {patientNum : number, limbName : string}
|
RelayExecuteAmputationAction = "RelayExecuteAmputationAction", ---@alias relayExecuteAmputationActionParams {patientNum : number, limbName : string}
|
||||||
|
|
||||||
--* ADMIN ONLY *--
|
--* ADMIN ONLY *--
|
||||||
RelayExecuteInitialization = "RelayExecuteInitialization", ---@alias relayExecuteInitializationParams {patientNum : number}
|
RelayExecuteInitialization = "RelayExecuteInitialization", ---@alias relayExecuteInitializationParams {patientNum : number}
|
||||||
RelayForcedAmputation = "RelayForcedAmputation" ---@alias relayForcedAmputationParams {patientNum : number, limbName : string}
|
RelayForcedAmputation = "RelayForcedAmputation" ---@alias relayForcedAmputationParams {patientNum : number, limbName : string}
|
||||||
@@ -7,7 +7,7 @@ function TOC_DEBUG.TogglePaneMod()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function TOC_DEBUG.ToggleHealthPanelDebug()
|
function TOC_DEBUG.ToggleHealthPanelDebug()
|
||||||
TOC_DEBUG.enableHealthPanelDebug = not TOC_DEBUG.enableHealthPanelDebug
|
TOC_DEBUG.enableHealthPanelDebug = not TOC_DEBUG.enableHealthPanelDebug
|
||||||
end
|
end
|
||||||
|
|
||||||
---Print debug
|
---Print debug
|
||||||
31
common/media/lua/shared/TOC/OverridenMethodsArchive.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
-- instead of relying on local to save og methods, we save them in a table here that we can use later.
|
||||||
|
|
||||||
|
---@class OverridenMethodsArchive
|
||||||
|
local OverridenMethodsArchive = {}
|
||||||
|
OverridenMethodsArchive.methods = {}
|
||||||
|
|
||||||
|
-- Save an original method, if it wasn't already saved and returns it to be used in common
|
||||||
|
function OverridenMethodsArchive.Save(methodName, method)
|
||||||
|
if not OverridenMethodsArchive.methods[methodName] then
|
||||||
|
OverridenMethodsArchive.methods[methodName] = method
|
||||||
|
TOC_DEBUG.print("Saved method " .. methodName)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return method
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get the original method
|
||||||
|
function OverridenMethodsArchive.Get(methodName)
|
||||||
|
--TOC_DEBUG.print("Getting og method " .. methodName)
|
||||||
|
|
||||||
|
--TOC_DEBUG.print("OverridenMethodsArchive.list[methodName] = " .. tostring(OverridenMethodsArchive.methods[methodName]))
|
||||||
|
--TOC_DEBUG.print(methodName)
|
||||||
|
--TOC_DEBUG.print(OverridenMethodsArchive.methods[methodName])
|
||||||
|
return OverridenMethodsArchive.methods[methodName]
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return OverridenMethodsArchive
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType }
|
---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType }
|
||||||
---@alias prosthesisData {isProstEquipped : boolean, prostFactor : number }
|
---@alias prosthesisData {isProstEquipped : boolean, prostFactor : number }
|
||||||
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R
|
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R
|
||||||
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean, isUpdateFromServer : boolean, isInitializing : boolean}
|
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean, isInitializing : boolean}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -21,6 +21,10 @@ local StaticData = {}
|
|||||||
---Mod name, used to setup Global Mod Data and various stuff
|
---Mod name, used to setup Global Mod Data and various stuff
|
||||||
StaticData.MOD_NAME = "TOC"
|
StaticData.MOD_NAME = "TOC"
|
||||||
|
|
||||||
|
-- Game version, used to correct some stuff instead of relying on versioned folders
|
||||||
|
|
||||||
|
StaticData.COMPAT_42 = luautils.stringStarts(getGameVersion(), "42")
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
--* Base
|
--* Base
|
||||||
|
|
||||||
@@ -276,8 +280,17 @@ StaticData.AMPUTATION_CLOTHING_ITEM_BASE = "TOC.Amputation_"
|
|||||||
------------------
|
------------------
|
||||||
--* Items check
|
--* Items check
|
||||||
|
|
||||||
local sawObj = InventoryItemFactory.CreateItem("Base.Saw")
|
local sawObj
|
||||||
local gardenSawObj = InventoryItemFactory.CreateItem("Base.GardenSaw")
|
local gardenSawObj
|
||||||
|
|
||||||
|
if StaticData.COMPAT_42 then
|
||||||
|
sawObj = instanceItem("Base.Saw")
|
||||||
|
gardenSawObj = instanceItem("Base.GardenSaw")
|
||||||
|
else
|
||||||
|
sawObj = InventoryItemFactory.CreateItem("Base.Saw")
|
||||||
|
gardenSawObj = InventoryItemFactory.CreateItem("Base.GardenSaw")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
StaticData.SAWS_NAMES_IND_STR = {
|
StaticData.SAWS_NAMES_IND_STR = {
|
||||||
saw = sawObj:getName(),
|
saw = sawObj:getName(),
|
||||||
@@ -19,8 +19,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function SetupTraits()
|
local function SetupTraits()
|
||||||
-- Perks.Left_Hand is defined in perks.txt
|
|
||||||
|
|
||||||
local traitsTable = {
|
local traitsTable = {
|
||||||
[1] = TraitFactory.addTrait(TRAITS.Amputee_Hand, GetTraitText(TRAITS.Amputee_Hand), -8, GetTraitDesc(TRAITS.Amputee_Hand), false, false),
|
[1] = TraitFactory.addTrait(TRAITS.Amputee_Hand, GetTraitText(TRAITS.Amputee_Hand), -8, GetTraitDesc(TRAITS.Amputee_Hand), false, false),
|
||||||
[2] = TraitFactory.addTrait(TRAITS.Amputee_ForeArm, GetTraitText(TRAITS.Amputee_ForeArm), -10, GetTraitDesc(TRAITS.Amputee_ForeArm), false, false),
|
[2] = TraitFactory.addTrait(TRAITS.Amputee_ForeArm, GetTraitText(TRAITS.Amputee_ForeArm), -10, GetTraitDesc(TRAITS.Amputee_ForeArm), false, false),
|
||||||
@@ -32,7 +30,7 @@ local function SetupTraits()
|
|||||||
---@type Trait
|
---@type Trait
|
||||||
local t = traitsTable[i]
|
local t = traitsTable[i]
|
||||||
---@diagnostic disable-next-line: undefined-field
|
---@diagnostic disable-next-line: undefined-field
|
||||||
t:addXPBoost(Perks.Left_Hand, 4)
|
t:addXPBoost(Perks.Side_L, 4)
|
||||||
t:addXPBoost(Perks.Fitness, -1)
|
t:addXPBoost(Perks.Fitness, -1)
|
||||||
t:addXPBoost(Perks.Strength, -1)
|
t:addXPBoost(Perks.Strength, -1)
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
IG_UI_DE = {
|
IG_UI_DE = {
|
||||||
|
IGUI_Yes = "Ja",
|
||||||
|
IGUI_No = "Nein",
|
||||||
|
|
||||||
IGUI_perks_Amputations = "Amputationen",
|
IGUI_perks_Amputations = "Amputationen",
|
||||||
IGUI_perks_Side_R = "Rechte Seite",
|
IGUI_perks_Side_R = "Rechte Seite",
|
||||||
IGUI_perks_Side_L = "Linke Seite",
|
IGUI_perks_Side_L = "Linke Seite",
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
IG_UI_EN = {
|
IG_UI_EN = {
|
||||||
|
IGUI_Yes = "Yes",
|
||||||
|
IGUI_No = "No",
|
||||||
|
|
||||||
IGUI_perks_Amputations = "Amputations",
|
IGUI_perks_Amputations = "Amputations",
|
||||||
IGUI_perks_Side_R = "Right Side",
|
IGUI_perks_Side_R = "Right Side",
|
||||||
|
IGUI_perks_Right Side_Description = "Familiarity with amputations on the right side of your body",
|
||||||
IGUI_perks_Side_L = "Left Side",
|
IGUI_perks_Side_L = "Left Side",
|
||||||
IGUI_perks_Prosthesis = "Prosthesis",
|
IGUI_perks_Left Side_Description = "Familiarity with amputations on the left side of your body",
|
||||||
IGUI_perks_ProstFamiliarity= "Familiarity",
|
IGUI_perks_Prosthesis = "Prosthesis Familiarity",
|
||||||
|
IGUI_perks_Prosthesis Familiarity_Description = "Familiarity with prosthetic limbs",
|
||||||
|
|
||||||
IGUI_ItemCat_Prosthesis = "Prosthesis",
|
IGUI_ItemCat_Prosthesis = "Prosthesis",
|
||||||
IGUI_ItemCat_Surgery = "Surgery",
|
IGUI_ItemCat_Surgery = "Surgery",
|
||||||
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",
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
IG_UI_IT = {
|
IG_UI_IT = {
|
||||||
|
IGUI_Yes = "Si",
|
||||||
|
IGUI_No = "No",
|
||||||
|
|
||||||
IGUI_perks_Amputations = "Amputazioni",
|
IGUI_perks_Amputations = "Amputazioni",
|
||||||
IGUI_perks_Side_R = "Parte destra",
|
IGUI_perks_Side_R = "Parte destra",
|
||||||
IGUI_perks_Side_L = "Parte sinistra",
|
IGUI_perks_Side_L = "Parte sinistra",
|
||||||