Trying to work out TryRandomBleed

This commit is contained in:
ZioPao
2023-11-18 05:23:04 +01:00
parent 877e5a711e
commit 53eacd4717
3 changed files with 11 additions and 7 deletions

View File

@@ -1,8 +1,11 @@
if isClient() then return end -- The event makes this necessary to prevent clients from running this file
local StaticData = require("TOC/StaticData")
------------------------
local ServerDataHandler = {}
ServerDataHandler.modData = {}
---Get the server mod data table containing that player TOC data
---@param key string
---@return tocModData
@@ -14,10 +17,10 @@ end
---@param key string
---@param table tocModData
function ServerDataHandler.AddTable(key, table)
print("TOC: received ModData => " .. key)
TOC_DEBUG.printTable(table)
--TOC_DEBUG.print("Adding table with key: " .. tostring(key))
-- Check if key is valid
if not luautils.stringStarts(key, StaticData.MOD_NAME .. "_") then return end
TOC_DEBUG.print("received TOC ModData: " .. tostring(key))
ModData.add(key, table) -- Add it to the server mod data
ServerDataHandler.modData[key] = table
end