111 Commits
v2.1.4 ... dev

Author SHA1 Message Date
ZioPao
bd532dc013 fix: relayed amputations 2026-01-31 17:32:28 +01:00
ZioPao
1d21c0d51c fix: relay wear amputation 2026-01-31 17:21:10 +01:00
ZioPao
e129b325e4 fix: wearing amputation in MP 42.13 2026-01-27 23:01:56 +01:00
ZioPao
df9f559078 fix: working amputations in mp 2026-01-27 01:33:54 +01:00
ZioPao
1fb3899a5a chore: stuff to move around for 42.13 2026-01-15 22:37:13 +01:00
ZioPao
457f89b064 fix: error while amputating 2026-01-15 22:37:06 +01:00
ZioPao
27d79c5802 chore: removed old b41 tasks 2026-01-08 01:56:20 +01:00
ZioPao
92a0b9ef18 fix: encoding UA again 2026-01-08 01:53:02 +01:00
Vinellon
494b4b576f fix encoding for translate files 2026-01-08 01:43:35 +01:00
ZioPao
76fcb1ac97 Merge branch 'dev-42.13' of https://github.com/ZioPao/The-Only-Cure into dev-42.13-merge 2026-01-08 01:39:40 +01:00
ZioPao
fba1b2e643 fix: wip changes for traits and infection healing 2026-01-08 01:26:17 +01:00
ZioPao
2cf7df16b3 refactor: changes to StaticData and registries 2026-01-08 01:25:53 +01:00
ZioPao
898e8ec653 refactor: restored new bodylocs 2026-01-08 01:23:53 +01:00
guiriguy
943e3a8f3c Refactor prosthetic limb string constants
Updated string constants for prosthetic limbs and body locations.
2025-12-18 22:51:51 +01:00
guiriguy
442af10b7a Update Registries.lua 2025-12-18 22:51:27 +01:00
guiriguy
c9d6236b89 Refactor BodyLocations.lua for improved management
Refactored BodyLocations.lua to streamline body location management and improve functionality.
2025-12-18 22:51:06 +01:00
guiriguy
e884985fe3 Refactor player courage and temperature checks 2025-12-18 22:50:28 +01:00
guiriguy
38fe71bc72 Refactor ProsthesisHandler for B42 compatibility 2025-12-18 22:48:17 +01:00
guiriguy
b650b2a590 Refactor tourniquet check and update patient stats 2025-12-18 22:48:00 +01:00
guiriguy
da7621c0f0 Refactor LocalPlayerController to use TOC registries 2025-12-18 22:47:31 +01:00
guiriguy
acd2e9c547 Refactor TOC registries for traits and body locations 2025-12-18 22:46:57 +01:00
ZioPao
27d9b3a513 fix: bodyloc check for tourniquets 2025-12-16 01:02:51 +01:00
ZioPao
aa61a3390c fix: wrong dir for Translate 2025-12-16 00:56:06 +01:00
ZioPao
b84c2a593d fix: items bodylocs 2025-12-16 00:56:00 +01:00
ZioPao
cdf0473065 fix: Type to ItemType in items ZedScripts 2025-12-16 00:51:23 +01:00
ZioPao
40da330b41 fix: trait init in LocalPlayerController 2025-12-16 00:51:05 +01:00
ZioPao
20fa1bd05e refactor: removed compat with b41 entirely 2025-12-16 00:34:40 +01:00
ZioPao
3f888e7f22 fix: bodyloc for b42 mp 2025-12-14 10:39:28 +01:00
Vinellon
d84554ff07 fix encoding for translate files 2025-11-17 19:37:38 +03:00
Pao
ec87d128e4 Merge pull request #217 from ZioPao/dev
v2.2.2
2025-11-15 21:38:24 +01:00
ZioPao
be4588fc43 chore: bump to mod version - 2.2.2 2025-10-12 17:45:09 +02:00
ZioPao
4bafb3a15c fix: went back to previous look for amputations 2025-10-12 17:16:52 +02:00
ZioPao
fd056aea1e fix: amputation items not hiding anymore 2025-10-09 22:32:41 +02:00
ZioPao
100abab2aa fix: workshop.txt 2025-10-05 16:17:55 +02:00
ZioPao
789b0635e0 fix: workshop.txt for b42 2025-10-05 16:08:56 +02:00
ZioPao
d6d9ba7028 Bump to mod version 2025-10-05 16:03:21 +02:00
ZioPao
a182fb07e5 chore: updates to workshop files for b42 2025-10-04 18:55:48 +02:00
ZioPao
528a43247a add: better wound textures 2025-10-04 16:38:50 +02:00
ZioPao
b281ce7d12 add: gen_amp_textures 2025-10-04 16:38:25 +02:00
ZioPao
9db3a1c944 fix: better masks for amputations 2025-10-04 15:40:10 +02:00
ZioPao
a74e33134d fix: switched to multiple body locs to fix some old issues and prepare for better visuals overhaul 2025-10-04 02:32:48 +02:00
ZioPao
1caf4a4b49 fix: fix for cheat prevention with both hands feasibility to false 2025-09-30 01:01:41 +02:00
ZioPao
5f71cebdc0 fix: override for both hands interaction for b42 and cheat prevention 2025-09-30 00:58:37 +02:00
ZioPao
4714bd7b82 fix: recipes 2025-09-30 00:53:15 +02:00
ZioPao
4d20cc2559 fix: baseline recipes for b42 2025-09-29 02:03:00 +02:00
ZioPao
5ec0ec1a9b fix: 42.12 new bodyloc 2025-09-29 01:31:18 +02:00
ZioPao
89a28e846a refactor: cleaning 2025-09-29 01:04:08 +02:00
ZioPao
a511ac777a refactor: reorganized settings for cd 2025-07-14 02:46:43 +02:00
ZioPao
04c7172d82 refactor: removed old code 2025-07-14 01:15:39 +02:00
ZioPao
522c49b40c chore: cleaning and setting up stuff 2025-04-17 18:23:18 +02:00
Pao
b5266cd7cd Merge pull request #200 from ZioPao/dev
v2.1.7
2025-04-17 16:18:41 +02:00
ZioPao
8c8aa8351b mod version 2025-04-17 15:53:49 +02:00
ZioPao
3eeb9d1000 fix: hotfix to IgnoredActions 2025-04-17 15:46:22 +02:00
ZioPao
c60a2c56ec fix: fixed (once and for all, hopefully) hotbar handling 2025-04-17 12:54:50 +02:00
ZioPao
69025c8262 fix: disabled ISDetachItemHotbar override, broken and unneccesary 2025-04-17 12:52:23 +02:00
ZioPao
80e9391db5 fix: fixed ignored actions that should ignore toc calculations 2025-04-17 12:42:35 +02:00
ZioPao
d7bdee1d26 fix: broken skipTOC check for timed actions 2025-04-17 12:18:27 +02:00
ZioPao
8234abd5e2 refactor: changed check for version 2025-04-17 11:26:58 +02:00
ZioPao
9011579f08 chore: changes to structure 2025-04-17 11:01:03 +02:00
ZioPao
be6466976c add: added known incompatibilies to mod.info for B42 2025-04-17 11:00:46 +02:00
ZioPao
9ab584d977 chore: fix to some stupid config issues 2025-04-17 03:38:02 +02:00
ZioPao
b0d3520173 fix: #174 2025-04-15 03:07:20 +02:00
ZioPao
bbd36f7dc2 chore: changes to vscode config and updated gitignore for symink 2025-04-15 03:02:38 +02:00
ZioPao
3fc37f56d6 refactor: cleaning dev stuff 2025-04-13 03:21:34 +02:00
ZioPao
d5fd735de8 refactor: cleaning code 2025-04-13 03:21:06 +02:00
ZioPao
253c5717a9 refactor: removed unused code 2025-04-13 03:16:06 +02:00
ZioPao
d850691053 Chore: changes to vscode config 2025-04-13 03:08:49 +02:00
ZioPao
f728520f9e Chore: fixed config for umbrella 2025-04-12 15:16:02 +02:00
ZioPao
67f51ca845 Change: unified perks into one single parent, added translations for perk tooltips (b42) 2025-04-03 00:37:18 +02:00
ZioPao
e07af54d27 Fix: moved UI files for b42 to correct location 2025-04-03 00:16:21 +02:00
ZioPao
6e47f945c5 Add: #180 2025-04-03 00:00:53 +02:00
ZioPao
644376cea0 Fix: #186 2025-04-02 23:57:17 +02:00
ZioPao
6a3fa76e00 Fix: added more checks in DataController to prevent issues, thanks PhysiksTV 2025-04-02 18:12:45 +02:00
ZioPao
6e674959ab UI: Fixed color for Health panel female covers (b41 only) 2025-04-02 02:04:44 +02:00
ZioPao
d52f3f6bf2 UI: Moved specific b42 health panel files to 42 folder, restored old files for b41 2025-04-02 01:59:58 +02:00
ZioPao
5acab111f2 git: Modified gitignore 2025-04-02 01:57:35 +02:00
ZioPao
61f505fa8e Dev: modified tasks and settings (vscode) 2025-04-02 01:36:37 +02:00
ZioPao
6abd89cea7 UI: Fixed male Health Panel 2025-04-02 01:32:30 +02:00
ZioPao
768a0dbdab UI: Better test pattern for Health Panel debugging 2025-04-02 01:16:51 +02:00
ZioPao
d96c26d099 UI: fixed health panel for Female chars 2025-04-02 00:42:58 +02:00
ZioPao
f93c0503f8 Fix unequip prosthesis for b42 2025-03-31 22:46:12 +02:00
ZioPao
671bf133e3 Fixes for overriden methods, compat with b41 2025-03-31 22:22:17 +02:00
ZioPao
1e754895a0 Re-added lua timers 2025-03-31 20:56:23 +02:00
ZioPao
9a11047e3c Fix to Traits 2025-03-31 19:57:38 +02:00
ZioPao
db6f315f89 Readded translations, finalized folder struct 2025-03-31 19:57:27 +02:00
ZioPao
729e3b62e7 Reverted common for B41 2025-03-31 06:45:44 +02:00
ZioPao
7c8cfb0fcc Added mod.info for b41 2025-03-31 06:43:19 +02:00
ZioPao
bb19da2b4b Removed icon and poster from versioned folder, added dynamically 2025-03-31 02:47:26 +02:00
ZioPao
471608f9ba minVersion=42.6 2025-03-31 02:40:13 +02:00
ZioPao
71b854efe2 Moved everything to common. 2025-03-31 02:36:15 +02:00
ZioPao
e919c8c01b Bump to mod version and changed folder for specific game version 2025-03-31 02:17:40 +02:00
ZioPao
b6b61b872f Bump to mod version 2025-03-31 02:15:49 +02:00
ZioPao
58d5c8e13d Moved TR translation to correct folder 2025-03-31 02:00:19 +02:00
ZioPao
cc5e67aceb Moved Translations to common folder, merged pgmbru changes manually 2025-03-31 01:59:27 +02:00
ZioPao
f77a357dab Updated to current unstable version and fixed Healthpanel again 2025-03-31 01:46:49 +02:00
Pao
499db8cd78 Merge pull request #193 from ZioPao/dev-b42
Dev b42
2025-03-31 00:40:24 +02:00
Pao
ffce5fac2e Merge pull request #182 from VVentos0/main
Turkish Translation Added
2025-02-26 01:51:43 +01:00
VVentos0
81842f7020 Turkish Translate Added
I made Turkish Translate for your mod. This Translate only for B41 because the encode is ANSI (Windows-1254)

If you going to update your mod to B42 .txt files should be UTF-08 I'll post B42 files too. Please don't forget to add B42 Translation after B42 Update <3
2025-01-11 10:17:03 +03:00
ZioPao
d846b853ff Fix for ISHealthPanel 2025-01-04 21:21:05 +01:00
ZioPao
0f4117cd34 moved common files 2025-01-04 21:07:34 +01:00
ZioPao
736d527a13 Fix instanceItem, oops 2025-01-04 21:00:39 +01:00
ZioPao
1ded7f976c Replaced InventoryItemFactory with instanceItem 2025-01-04 20:46:11 +01:00
ZioPao
6635cc19b2 moved folders 2025-01-04 20:44:12 +01:00
ZioPao
5d8e60a2e4 Updated tasks for b42 dev 2025-01-04 20:25:22 +01:00
Pao
5515b6bd4f Merge pull request #157 from ZioPao/dev
v2.1.5
2024-10-22 01:12:27 +02:00
ZioPao
ba267cb900 I should stop trying to fix stuff while I'm falling asleep 2024-10-22 01:09:41 +02:00
Pao
90ca2edbce Merge pull request #155 from ZioPao/dev
v2.1.5
2024-10-22 00:11:35 +02:00
ZioPao
00d5d83ea2 Bump to mod version 2024-10-22 00:10:49 +02:00
ZioPao
849c17051a Fixed broken checks for admin menu 2024-10-22 00:10:40 +02:00
Pao
0071d2ac3f Merge pull request #148 from ZioPao/dev
v2.1.4
2024-10-19 18:42:08 +02:00
Pao
371134faa7 Merge pull request #144 from ZioPao/dev
v2.1.3
2024-10-17 23:52:07 +02:00
377 changed files with 1730 additions and 2483 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
.vscode dev_stuff/gen_amp_textures/.venv
dev_stuff/gen_amp_textures/output

37
.vscode/settings.json vendored
View File

@@ -1,16 +1,27 @@
{ {
"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"
],
"Lua.diagnostics.globals": [
"FHSwapHandsAction",
"timer"
]
} }

116
.vscode/tasks.json vendored
View File

@@ -6,48 +6,82 @@
{ {
"label": "Create Workshop folder", "label": "Create Workshop folder",
"type": "shell", "type": "shell",
"options": {"statusbar": {"label": "$(combine) Assemble Mod"}}, "options": {"statusbar": {"label": "$(combine) Assemble Mod - B42"}},
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py 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 (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 common/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_Debug_NoSteam.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",
"type": "shell",
"command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
"options": {"statusbar": {"hide": true}},
},
{
"label": "Run Zomboid Debug No Steam (42) - 2nd Instance",
"type": "shell",
"presentation": {
"group": "groupZomboid"
},
"command": "\"${config:zomboid_folder_b42}\\ProjectZomboid64_Debug_NoSteam.bat\"",
"options": {"statusbar": {"label": "$(run) Zomboid client (42) - 2nd Instance"}},
"problemMatcher": [ "problemMatcher": [
"$eslint-stylish" "$eslint-stylish"
] ]
}, },
{
"label": "Run two instances of Zomboid Debug No Steam", // {
"options": {"statusbar": {"label": "$(run-all) Two Zomboid Clients"}}, // "label": "Run Zomboid Debug No Steam",
"presentation": { // "type": "shell",
"reveal": "always", // "presentation": {
"panel": "new" // "group": "groupZomboid"
}, // },
"dependsOn": [ // "command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug.bat\"",
"Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"], // "options": {"statusbar": {"label": "$(run) Zomboid client"}},
"problemMatcher": [] // "problemMatcher": [
}, // "$eslint-stylish"
// ]
// },
// {
// "label": "Run Zomboid Debug No Steam 2",
// "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": {
// "reveal": "always",
// "panel": "new"
// },
// "dependsOn": [
// "Run Zomboid Debug No Steam", "Run Zomboid Debug No Steam 2"],
// "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)"}},
@@ -57,23 +91,23 @@
"$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)"}},
"type": "shell", // "type": "shell",
"command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH", // "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH",
"problemMatcher": [ // "problemMatcher": [
"$eslint-stylish" // "$eslint-stylish"
] // ]
}, // },
{ // {
"label": "Run Zomboid Test Server 3", // "label": "Run Zomboid Test Server 3",
"options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH+iMedsFixed)"}}, // "options": {"statusbar": {"label": "$(run) Zomboid Server (TOC+FH+BH+iMedsFixed)"}},
"type": "shell", // "type": "shell",
"command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH_imeds", // "command":"\"${config:zomboid_server_folder}\\StartServer64_nosteam_custom.bat\" TOC_FH_BH_imeds",
"problemMatcher": [ // "problemMatcher": [
"$eslint-stylish" // "$eslint-stylish"
] // ]
} // }
] ]
} }

View File

@@ -7,9 +7,10 @@
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>3</m_Masks>
<m_Masks>4</m_Masks> <m_Masks>4</m_Masks>
<m_Masks>3</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->

View File

@@ -10,6 +10,8 @@
<m_Masks>5</m_Masks> <m_Masks>5</m_Masks>
<m_Masks>6</m_Masks> <m_Masks>6</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>Amputation\Amputation_Left_Hand_Male</m_MaleModel>
<m_FemaleModel>Amputation\Amputation_Left_Hand_Female</m_FemaleModel>
<m_GUID>2de93af2-b7a8-4c04-84d1-28d92cce8a0f</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>4</m_Masks>
<!-- <m_MasksFolder>none</m_MasksFolder> -->
<!-- HUMAN -->
<textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
<!-- HUMAN AFTER CICATRIZATION -->
<textureChoices>Body\MaleBody01</textureChoices>
<textureChoices>Body\MaleBody02</textureChoices>
<textureChoices>Body\MaleBody03</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05</textureChoices>
<textureChoices>Body\MaleBody01a</textureChoices>
<textureChoices>Body\MaleBody02a</textureChoices>
<textureChoices>Body\MaleBody03a</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05a</textureChoices>
</clothingItem>

View File

@@ -0,0 +1,37 @@
<clothingItem>
<m_MaleModel>Amputation\Amputation_Right_Hand_Male</m_MaleModel>
<m_FemaleModel>Amputation\Amputation_Right_Hand_Female</m_FemaleModel>
<m_GUID>f114e53a-b92e-4639-8d8c-2b43ab981885</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>6</m_Masks>
<!-- <m_MasksFolder>none</m_MasksFolder> -->
<!-- HUMAN -->
<textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
<!-- HUMAN AFTER CICATRIZATION -->
<textureChoices>Body\MaleBody01</textureChoices>
<textureChoices>Body\MaleBody02</textureChoices>
<textureChoices>Body\MaleBody03</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05</textureChoices>
<textureChoices>Body\MaleBody01a</textureChoices>
<textureChoices>Body\MaleBody02a</textureChoices>
<textureChoices>Body\MaleBody03a</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05a</textureChoices>
</clothingItem>

View File

@@ -9,6 +9,8 @@
<m_Masks>3</m_Masks> <m_Masks>3</m_Masks>
<m_Masks>4</m_Masks> <m_Masks>4</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Upperarm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin02_b</textureChoices>

View File

@@ -8,6 +8,7 @@
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>5</m_Masks> <m_Masks>5</m_Masks>
<m_Masks>6</m_Masks> <m_Masks>6</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>

View File

@@ -8,8 +8,7 @@ local DataController = require("TOC/Controllers/DataController")
---@param context ISContextMenu ---@param context ISContextMenu
---@param worldobjects table ---@param worldobjects table
local function AddAdminTocOptions(playerNum, context, worldobjects) local function AddAdminTocOptions(playerNum, context, worldobjects)
if not(isClient() and isAdmin() or isDebugEnabled()) then return end
if (isClient() and not isDebugEnabled()) or isAdmin() then return end
local players = {} local players = {}
for _, v in ipairs(worldobjects) do for _, v in ipairs(worldobjects) do
@@ -32,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
@@ -46,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)
@@ -66,12 +65,13 @@ 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)
end end
end end
end end
Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions) Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions)

View File

@@ -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) local surgeonPl = getSpecificPlayer(surgeonNum) -- fix broken, getOnlineID not working anymore
local handler = AmputationHandler:new(limbName, surgeonPl) local handler = AmputationHandler:new(limbName, surgeonPl)
return handler return handler
end end
@@ -46,6 +46,14 @@ 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()

View File

@@ -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
} }

View File

@@ -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
@@ -57,7 +57,6 @@ function DataController:setup(key)
---@type tocModDataType ---@type tocModDataType
self.tocData = { self.tocData = {
-- Generic stuff that does not belong anywhere else -- Generic stuff that does not belong anywhere else
isInitializing = true,
isIgnoredPartInfected = false, isIgnoredPartInfected = false,
isAnyLimbCut = false, isAnyLimbCut = false,
limbs = {}, limbs = {},
@@ -93,16 +92,16 @@ function DataController:setup(key)
-- Sync with the server -- Sync with the server
self:apply() self:apply()
-- -- Disable lock
-- self.tocData.isInitializing = false
-- ModData.add(key, self.tocData)
triggerEvent("OnSetupTocData") triggerEvent("OnSetupTocData")
end 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 +228,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
@@ -339,14 +334,11 @@ end
---@param cicatrizationTime integer? ---@param cicatrizationTime integer?
function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime) function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime)
local limbData = self.tocData.limbs[limbName] local limbData = self.tocData.limbs[limbName]
if ampStatus.isCut ~= nil then limbData.isCut = ampStatus.isCut end for k, v in pairs(ampStatus) do
if ampStatus.isInfected ~= nil then limbData.isInfected = ampStatus.isInfected end if v ~= nil then
if ampStatus.isOperated ~= nil then limbData.isOperated = ampStatus.isOperated end limbData[k] = v
if ampStatus.isCicatrized ~= nil then limbData.isCicatrized = ampStatus.isCicatrized end end
if ampStatus.isCauterized ~= nil then limbData.isCauterized = ampStatus.isCauterized end end
if ampStatus.woundDirtyness ~= nil then limbData.woundDirtyness = ampStatus.woundDirtyness end
if ampStatus.isVisible ~= nil then limbData.isVisible = ampStatus.isVisible end
if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end
end end
@@ -403,9 +395,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")

View File

@@ -5,14 +5,51 @@ 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
-- We need to override when the player changes key binds manually to be sure that TOC changes are re-applied
local og_MainOptions_apply = MainOptions.apply
function MainOptions:apply(closeAfter)
og_MainOptions_apply(self, closeAfter)
CachedDataHandler.OverrideBothHandsFeasibility()
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 +61,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 +115,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 +182,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 +386,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, instanceItem(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

View File

@@ -1,8 +1,11 @@
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")
----------- -----------
@@ -37,8 +40,7 @@ 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
local ItemsController = require("TOC/Controllers/ItemsController") sendClientCommand(CommandsData.modules.TOC_ITEMS, "DeleteAllOldAmputationItems", {playerNum = playerObj:getOnlineID()})
ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
CachedDataHandler.Setup(username) CachedDataHandler.Setup(username)
end end
@@ -56,7 +58,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(k) then if playerObj:hasTrait(TOC.traits[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)
@@ -93,7 +95,8 @@ 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)
@@ -110,14 +113,14 @@ end
---@param bodyPart BodyPart ---@param bodyPart BodyPart
---@param limbName string ---@param limbName string
---@param dcInst DataController ---@param dcInst DataController
function LocalPlayerController.HealZombieInfection(bodyDamage, bodyPart, limbName, dcInst) function LocalPlayerController.HealZombieInfection(bodyDamage, limbName, dcInst)
-- FIX Different in B42.13, to be set with stats?
if bodyDamage:isInfected() == false then return end 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)
bodyDamage:setInfectionLevel(-1) --bodyPart:SetInfected(false)
bodyPart:SetInfected(false)
dcInst:setIsInfected(limbName, false) dcInst:setIsInfected(limbName, false)
dcInst:apply() dcInst:apply()
@@ -183,7 +186,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, bodyPart, limbName, dcInst) LocalPlayerController.HealZombieInfection(bd, 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
@@ -317,9 +320,10 @@ 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
local ItemsController = require("TOC/Controllers/ItemsController") sendClientCommand(CommandsData.modules.TOC_ITEMS, "OverrideAmputationItemVisuals",
ItemsController.Player.OverrideAmputationItemVisuals(playerObj, limbName, true) {playerNum = playerObj:getOnlineID(), limbName = limbName, isCicatrized = true})
end end
--* Object drop handling when amputation occurs --* Object drop handling when amputation occurs

View File

@@ -64,18 +64,18 @@ end
---@param obj any self ---@param obj any self
---@param wrappedFunc function ---@param wrappedFunc function
function TourniquetController.WrapClothingAction(obj, wrappedFunc) function TourniquetController.WrapClothingAction(obj, wrappedFunc)
local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType()) -- local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType())
local group -- local group
if isTourniquet then -- if isTourniquet then
group = BodyLocations.getGroup("Human") -- group = BodyLocations.getGroup("Human")
group:setMultiItem(TourniquetController.bodyLoc, false) -- group:setMultiItem(TourniquetController.bodyLoc, false)
end -- end
local ogValue = wrappedFunc(obj) local ogValue = wrappedFunc(obj)
if isTourniquet then -- if isTourniquet then
group:setMultiItem(TourniquetController.bodyLoc, true) -- group:setMultiItem(TourniquetController.bodyLoc, true)
end -- end
return ogValue -- Needed for isValid return ogValue -- Needed for isValid
end end
@@ -94,16 +94,19 @@ end
local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform
---@diagnostic disable-next-line: duplicate-set-field
function ISClothingExtraAction:perform() function ISClothingExtraAction:perform()
TourniquetController.WrapClothingAction(self, og_ISClothingExtraAction_perform) TourniquetController.WrapClothingAction(self, og_ISClothingExtraAction_perform)
end end
local og_ISWearClothing_isValid = ISWearClothing.isValid local og_ISWearClothing_isValid = ISWearClothing.isValid
---@diagnostic disable-next-line: duplicate-set-field
function ISWearClothing:isValid() function ISWearClothing:isValid()
return TourniquetController.WrapClothingAction(self, og_ISWearClothing_isValid) return TourniquetController.WrapClothingAction(self, og_ISWearClothing_isValid)
end end
local og_ISUnequipAction_perform = ISUnequipAction.perform local og_ISUnequipAction_perform = ISUnequipAction.perform
---@diagnostic disable-next-line: duplicate-set-field
function ISUnequipAction:perform() function ISUnequipAction:perform()
return TourniquetController.WrapClothingAction(self, og_ISUnequipAction_perform) return TourniquetController.WrapClothingAction(self, og_ISUnequipAction_perform)
end end

View File

@@ -1,5 +1,8 @@
-- TODO Move this to server side for 42.13
local DataController = require("TOC/Controllers/DataController") local DataController = require("TOC/Controllers/DataController")
local ItemsController = require("TOC/Controllers/ItemsController") local CommandsData = require("TOC/CommandsData")
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")
@@ -152,11 +155,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:setEndurance(surgeonFactor) patientStats:set(CharacterStat.ENDURANCE, surgeonFactor)
patientStats:setStress(baseDamage - surgeonFactor) patientStats:set(CharacterStat.STRESS, 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
@@ -174,8 +177,13 @@ 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)
ItemsController.Player.SpawnAmputationItem(self.patientPl, self.limbName) -- FIX This can be done in a single step instead of this crap
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()
@@ -190,8 +198,13 @@ 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)
if bd:getInfectionLevel() < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then local infectionLevel = self.patientPl:getStats():get(CharacterStat.ZOMBIE_INFECTION)
if infectionLevel < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then
LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst) LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst)
end end
@@ -203,7 +216,7 @@ function AmputationHandler:execute(damagePlayer)
triggerEvent("OnAmputatedLimb", self.limbName) triggerEvent("OnAmputatedLimb", self.limbName)
end end
---Deletes the instance ---Delete the instance
function AmputationHandler:close() function AmputationHandler:close()
AmputationHandler.instance = nil AmputationHandler.instance = nil
end end

View File

@@ -23,7 +23,7 @@ end
function CachedDataHandler.CalculateCacheableValues(username) function CachedDataHandler.CalculateCacheableValues(username)
CachedDataHandler.CalculateHighestAmputatedLimbs(username) CachedDataHandler.CalculateHighestAmputatedLimbs(username)
if getPlayer():getUsername() == username then if getPlayer():getUsername() == username then
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
end end
end end
@@ -130,14 +130,13 @@ function CachedDataHandler.GetHandFeasibility(side)
-- FIX horrendous workaround, but with a forced init we run the caching too early and it breaks this, setting it to nil. -- FIX horrendous workaround, but with a forced init we run the caching too early and it breaks this, setting it to nil.
if CachedDataHandler.handFeasibility[side] == nil then if CachedDataHandler.handFeasibility[side] == nil then
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
end end
return CachedDataHandler.handFeasibility[side] return CachedDataHandler.handFeasibility[side]
end end
function CachedDataHandler.OverrideBothHandsFeasibility()
function CachedDataHandler.CalculateBothHandsFeasibility()
CachedDataHandler.CalculateHandFeasibility("Hand_L") CachedDataHandler.CalculateHandFeasibility("Hand_L")
CachedDataHandler.CalculateHandFeasibility("Hand_R") CachedDataHandler.CalculateHandFeasibility("Hand_R")
local interactStr = "Interact" local interactStr = "Interact"
@@ -151,12 +150,22 @@ function CachedDataHandler.CalculateBothHandsFeasibility()
if not CachedDataHandler.GetBothHandsFeasibility() then if not CachedDataHandler.GetBothHandsFeasibility() then
TOC_DEBUG.print("Disabling interact key") TOC_DEBUG.print("Disabling interact key")
TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey)) TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE)
else
TOC_DEBUG.print("Re-enabling interact key")
TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey) if StaticData.COMPAT_42 then
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE, 0, false, false, false)
else
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE)
end
else
--TOC_DEBUG.print("Re-enabling interact key")
--TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
if StaticData.COMPAT_42 then
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey, 0, false, false, false)
else
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey)
end
end end
end end
@@ -165,3 +174,4 @@ function CachedDataHandler.GetBothHandsFeasibility()
end end
return CachedDataHandler return CachedDataHandler

View File

@@ -2,26 +2,27 @@ 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
local ProsthesisHandler = {} local ProsthesisHandler = {}
local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst local bodylocArmProstBaseline = "toc:toc_armprost"
local bodyLocLegProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.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
---@param item InventoryItem? ---@param item InventoryItem?
---@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():contains(bodyLocArmProst) return item:getBodyLocation():toString():contains(bodylocArmProstBaseline)
end end
---Get the grouping for the prosthesis ---Get the grouping for the prosthesis
@@ -31,13 +32,10 @@ function ProsthesisHandler.GetGroup(item)
local fullType = item:getFullType() local fullType = item:getFullType()
local side = CommonMethods.GetSide(fullType) local side = CommonMethods.GetSide(fullType)
local bodyLocation = item:getBodyLocation() local bodyLocation = item:getBodyLocation()
local position local position
if bodyLocation == bodyLocArmProst then if bodyLocation:toString():contains(bodylocArmProstBaseline) then
position = "Top_" position = "Top_"
elseif bodyLocation == bodyLocLegProst then
position = "Bottom_"
else else
TOC_DEBUG.print("Something is wrong, no position in this item") TOC_DEBUG.print("Something is wrong, no position in this item")
position = nil position = nil
@@ -84,18 +82,11 @@ function ProsthesisHandler.SearchAndSetupProsthesis(item, isEquipping)
dcInst:apply() dcInst:apply()
-- Calculates hands feasibility once again -- Calculates hands feasibility once again
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
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,37 +101,56 @@ local function HandleProsthesisValidation(item, isEquippable)
end end
---@diagnostic disable-next-line: duplicate-set-field
-------------------------
--* Overrides *--
local og_ISWearClothing_isValid = ISWearClothing.isValid local og_ISWearClothing_isValid = ISWearClothing.isValid
---@diagnostic disable-next-line: duplicate-set-field
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
---@diagnostic disable-next-line: duplicate-set-field
function ISWearClothing:perform() function ISWearClothing:perform()
ProsthesisHandler.SearchAndSetupProsthesis(self.item, true) ProsthesisHandler.SearchAndSetupProsthesis(self.item, true)
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
-- B42 Compatibility to add
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 ---@diagnostic disable-next-line: duplicate-set-field
function ISClothingExtraAction:perform() function ISClothingExtraAction:perform()
-- B42 Compatibility to add
local extraItem = InventoryItemFactory.CreateItem(self.extra) local extraItem = InventoryItemFactory.CreateItem(self.extra)
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true) ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
og_ISClothingExtraAction_perform(self) og_ISClothingExtraAction_perform(self)
end end
local og_ISUnequipAction_perform = ISUnequipAction.perform local og_ISUnequipAction_perform = ISUnequipAction.perform
---@diagnostic disable-next-line: duplicate-set-field
function ISUnequipAction:perform() function ISUnequipAction:perform()
--[[ --[[
@@ -153,15 +163,15 @@ function ISUnequipAction:perform()
]] ]]
local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false) local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
local group -- local group
if isProst then -- if isProst then
group = BodyLocations.getGroup("Human") -- group = BodyLocations.getGroup("Human")
group:setMultiItem("TOC_ArmProst", false) -- group:setMultiItem("TOC_ArmProst", false)
end -- end
og_ISUnequipAction_perform(self) og_ISUnequipAction_perform(self)
if isProst then if isProst then
group:setMultiItem("TOC_ArmProst", true) -- group:setMultiItem("TOC_ArmProst", true)
-- we need to fetch the limbname associated to the prosthesis -- we need to fetch the limbname associated to the prosthesis
local side = CommonMethods.GetSide(self.item:getFullType()) local side = CommonMethods.GetSide(self.item:getFullType())
@@ -172,7 +182,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

View File

@@ -6,7 +6,7 @@ require("TOC/Events")
---@class Main ---@class Main
local Main = { local Main = {
_version = "2.1.4" _version = "2.3"
} }
function Main.Start() function Main.Start()

View File

@@ -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 = {}

View File

@@ -7,6 +7,9 @@ local CommonMethods = require("TOC/CommonMethods")
---@field otherPlayer IsoPlayer ---@field otherPlayer IsoPlayer
---@field bandage InventoryItem ---@field bandage InventoryItem
---@field bodyPart any ---@field bodyPart any
---@field doctorLevel number
---@field bandagedPlayerX number
---@field bandagedPlayerY number
local CleanWoundAction = ISBaseTimedAction:derive("CleanWoundAction") local CleanWoundAction = ISBaseTimedAction:derive("CleanWoundAction")
---@param doctor IsoPlayer ---@param doctor IsoPlayer
@@ -33,7 +36,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 -- B42 Deprecated
o.doctorLevel = 10 o.doctorLevel = 10
end end
return o return o
@@ -84,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

View File

@@ -24,9 +24,7 @@ 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 = {} local o = ISBaseTimedAction.new(self, surgeon)
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
@@ -43,12 +41,21 @@ function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, banda
o.stopOnWalk = true o.stopOnWalk = true
o.stopOnRun = true o.stopOnRun = true
o.maxTime = 1000 - (surgeon:getPerkLevel(Perks.Doctor) * 50) o.maxTime = o:getDuration()
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
@@ -89,6 +96,16 @@ 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
@@ -117,22 +134,30 @@ 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

View 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

View File

@@ -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()

View File

@@ -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
@@ -131,26 +143,6 @@ function ISHealthPanel:render()
end end
-- local og_ISHealthPanel_update = ISHealthPanel.update
-- function ISHealthPanel:update()
-- og_ISHealthPanel_update(self)
-- -- TODO Listen for changes on other player side instead of looping this
-- -- FIX Re-enable it, just for test
-- if self.character then
-- local locPlUsername = getPlayer():getUsername()
-- local remPlUsername = self.character:getUsername()
-- if locPlUsername ~= remPlUsername and self:isReallyVisible() then
-- -- Request update for TOC DATA
-- local key = CommandsData.GetKey(remPlUsername)
-- --ModData.request(key)
-- end
-- end
-- end
-- We need to override this to force the alpha to 1 -- We need to override this to force the alpha to 1
local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender
function ISCharacterInfoWindow:prerender() function ISCharacterInfoWindow:prerender()

View File

@@ -33,15 +33,17 @@ function BaseHandler:checkItems()
local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor()) local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor())
local done = {} local done = {}
local childContainers = {} local childContainers = {}
for i=1,containers:size() do if containers ~= nil then
local container = containers:get(i-1) for i=1, containers:size() do
done[container] = true local container = containers:get(i-1)
table.wipe(childContainers) done[container] = true
self:checkContainerItems(container, childContainers) table.wipe(childContainers)
for _,container2 in ipairs(childContainers) do self:checkContainerItems(container, childContainers)
if not done[container2] then for _,container2 in ipairs(childContainers) do
done[container2] = true if not done[container2] then
self:checkContainerItems(container2, nil) done[container2] = true
self:checkContainerItems(container2, nil)
end
end end
end end
end end
@@ -101,7 +103,7 @@ function BaseHandler:getItemOfTag(items, type)
end end
function BaseHandler:getAllItemsOfType(items, type) function BaseHandler:getAllItemsOfType(items, type)
local items = {} items = {}
for _,item in ipairs(items) do for _,item in ipairs(items) do
if item:getFullType() == type then if item:getFullType() == type then
table.insert(items, item) table.insert(items, item)
@@ -118,7 +120,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

View File

@@ -68,9 +68,10 @@ 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(CharacterTrait.BRAVE) or pl:hasTrait(CharacterTrait.DESENSITIZED) or pl:getPerkLevel(Perks.Strength) > 5
local isTempHighEnough = stoveObj:getCurrentTemperature() >= 250 local isTempHighEnough = stoveObj:getCurrentTemperature()-1 >= 2.50
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

View File

@@ -1,5 +1,9 @@
-- 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!
@@ -17,7 +21,6 @@ ItemsController.Player = {}
---@return number ---@return number
---@private ---@private
function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized) function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized)
-- FIX Broken
local textureString = playerObj:getHumanVisual():getSkinTexture() local textureString = playerObj:getHumanVisual():getSkinTexture()
local isHairy = textureString:sub(-1) == "a" local isHairy = textureString:sub(-1) == "a"
@@ -48,6 +51,8 @@ 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
@@ -79,23 +84,22 @@ end
---Deletes all the old amputation items, used for resets ---Deletes all the old amputation items, used for resets
---@param playerObj IsoPlayer ---@param playerObj IsoPlayer
function ItemsController.Player.DeleteAllOldAmputationItems(playerObj) function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
-- TODO Fix visual bug
-- This part is a workaround for a pretty shitty implementation on the java side. Check ProsthesisHandler for more infos -- This part is a workaround for a pretty shitty implementation on the java side. Check ProsthesisHandler for more infos
local group = BodyLocations.getGroup("Human") -- local group = BodyLocations.getGroup("Human")
group:setMultiItem("TOC_Arm", false) -- group:setMultiItem("TOC_Arm", false)
group:setMultiItem("TOC_ArmProst", false) -- group:setMultiItem("TOC_ArmProst", false)
for i = 1, #StaticData.LIMBS_STR do for i = 1, #StaticData.LIMBS_STR do
local limbName = StaticData.LIMBS_STR[i] local limbName = StaticData.LIMBS_STR[i]
-- TODO Won't work with dedicated clothingItems for multi amps
local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName
local clothItem = playerObj:getInventory():FindAndReturn(clothItemName) local clothItem = playerObj:getInventory():FindAndReturn(clothItemName)
---@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.
@@ -103,12 +107,15 @@ 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 clothingItem = playerObj:getInventory():AddItem(StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName) local itemName = 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
playerObj:setWornItem(clothingItem:getBodyLocation(), clothingItem) sendAddItemToContainer(playerObj:getInventory(), 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

View File

@@ -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

View File

@@ -0,0 +1,44 @@
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)

View File

@@ -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:getOnlineID() local surgeonNum = surgeonPl:getPlayerNum()
---@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:getOnlineID() local adminNum = adminObj:getPlayerNum()
---@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,7 +53,11 @@ 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
------------------------- -------------------------

View File

@@ -0,0 +1,109 @@
--Based on RabenRabo's bodylocation solution from their mod "Fantasy Bodyparts" and "Fantasy Legs" sub-mod.
--Modified by GanydeBielovzki with permission for batch use for the Frockin' Splendor franchise and spin-offs.
--To copy, further modify or otherwise use this code the original creator and the modifier must be credited.
local function copyBodyLocationProperties(oldGroup, oldLocID, newGroup)
for k = 0, oldGroup:size()-1 do
local otherLocID = oldGroup:getLocationByIndex(k):getId()
if oldGroup:isExclusive(oldLocID, otherLocID)
then
newGroup:setExclusive(oldLocID, otherLocID)
end
if oldGroup:isHideModel(oldLocID, otherLocID)
then
newGroup:setHideModel(oldLocID, otherLocID)
end
if oldGroup:isAltModel(oldLocID, otherLocID)
then
newGroup:setAltModel(oldLocID, otherLocID)
end
end
end
local function addBodyLocationsAt(groupName, locationList)
local results = {}
-- get list (!!actually a view!!) of all groups and copy to array (BodyLocations.reset() will also clear the view)
local allGroupsList = BodyLocations.getAllGroups()
local allGroups = {}
for i = 0, allGroupsList:size()-1 do
allGroups[i + 1] = allGroupsList:get(i)
end
BodyLocations.reset()
-- recreate all groups/bodylocations and insert new bodylocations
for i = 1, #allGroups do
local oldGroup = allGroups[i]
local newGroup = BodyLocations.getGroup(oldGroup:getId())
-- FIRST: Process all original locations AND insert new ones at correct positions
for j = 0, oldGroup:size()-1 do
local oldLoc = oldGroup:getLocationByIndex(j)
local oldLocID = oldLoc:getId()
-- For each location definition, check if it should be inserted here
for _, locDef in ipairs(locationList) do
if oldGroup:getId() == groupName then
local newLocID = type(locDef.name) ~= "string" and locDef.name or
ItemBodyLocation.get(ResourceLocation.of(locDef.name))
local refLocID = type(locDef.reference) ~= "string" and locDef.reference or
ResourceLocation.of(locDef.reference)
local isTargetGroupAndLoc = refLocID == oldLocID
if isTargetGroupAndLoc and locDef.before then
results[locDef.name] = newGroup:getOrCreateLocation(newLocID)
end
end
end
-- Add the original location
newGroup:getOrCreateLocation(oldLocID)
-- Check for "after" insertions
for _, locDef in ipairs(locationList) do
if oldGroup:getId() == groupName then
local newLocID = type(locDef.name) ~= "string" and locDef.name or
ItemBodyLocation.get(ResourceLocation.of(locDef.name))
local refLocID = type(locDef.reference) ~= "string" and locDef.reference or
ResourceLocation.of(locDef.reference)
local isTargetGroupAndLoc = refLocID == oldLocID
if isTargetGroupAndLoc and not locDef.before then
results[locDef.name] = newGroup:getOrCreateLocation(newLocID)
end
end
end
end
-- SECOND: copy bodylocation properties from old groups to new groups
for j = 0, oldGroup:size()-1 do
local oldLocID = oldGroup:getLocationByIndex(j):getId()
newGroup:setMultiItem(oldLocID, oldGroup:isMultiItem(oldLocID))
copyBodyLocationProperties(oldGroup, oldLocID, newGroup)
end
end
return results
end
local results = addBodyLocationsAt("Human", {
{name = "toc:Arm_L", reference = ItemBodyLocation.FULL_TOP, before = false},
{name = "toc:Arm_R", reference = ItemBodyLocation.FULL_TOP, before = false},
{name = "toc:ArmProst_L", reference = ItemBodyLocation.FULL_TOP, before = false},
{name = "toc:ArmProst_R", reference = ItemBodyLocation.FULL_TOP, before = false},
{name = "toc:ArmAccessory_L", reference = ItemBodyLocation.FULL_TOP, before = false},
{name = "toc:ArmAccessory_R", reference = ItemBodyLocation.FULL_TOP, before = false},
})
results['toc:Arm_L']:setMultiItem(true)
results['toc:Arm_R']:setMultiItem(true)
results['toc:ArmProst_L']:setMultiItem(true)
results['toc:ArmProst_R']:setMultiItem(true)
results['toc:ArmAccessory_L']:setMultiItem(true)
results['toc:ArmAccessory_R']:setMultiItem(true)

View File

@@ -5,7 +5,8 @@ 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 = {
@@ -15,6 +16,7 @@ CommandsData.client = {
--* APPLY *-- --* APPLY *--
ReceiveApplyFromServer = "ReceiveApplyFromServer", ReceiveApplyFromServer = "ReceiveApplyFromServer",
ReceiveWearAmputation = "ReceiveWearAmputation",
--* ADMIN ONLY --* --* ADMIN ONLY --*
ReceiveExecuteInitialization = "ReceiveExecuteInitialization", ReceiveExecuteInitialization = "ReceiveExecuteInitialization",

View File

@@ -13,10 +13,12 @@ end
---Print debug ---Print debug
---@param string string ---@param string string
function TOC_DEBUG.print(string) function TOC_DEBUG.print(string)
--if isDebugEnabled() then if isDebugEnabled() then
local runningFile = TOC_DEBUG.getRunningFile() local runningFile = TOC_DEBUG.getRunningFile()
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string)) print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
--end else
print(string)
end
end end
---Horrendous but I don't really care about performance for this ---Horrendous but I don't really care about performance for this

View 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

View File

@@ -0,0 +1 @@
return _TOCRegistries

View File

@@ -2,10 +2,9 @@
---@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}
--------------------------- ---------------------------
-- _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
@@ -21,6 +20,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
@@ -46,12 +49,6 @@ StaticData.PARTS_STR = {
} }
StaticData.MOD_BODYLOCS_BASE_IND_STR = {
TOC_ArmProst = "TOC_ArmProst",
TOC_LegProst = "TOC_LegProst",
TOC_Arm = "TOC_Arm",
}
-- No "MAX" here. -- No "MAX" here.
StaticData.IGNORED_BODYLOCS_BPT = { StaticData.IGNORED_BODYLOCS_BPT = {
BodyPartType.Foot_L, BodyPartType.Foot_R, BodyPartType.Groin, BodyPartType.Head, BodyPartType.Foot_L, BodyPartType.Foot_R, BodyPartType.Groin, BodyPartType.Head,
@@ -145,6 +142,7 @@ StaticData.AMP_GROUPS_BASE_IND_STR = {
Bottom = "Bottom" Bottom = "Bottom"
} }
-- FIX This should be aligned with the body locs, no reason anymore to keep it separated
StaticData.AMP_GROUPS_IND_STR = {} StaticData.AMP_GROUPS_IND_STR = {}
StaticData.AMP_GROUPS_STR = {} StaticData.AMP_GROUPS_STR = {}
@@ -185,8 +183,8 @@ end
StaticData.TOURNIQUET_BODYLOCS_TO_GROUPS_IND_STR = { StaticData.TOURNIQUET_BODYLOCS_TO_GROUPS_IND_STR = {
["HandsLeft"] = StaticData.AMP_GROUPS_IND_STR.Top_L, [ItemBodyLocation.HANDS_LEFT] = StaticData.AMP_GROUPS_IND_STR.Top_L,
["HandsRight"] = StaticData.AMP_GROUPS_IND_STR.Top_R [ItemBodyLocation.HANDS_RIGHT] = StaticData.AMP_GROUPS_IND_STR.Top_R
} }
@@ -234,7 +232,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",
} }
----------------- -----------------
@@ -276,8 +274,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(),

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",
} }

View File

@@ -0,0 +1,21 @@
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",
}

View File

@@ -0,0 +1,11 @@
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",
}

View File

@@ -0,0 +1,5 @@
Recipes_FR = {
Recipe_Craft_Prosthetic_Arm = "Fabriquer un bras prothétique",
Recipe_Craft_Prosthetic_Hook = "Fabriquer un crochet prothétique",
}

View File

@@ -1,10 +1,10 @@
Sandbox_FR = { Sandbox_FR = {
Sandbox_TOC = "Le Seul Remède", Sandbox_TOC = "Le Seul Remède",
Sandbox_TOC_CicatrizationSpeed = "Vitesse de cicatrisation", Sandbox_TOC_CicatrizationSpeed = "Vitesse de cicatrisation",
Sandbox_TOC_WoundDirtynessMultiplier = "Multiplicateur de saleté de la plaie", Sandbox_TOC_WoundDirtynessMultiplier = "Multiplicateur de saleté de la plaie",
Sandbox_TOC_SurgeonAbilityImportance = "Importance de la compétence du chirurgien", Sandbox_TOC_SurgeonAbilityImportance = "Importance de la compétence du chirurgien",
Sandbox_TOC_EnableZombieAmputations = "Activer les amputations de zombies", Sandbox_TOC_EnableZombieAmputations = "Activer les amputations de zombies",
Sandbox_TOC_ZombieAmputationDamageThreshold = "Seuil de dégâts pour amputations de zombies", Sandbox_TOC_ZombieAmputationDamageThreshold = "Seuil de dégâts pour amputations de zombies",
Sandbox_TOC_ZombieAmputationDamageChance = "Probabilité d'amputations de zombies", Sandbox_TOC_ZombieAmputationDamageChance = "Probabilité d'amputations de zombies",
} }

View File

@@ -1,10 +1,10 @@
Tooltip_FR = { Tooltip_FR = {
Tooltip_Surgery_CantCauterize = "Vous ne pouvez pas cautériser la plaie", Tooltip_Surgery_CantCauterize = "Vous ne pouvez pas cautériser la plaie",
Tooltip_Surgery_And = " et ", Tooltip_Surgery_And = " et ",
Tooltip_Surgery_TempTooLow = "La température est encore trop basse", Tooltip_Surgery_TempTooLow = "La température est encore trop basse",
Tooltip_Surgery_Coward = "Vous n'avez pas le courage de le faire", Tooltip_Surgery_Coward = "Vous n'avez pas le courage de le faire",
Tooltip_Surgery_LimbNotFree = "Vous devez d'abord retirer la prothèse", Tooltip_Surgery_LimbNotFree = "Vous devez d'abord retirer la prothése",
} }

View File

@@ -0,0 +1,16 @@
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..."
}

View File

@@ -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",

View File

@@ -0,0 +1,33 @@
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 = "Моментально ампутировать",
}

View File

@@ -0,0 +1,18 @@
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 = "Протез экипирован",
}

View File

@@ -0,0 +1,11 @@
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 = "Протез руки - Крюк",
}

View File

@@ -0,0 +1,4 @@
Recipes_RU = {
Recipe_Craft_Prosthetic_Arm = "Изготовить протез руки",
Recipe_Craft_Prosthetic_Hook = "Изготовить протез ввиде крючка",
}

View File

@@ -0,0 +1,7 @@
Sandbox_RU = {
Sandbox_TOC = "Спасенье в Отсечении",
Sandbox_TOC_CicatrizationSpeed = "Скорость заживления",
Sandbox_TOC_WoundDirtynessMultiplier = "Множитель загрязнения ран",
Sandbox_TOC_SurgeonAbilityImportance = "Значимость способностей врача-хирурга",
}

View File

@@ -0,0 +1,10 @@
Tooltip_RU = {
Tooltip_Surgery_CantCauterize = "Нельзя прижигать рану",
Tooltip_Surgery_And = " и "
Tooltip_Surgery_TempTooLow = "Температура все еще слишком низкая",
Tooltip_Surgery_Coward = "У тебя не хватит смелости сделать это",
Tooltip_Surgery_LimbNotFree = "Сначала нужно снять протез",
}

View File

@@ -0,0 +1,16 @@
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 = "Я не могу его так экипировать..."
}

View File

@@ -0,0 +1,31 @@
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",
}

View File

@@ -0,0 +1,19 @@
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?"
}

Some files were not shown because too many files have changed in this diff Show More