Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
371134faa7 |
@@ -8,7 +8,8 @@ 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
|
||||||
@@ -71,8 +72,6 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions)
|
Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions)
|
||||||
|
|
||||||
|
|||||||
@@ -291,12 +291,6 @@ function ISWorldObjectContextMenu.createMenu(player, worldobjects, x, y, test)
|
|||||||
---@type ISContextMenu
|
---@type ISContextMenu
|
||||||
local ogContext = og_ISWorldObjectContextMenu_createMenu(player, worldobjects, x, y, test)
|
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
|
-- 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"))
|
local brokenGlassOption = ogContext:getOptionFromName(getText("ContextMenu_RemoveBrokenGlass"))
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ require("TOC/Events")
|
|||||||
|
|
||||||
---@class Main
|
---@class Main
|
||||||
local Main = {
|
local Main = {
|
||||||
_version = "2.1.5"
|
_version = "2.1.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Main.Start()
|
function Main.Start()
|
||||||
|
|||||||
2
mod.info
2
mod.info
@@ -4,5 +4,5 @@ description=You've been bitten. You have only two choices.
|
|||||||
id=TheOnlyCure
|
id=TheOnlyCure
|
||||||
icon=icon.png
|
icon=icon.png
|
||||||
url=https://github.com/ZioPao/The-Only-Cure
|
url=https://github.com/ZioPao/The-Only-Cure
|
||||||
modversion=2.1.5
|
modversion=2.1.3
|
||||||
pzversion=41.65
|
pzversion=41.65
|
||||||
|
|||||||
Reference in New Issue
Block a user