diff --git a/config/AcediaGameModes.ini b/config/AcediaGameModes.ini index 951715e..90d43f6 100644 --- a/config/AcediaGameModes.ini +++ b/config/AcediaGameModes.ini @@ -1,7 +1,9 @@ [hard GameMode] title={$green Hard difficulty} difficulty=hard +mapList=defaultHard [hell GameMode] title={$crimson Hell On Earth} difficulty=hoe +mapList=defaultHOE diff --git a/config/AcediaLauncher.ini b/config/AcediaLauncher.ini index f347ad6..31c1bc4 100644 --- a/config/AcediaLauncher.ini +++ b/config/AcediaLauncher.ini @@ -1,2 +1,2 @@ [AcediaLauncher.Packages] -useGameModes=false \ No newline at end of file +useGameModes=true \ No newline at end of file diff --git a/config/AcediaMaps.ini b/config/AcediaMaps.ini new file mode 100644 index 0000000..5535019 --- /dev/null +++ b/config/AcediaMaps.ini @@ -0,0 +1,3 @@ +[defaultHard MapList] + +[defaultHOE MapList] \ No newline at end of file diff --git a/sources/GameModes/GameMode.uc b/sources/GameModes/GameMode.uc index 13589bd..492929c 100644 --- a/sources/GameModes/GameMode.uc +++ b/sources/GameModes/GameMode.uc @@ -38,6 +38,8 @@ 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. @@ -58,6 +60,7 @@ protected function DefaultIt() gameTypeClass = "KFMod.KFGameType"; acronym = ""; mapPrefix = "KF"; + mapList = "defaultHard"; includeFeature.length = 0; excludeFeature.length = 0; includeMutator.length = 0; @@ -77,6 +80,8 @@ 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) { @@ -103,9 +108,11 @@ protected function FromData(HashTable source) return; } gameTypeClass = source.GetString(P("gameTypeClass")); - acronym = source.GetString(P("acronym")); - mapPrefix = source.GetString(P("mapPrefix")); - nextArray = source.GetArrayList(P("option")); + acronym = source.GetString(P("acronym")); + mapPrefix = source.GetString(P("mapPrefix")); + mapList = source.GetString(P("mapList")); + + nextArray = source.GetArrayList(P("option")); if (nextArray == none) { return; } @@ -271,6 +278,8 @@ defaultproperties hardSynonyms(0) = "harder" // "hard" is prefix of this, so it will count hardSynonyms(1) = "difficult" suicidalSynonyms(0) = "suicidal" + // DONE! + suicidalSynonyms(1) = "sui" hoeSynonyms(0) = "hellonearth" hoeSynonyms(1) = "hellon earth" hoeSynonyms(2) = "hell onearth" diff --git a/sources/MapList.uc b/sources/MapList.uc new file mode 100644 index 0000000..299b63f --- /dev/null +++ b/sources/MapList.uc @@ -0,0 +1,55 @@ +class MapList extends AcediaConfig + perObjectConfig + config(AcediaMaps); + +var public config array map; + +protected function HashTable ToData() { + local int i; + local ArrayList mapArray; + local HashTable result; + + result = _.collections.EmptyHashTable(); + mapArray = _.collections.EmptyArrayList(); + + for (i = 0; i < map.length; i += 1) { + mapArray.AddString(map[i]); + } + + result.SetItem(P("maps"), mapArray); + _.memory.Free(mapArray); + + return result; +} + +protected function FromData(HashTable source) { + local int i; + local ArrayList mapArray; + + if (source == none) { + return; + } + + mapArray = source.GetArrayList(P("maps")); + if (mapArray == none) { + return; + } + + map.length = 0; + for (i = 0; i < mapArray.GetLength(); i += 1) { + map[map.length] = mapArray.GetString(i); + } + _.memory.Free(mapArray); +} + +protected function DefaultIt() { + map[0] = "KF-BioticsLab"; + map[1] = "KF-Farm"; + map[2] = "KF-Manor"; + map[3] = "KF-Offices"; + map[4] = "KF-WestLondon"; +} + +defaultproperties { + configName = "AcediaMaps" +} \ No newline at end of file diff --git a/sources/Packages.uc b/sources/Packages.uc index c28269f..a3a3523 100644 --- a/sources/Packages.uc +++ b/sources/Packages.uc @@ -25,7 +25,7 @@ class Packages extends Object var public config bool clientside; // Array of predefined services that must be started along with Acedia mutator. var public config array package; -// Set to `true` to activate Acedia's game modes systemj.kl; +// Set to `true` to activate Acedia's game modes system var public config bool useGameModes; struct FeatureConfigPair diff --git a/sources/VotingHandlerAdapter.uc b/sources/VotingHandlerAdapter.uc index d0538d1..94fa11e 100644 --- a/sources/VotingHandlerAdapter.uc +++ b/sources/VotingHandlerAdapter.uc @@ -102,6 +102,7 @@ protected function Finalizer() * Backup of replaced configs is made internally, so that they can be restored * on map change. */ +// TODO ADD ME! public final function InjectIntoVotingHandler() { local int i;