4 Commits

Author SHA1 Message Date
ZioPao
ba267cb900 I should stop trying to fix stuff while I'm falling asleep 2024-10-22 01:09:41 +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
ZioPao
68605ddb35 Bump to mod version 2024-10-19 18:37:02 +02:00
4 changed files with 11 additions and 4 deletions

View File

@@ -8,8 +8,7 @@ local DataController = require("TOC/Controllers/DataController")
---@param context ISContextMenu
---@param worldobjects table
local function AddAdminTocOptions(playerNum, context, worldobjects)
if (isClient() and not isDebugEnabled()) or isAdmin() then return end
if not(isClient() and isAdmin() or isDebugEnabled()) then return end
local players = {}
for _, v in ipairs(worldobjects) do
@@ -72,6 +71,8 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
end)
end
end
end
Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions)

View File

@@ -291,6 +291,12 @@ function ISWorldObjectContextMenu.createMenu(player, worldobjects, x, y, test)
---@type ISContextMenu
local ogContext = og_ISWorldObjectContextMenu_createMenu(player, worldobjects, x, y, test)
-- goddamn it, zomboid devs. ogContext could be a boolean...
-- TBH, I don't really care about gamepad support, but all this method can break stuff. Let's just disable thisfor gamepad users.
if type(ogContext) == "boolean" or type(ogContext) == "string" then
return ogContext
end
-- The vanilla game doesn't count an item in the off hand as "equipped" for picking up glass. Let's fix that here
local brokenGlassOption = ogContext:getOptionFromName(getText("ContextMenu_RemoveBrokenGlass"))

View File

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

View File

@@ -4,5 +4,5 @@ description=You've been bitten. You have only two choices.
id=TheOnlyCure
icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure
modversion=2.1.3
modversion=2.1.5
pzversion=41.65