SlashCo Wiki

SlashCo.FindWorkshopID

 string, string SlashCo.FindWorkshopID( string fileName, boolean allowUnmounted )

Description

Searches through every addon returned by engine.GetAddons for one that contains the given file.

Arguments

1string fileName

The file path to search for, e.g. "maps/mymap.bsp" or "lua/myslasher.lua".

2boolean allowUnmounted

If true, addons that aren't currently mounted are also checked.

Returns

1string wsid

The workshop ID of the matching addon, or nil if none was found.

2string title

The matching addon's title, or nil if none was found.