diff --git a/sources/GameModes/BaseGameMode.uc b/sources/GameModes/BaseGameMode.uc index 3b7a017..7b45f1e 100644 --- a/sources/GameModes/BaseGameMode.uc +++ b/sources/GameModes/BaseGameMode.uc @@ -44,6 +44,8 @@ var protected config array includeFeature; // `Feature`s to exclude from game mode, regardless of other settings // (this one has highest priority) var protected config array excludeFeature; +// Lists of maps to include for this game mode +var protected config array includeMaps; struct FeatureConfigPair { @@ -75,17 +77,23 @@ protected function HashTable ToData() _.memory.Free(nextArray); nextArray = _.collections.EmptyArrayList(); for (i = 0; i < excludeFeature.length; i += 1) { - nextArray.AddItem(_.text.FromString(excludeFeature[i])); + nextArray.AddString(excludeFeature[i]); } result.SetItem(P("excludeFeature"), nextArray); _.memory.Free(nextArray); nextArray = _.collections.EmptyArrayList(); for (i = 0; i < includeMutator.length; i += 1) { - nextArray.AddItem(_.text.FromString(includeFeature[i])); + nextArray.AddString(includeFeature[i]); } result.SetItem(P("includeMutator"), nextArray); _.memory.Free(nextArray); nextArray = _.collections.EmptyArrayList(); + for (i = 0; i < includeMaps.length; i += 1) { + nextArray.AddString(includeMaps[i]); + } + result.SetItem(P("includeMaps"), nextArray); + _.memory.Free(nextArray); + nextArray = _.collections.EmptyArrayList(); for (i = 0; i < includeFeatureAs.length; i += 1) { nextPair = _.collections.EmptyHashTable(); @@ -120,6 +128,9 @@ protected function FromData(HashTable source) nextArray = source.GetArrayList(P("includeMutator")); includeMutator = DynamicIntoStringArray(nextArray); _.memory.Free(nextArray); + nextArray = source.GetArrayList(P("includeMaps")); + includeMaps = DynamicIntoStringArray(nextArray); + _.memory.Free(nextArray); nextArray = source.GetArrayList(P("includeFeatureAs")); if (nextArray == none) { return;