fix: relay wear amputation
This commit is contained in:
15
.vscode/tasks.json
vendored
15
.vscode/tasks.json
vendored
@@ -33,7 +33,22 @@
|
|||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$eslint-stylish"
|
"$eslint-stylish"
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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": [
|
||||||
|
"$eslint-stylish"
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// "label": "Run Zomboid Debug No Steam",
|
// "label": "Run Zomboid Debug No Steam",
|
||||||
// "type": "shell",
|
// "type": "shell",
|
||||||
|
|||||||
@@ -46,12 +46,9 @@ function ClientRelayCommands.ReceiveApplyFromServer()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--* RELOAD MODEL *--
|
--* WEAR AMPUTATION ITEM *--
|
||||||
function ClientRelayCommands.ReceiveReloadModel(args)
|
function ClientRelayCommands.ReceiveWearAmputation(args)
|
||||||
local texId = args.texId
|
|
||||||
local itemName = args.itemName
|
local itemName = args.itemName
|
||||||
TOC_DEBUG.print("Resetting visuals locally for item " .. itemName .. " with texId " .. tostring(texId))
|
|
||||||
|
|
||||||
local clothingItem = getPlayer():getInventory():FindAndReturn(itemName)
|
local clothingItem = getPlayer():getInventory():FindAndReturn(itemName)
|
||||||
getPlayer():setWornItem(clothingItem:getBodyLocation(), clothingItem)
|
getPlayer():setWornItem(clothingItem:getBodyLocation(), clothingItem)
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ function ItemsController.Player.SpawnAmputationItem(playerObj, limbName)
|
|||||||
---@cast clothingItem InventoryItem
|
---@cast clothingItem InventoryItem
|
||||||
clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1
|
clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1
|
||||||
sendAddItemToContainer(playerObj:getInventory(), clothingItem)
|
sendAddItemToContainer(playerObj:getInventory(), clothingItem)
|
||||||
sendServerCommand(CommandsData.modules.TOC_RELAY, CommandsData.client.Relay.ReceiveWearAmputation, {itemName = itemName, texId = texId})
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user