-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfast_creator.lua
More file actions
20 lines (18 loc) · 884 Bytes
/
Copy pathfast_creator.lua
File metadata and controls
20 lines (18 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
concommand.Add("fast_creator", function(ply, cmd, args)
local sCollection = tostring(args[1])
print(not args[1] and "You must enter a collection ID (eg : fast_creator 1092793021)" or "Here is the addon list of the collection " .. sCollection .. " :")
if not args[1] then return end
print("Just copy this to lua/autorun/server/workshop.lua\n")
steamworks.FileInfo(sCollection, function(tCollectionInfo)
for k, v in ipairs(tCollectionInfo["children"]) do
steamworks.FileInfo(v, function(tAddonInfo)
print(string.format("resource.AddWorkshop('%s') // %s", v, tAddonInfo["title"]))
end)
end
end)
end)
--[[
Simple utility to make a greate workshop.lua file for a fast dl.
-- Exemple : fast_creator <collectionID>
-- Return : A prebuild workshop.lua (just copy the print in your F10 console)
]]