Merge pull request #193 from ZioPao/dev-b42

Dev b42
This commit is contained in:
Pao
2025-03-31 00:40:24 +02:00
committed by GitHub
223 changed files with 325 additions and 204 deletions

12
.vscode/tasks.json vendored
View File

@@ -15,6 +15,18 @@
"options": {"statusbar": {"label": "$(arrow-up) Bump Mod Version"}},
"command": "python ${config:zomboid_user_folder}/PaosCrap/bump_version.py media/lua/client/TOC/Main.lua",
},
{
"label": "Run Zomboid Debug No Steam (42)",
"type": "shell",
"presentation": {
"group": "groupZomboid"
},
"command": "\"${config:zomboid_folder}\\ProjectZomboid64 - nosteam-debug 42.bat\"",
"options": {"statusbar": {"label": "$(run) Zomboid client (42)"}},
"problemMatcher": [
"$eslint-stylish"
]
},
{
"label": "Run Zomboid Debug No Steam",
"type": "shell",

BIN
42/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -365,5 +365,5 @@ end
local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
---@diagnostic disable-next-line: duplicate-set-field
function ISClothingExtraAction:isValid()
return WrapClothingAction(self, og_ISClothingExtraAction_isValid, InventoryItemFactory.CreateItem(self.extra))
return WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra))
end

View File

@@ -128,14 +128,14 @@ local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
function ISClothingExtraAction:isValid()
local isEquippable = og_ISClothingExtraAction_isValid(self)
-- self.extra is a string, not the item
local testItem = InventoryItemFactory.CreateItem(self.extra)
local testItem = instanceItem(self.extra)
return HandleProsthesisValidation(testItem, isEquippable)
end
local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform
function ISClothingExtraAction:perform()
local extraItem = InventoryItemFactory.CreateItem(self.extra)
local extraItem = instanceItem(self.extra)
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
og_ISClothingExtraAction_perform(self)
end

View File

@@ -122,13 +122,14 @@ function ISDrinkFromBottle:new(character, item, uses)
return action
end
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
-- FIX This doesn't exist anymore in B42
-- 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
local og_ISCampingInfoAction_new = ISCampingInfoAction.new
function ISCampingInfoAction:new(character, campfireObject, campfire)

View File

@@ -102,7 +102,8 @@ function ISHealthPanel:tryDrawAmputation(highestAmputations, side, username)
texture = StaticData.HEALTH_PANEL_TEXTURES[sexPl][limbName]
end
self:drawTexture(texture, self.healthPanel.x, self.healthPanel.y, 1, redColor, 0, 0)
-- B42, for some reason the positioning of the texture changed. Realigned it manually with those fixed values
self:drawTexture(texture, self.healthPanel.x - 7, self.healthPanel.y - 13, 1, redColor, 0, 0)
end
function ISHealthPanel:tryDrawProsthesis(highestAmputations, side, username)
local dc = DataController.GetInstance(username) -- TODO CACHE PROSTHESIS!!! Don't use DC here

View File

@@ -276,8 +276,8 @@ StaticData.AMPUTATION_CLOTHING_ITEM_BASE = "TOC.Amputation_"
------------------
--* Items check
local sawObj = InventoryItemFactory.CreateItem("Base.Saw")
local gardenSawObj = InventoryItemFactory.CreateItem("Base.GardenSaw")
local sawObj = instanceItem("Base.Saw")
local gardenSawObj = instanceItem("Base.GardenSaw")
StaticData.SAWS_NAMES_IND_STR = {
saw = sawObj:getName(),

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

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