• lua resource.AddWorkshop
    7 replies, posted
in our .lua files we allways have a long list of resource.AddWorkshop("233838896") type calls. can we change the numbers to a "collection" number and be done with it?
[QUOTE=AnsontheToad;47471908]in our .lua files we allways have a long list of resource.AddWorkshop("233838896") type calls. can we change the numbers to a "collection" number and be done with it?[/QUOTE] No.
You can use [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=309020990"]my addon[/URL] to automate the process.
[url]https://github.com/demgod/Resource-Extension[/url]
Mine works without engine.GetAddons( ), namely because engine.GetAddons( ) will NOT work if your collection is private.. This resource.AddSingleFile's each file in gamemodes/<your gamemode name>/content/* dir and adds all *.gma in addons/ folder using resource.AddWorkshop... Additionally, for addons that you extracted ( to remove Lua due to backdoor, bad coding, or whatever ) and don't have the *.gma file in your addons folder anymore, you can create an empty file with the name : blah_blah_12345.gma in gamemodes/<your gamemode name>/content/workshop/ and the script will resource.AddWorkshop those files too ( using digits from the name )... Next version will include detection for maps so gma files with map files will be ignored ( as they're automatically added, or should be; alternatively I could not ignore them ) but functionality is built into my dev-base fileio to read the data... [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/setting_up_downloads_using_recursive_resource_system.lua.html[/url]
[QUOTE=Acecool;47472617]-snip-[/QUOTE] Is there a blacklist for .gma's you don't want to send to the client but still want to have on your server?
[QUOTE=code_gs;47472761]Is there a blacklist for .gma's you don't want to send to the client but still want to have on your server?[/QUOTE] Good idea!, Not yet but I'll add that to the next version with the skip-map-gma system!
snip
Sorry, you need to Log In to post a reply to this thread.