Workshop¶
Workshop downloader helpers for Lilia server content discovery, synchronization, download prompts, and clientside addon mounting.
Overview
lia.workshop.addWorkshop(id)View Source
Purpose
Registers a Steam Workshop addon ID as required server content.
Realm
Server
Parameters
string|number id The Steam Workshop file ID to register.
Example Usage
lia.workshop.addWorkshop("3527535922")
lia.workshop.addWorkshop("3527535923")
lia.workshop.gather()View Source
Purpose
Collects all known server Workshop IDs from registered resources, mounted addons, and loaded module WorkshopContent definitions.
Realm
Server
Returns
table A table keyed by Workshop ID strings with true values for each required addon.
Example Usage
local workshopIDs = lia.workshop.gather()
for id in pairs(workshopIDs) do
print("Server workshop content includes:", id)
end
lia.workshop.send(ply)View Source
Purpose
Sends the cached Workshop ID table to a player through the Workshop downloader start network message.
Realm
Server
Parameters
Player ply The player receiving the cached Workshop content list.
Example Usage
local client = player.GetHumans()[1]
if IsValid(client) then
lia.workshop.cache = lia.workshop.cache or lia.workshop.gather()
lia.workshop.send(client)
end
lia.workshop.hasContentToDownload()View Source
Purpose
Checks whether the client is missing any server-required Workshop content that is not already mounted locally.
Realm
Client
Returns
boolean True when at least one required Workshop addon still needs to be downloaded or mounted, otherwise false.
Example Usage
if lia.workshop.hasContentToDownload() then
chat.AddText(Color(255, 200, 0), "This server has workshop content ready to mount.")
end