Răsfoiți Sursa

Add native workshop support

To add on the instruction page:
To get the workshop auth code, go to http://steamcommunity.com/dev/apikey and generate a code.
To get the workshop collection id, take the URL, for example http://steamcommunity.com/sharedfiles/filedetails/?id=123456789, and use the trailing numbers for the id value.
Scarsz 12 ani în urmă
părinte
comite
101fda4d8b
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      GarrysMod/gmodserver

+ 6 - 2
GarrysMod/gmodserver

@@ -16,6 +16,10 @@ email="email@example.com"
 steamuser="anonymous"
 steampass=""
 
+# Workshop Variables
+workshopauth=""
+workshopcollectionid=""
+
 # Start Variables
 defaultmap="gm_construct"
 maxplayers="16"
@@ -26,7 +30,7 @@ ip="0.0.0.0"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} +host_workshop_collection ${workshopcollectionid} -authkey {workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
 }
 
 #### Advanced Variables ####
@@ -863,4 +867,4 @@ case "$1" in
 	echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}"
 	exit 1;;
 esac
-exit
+exit