Workshop
Steam Workshop addon downloading, mounting, and management system for the Lilia framework.
Overview
lia.workshop.addWorkshop(id)
Purpose
Queue a workshop addon for download and notify the admin UI.
When Called
During module initialization or whenever a new workshop dependency is registered.
Parameters
string|number id Workshop addon ID to download (will be converted to string).
Example Usage
-- Register a workshop addon dependency
lia.workshop.addWorkshop("3527535922")
lia.workshop.addWorkshop(1234567890) -- Also accepts numbers
lia.workshop.gather()
Purpose
Gather every known workshop ID from mounted addons and registered modules.
When Called
Once modules are initialized to cache which workshop addons are needed.
Returns
table Set of workshop IDs that should be downloaded/mounted.
Example Usage
-- Gather all workshop IDs that need to be downloaded
local workshopIds = lia.workshop.gather()
lia.workshop.cache = workshopIds
lia.workshop.send(ply)
Purpose
Send the cached workshop IDs to a player so the client knows what to download.
When Called
Automatically when a player initially spawns.
Parameters
Player ply The player entity to notify.
Example Usage
-- Send workshop cache to a specific player
lia.workshop.send(player.GetByID(1))
lia.workshop.hasContentToDownload()
Purpose
Determine whether there is any extra workshop content the client needs to download.
When Called
Before prompting the player to download server workshop addons.
Returns
boolean true if the client is missing workshop content that needs to be fetched.
Example Usage
-- Check if client needs to download workshop content
if lia.workshop.hasContentToDownload() then
-- Show download prompt to player
end