Skip to content

Commit

Permalink
Add extendedServerDetailsClassName functionality back
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtoyan committed Apr 13, 2023
1 parent a105288 commit 1c96968
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Classes/CSDMasterServerUplink.uc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ var config string playerAwaitingNicknamePattern;
var config string playerAliveNicknamePattern;
// change color keys (like ^2 or ^6) to real colors
var config bool bColorNicknames;
var config array<string> extendedServerDetailsClassName;

var public GameInfo.serverResponseLine srl;
var public AdditionalServerDetails AdditionalSD;
Expand Down Expand Up @@ -112,11 +113,26 @@ event Refresh() {}
// STARTUP
// ==========================================================================
event postBeginPlay() {
// add to the game special custom GameRules
// so these GameRules will add extra details on the server description
local int i;
local class<base_GR> additionalGameRule;

// add custom GameRule for extra details on the server description
if (AdditionalSD == none) {
AdditionalSD = spawn(class'AdditionalServerDetails');
}
// add to the game special custom GameRules
// so these GameRules will add extra details on the server description
for (i = 0; i < extendedServerDetailsClassName.length; i++)
{
additionalGameRule = class<base_GR>(dynamicLoadObject(extendedServerDetailsClassName[i], class'class'));

if (additionalGameRule == none) {
warn("Class '" $ extendedServerDetailsClassName[i] $ "' (extendedServerDetailsClassName) wasn't found.");
continue;
}
spawn(additionalGameRule);
}

// cache everything at this step
CacheManager.InitCaching(self);
// start the timer with config delay
Expand Down

0 comments on commit 1c96968

Please sign in to comment.