From a41df7a5b9c57846ec510a79e2a201daba2c61aa Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 4 Apr 2026 15:36:37 -0400 Subject: [PATCH 1/2] Fixed errors in shop with weapons that don't use the TTT base weapon (like the holdable cat) --- gamemodes/terrortown/gamemode/cl_equip.lua | 2 +- gamemodes/terrortown/gamemode/player_ext_shd.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemodes/terrortown/gamemode/cl_equip.lua b/gamemodes/terrortown/gamemode/cl_equip.lua index b33037055..7581e78ba 100644 --- a/gamemodes/terrortown/gamemode/cl_equip.lua +++ b/gamemodes/terrortown/gamemode/cl_equip.lua @@ -674,7 +674,7 @@ local function GetOwnedEquipment() -- Determine if we already have equipment local owned_ids = {} for _, wep in ipairs(LocalPlayer():GetWeapons()) do - if IsValid(wep) and wep:IsEquipment() then + if IsValid(wep) and wep.IsEquipment and wep:IsEquipment() then TableInsert(owned_ids, wep:GetClass()) end end diff --git a/gamemodes/terrortown/gamemode/player_ext_shd.lua b/gamemodes/terrortown/gamemode/player_ext_shd.lua index 58240c09d..412959dc2 100644 --- a/gamemodes/terrortown/gamemode/player_ext_shd.lua +++ b/gamemodes/terrortown/gamemode/player_ext_shd.lua @@ -327,7 +327,7 @@ function plymeta:GetBaseKarma() return self:GetNWFloat("karma", 1000) end function plymeta:HasEquipmentWeapon() for _, wep in ipairs(self:GetWeapons()) do - if IsValid(wep) and wep:IsEquipment() then + if IsValid(wep) and wep.IsEquipment and wep:IsEquipment() then return true end end From 6f2ecff75ff25fb9312d02c8f2b4b563f0ff90ad Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 4 Apr 2026 15:36:37 -0400 Subject: [PATCH 2/2] Fixed errors in shop with weapons that don't use the TTT base weapon (like the holdable cat) --- RELEASE.md | 1 + gamemodes/terrortown/gamemode/cl_equip.lua | 2 +- gamemodes/terrortown/gamemode/player_ext_shd.lua | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index ffd0543b2..00de1e59a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -22,6 +22,7 @@ - Fixed error in Cannibal's role weapon HUD when weapon was selected from last round (Thanks Stig!) - Fixed detective hats not hiding when the owning player was eaten by the Cannibal - Fixed Loot Goblin not being able to drop some weapons that were droppable +- Fixed errors in shop with weapons that don't use the TTT base weapon (like the holdable cat) - Ported "Add check for checking weapon GetHeadshotMultiplier" ### Developer diff --git a/gamemodes/terrortown/gamemode/cl_equip.lua b/gamemodes/terrortown/gamemode/cl_equip.lua index b33037055..7581e78ba 100644 --- a/gamemodes/terrortown/gamemode/cl_equip.lua +++ b/gamemodes/terrortown/gamemode/cl_equip.lua @@ -674,7 +674,7 @@ local function GetOwnedEquipment() -- Determine if we already have equipment local owned_ids = {} for _, wep in ipairs(LocalPlayer():GetWeapons()) do - if IsValid(wep) and wep:IsEquipment() then + if IsValid(wep) and wep.IsEquipment and wep:IsEquipment() then TableInsert(owned_ids, wep:GetClass()) end end diff --git a/gamemodes/terrortown/gamemode/player_ext_shd.lua b/gamemodes/terrortown/gamemode/player_ext_shd.lua index 58240c09d..412959dc2 100644 --- a/gamemodes/terrortown/gamemode/player_ext_shd.lua +++ b/gamemodes/terrortown/gamemode/player_ext_shd.lua @@ -327,7 +327,7 @@ function plymeta:GetBaseKarma() return self:GetNWFloat("karma", 1000) end function plymeta:HasEquipmentWeapon() for _, wep in ipairs(self:GetWeapons()) do - if IsValid(wep) and wep:IsEquipment() then + if IsValid(wep) and wep.IsEquipment and wep:IsEquipment() then return true end end