diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 02f8c521aa6..58dc3affe2a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -40,6 +40,7 @@ var/Ticklag = 0.9 var/Tickcomp = 0 var/socket_talk = 0 // use socket_talk to communicate with other processes + var/list/resource_urls = null var/list/mode_names = list() var/list/modes = list() // allowed modes @@ -164,6 +165,9 @@ if(type == "config") switch (name) + if ("resource_urls") + config.resource_urls = stringsplit(value, " ") + if ("admin_legacy_system") config.admin_legacy_system = 1 diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index d93dbd6f595..c85ee0159c6 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -39,3 +39,5 @@ var/player_age = "Requires database" //So admins know why it isn't working - Used to determine how old the account is - in days. var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id + + preload_rsc = 0 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server. diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 16b0fbea6cb..b74355c2713 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -103,6 +103,14 @@ del(src) return + // Change the way they should download resources. + if(config.resource_urls) + src.preload_rsc = pick(config.resource_urls) + else src.preload_rsc = 1 // If config.resource_urls is not set, preload like normal. + + src << "\red If the title screen is black, resources are still downloading. Please be patient until the title screen appears." + + clients += src directory[ckey] = src @@ -278,4 +286,4 @@ 'icons/xenoarch_icons/chart2.jpg', 'icons/xenoarch_icons/chart3.jpg', 'icons/xenoarch_icons/chart4.jpg' - ) \ No newline at end of file + ) diff --git a/config/config.txt b/config/config.txt index a98daab8423..e5bccd964c5 100644 --- a/config/config.txt +++ b/config/config.txt @@ -213,3 +213,7 @@ ALIEN_PLAYER_RATIO 0.2 ##Remove the # to let ghosts spin chairs #GHOST_INTERACTION + +## Uncomment this to enable external .rsc downloads. URLs must be separated by no more than one space. +## The linked .zip file should contain the required .rsc +#resource_urls http://firstserver.org/myresource.zip http://secondserver.org/myresource.zip http://10.22.11.1/myresource.zip