SlashCo Wiki

SlashCo.RegisterAddon

 boolean SlashCo.RegisterAddon( string workshopid )

Description

Registers a mounted workshop addon as a SlashCo addon by its workshop ID, adding it to SlashCo.GetAddons and, Server-side, queuing it for client download via resource.AddWorkshop.
This normally isn't required, as any addon containing a lua/slashco folder is auto-detected by SlashCo.FindSlashCoAddons. Addons that don't match that check can call this from the SlashCo:RegisterAddons hook instead.

Arguments

1string workshopid

The workshop ID of the addon to register.

Returns

1boolean success

true if the addon was already registered or was found and registered, false if no mounted addon with that workshop ID exists.