Shtoyan 2 years ago
parent
commit
054c3b6045
  1. 5
      sources/GameModes/GameMode.uc
  2. 2
      sources/MapList/MapList.uc
  3. 7
      sources/MapList/MapList_Feature.uc
  4. 6
      sources/StartUp.uc

5
sources/GameModes/GameMode.uc

@ -38,8 +38,6 @@ var protected config string acronym;
// Map prefix - only maps that start with specified prefix will be voteable for
// this game mode (plain string)
var protected config string mapPrefix;
// TODO
var protected config string mapList;
// Aliases are an unnecessary overkill for difficulty names, so just define
// them in special `string` arrays.
@ -60,7 +58,6 @@ protected function DefaultIt()
gameTypeClass = "KFMod.KFGameType";
acronym = "";
mapPrefix = "KF";
mapList = "defaultHard";
includeFeature.length = 0;
excludeFeature.length = 0;
includeMutator.length = 0;
@ -80,7 +77,6 @@ protected function HashTable ToData()
result.SetString(P("gameTypeClass"), gameTypeClass);
result.SetString(P("acronym"), acronym);
result.SetString(P("mapPrefix"), mapPrefix);
result.SetString(P("mapList"), mapList);
nextArray = _.collections.EmptyArrayList();
for (i = 0; i < option.length; i += 1)
@ -110,7 +106,6 @@ protected function FromData(HashTable source)
gameTypeClass = source.GetString(P("gameTypeClass"));
acronym = source.GetString(P("acronym"));
mapPrefix = source.GetString(P("mapPrefix"));
mapList = source.GetString(P("mapList"));
nextArray = source.GetArrayList(P("option"));
if (nextArray == none) {

2
sources/MapList.uc → sources/MapList/MapList.uc

@ -1,4 +1,4 @@
class MapList extends AcediaConfig
class MapList extends FeatureConfig
perObjectConfig
config(AcediaMaps);

7
sources/MapList/MapList_Feature.uc

@ -0,0 +1,7 @@
class MapList_Feature extends Feature;
defaultproperties {
configClass = class'MapList'
}

6
sources/StartUp.uc

@ -50,6 +50,7 @@ private function InitializeServer()
{
local int i;
local GameMode currentGameMode;
local MapList_Feature mapListFeature;
local array<Packages.FeatureConfigPair> availableFeatures;
if (class'Packages'.default.clientside) {
@ -79,6 +80,11 @@ private function InitializeServer()
}
}
EnableFeatures(availableFeatures);
mapListFeature = MapList_Feature(class'MapList_Feature'.static.GetEnabledInstance());
if (mapListFeature != none) {
warn("aaaaaaaa");
}
}
// Checks whether Acedia has left garbage after the previous map.

Loading…
Cancel
Save