From 054c3b604570a8f54bb6673e2f0c64f12ec719c9 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Tue, 7 Mar 2023 19:27:17 +0400 Subject: [PATCH] a --- sources/GameModes/GameMode.uc | 5 ----- sources/{ => MapList}/MapList.uc | 2 +- sources/MapList/MapList_Feature.uc | 7 +++++++ sources/StartUp.uc | 6 ++++++ 4 files changed, 14 insertions(+), 6 deletions(-) rename sources/{ => MapList}/MapList.uc (96%) create mode 100644 sources/MapList/MapList_Feature.uc diff --git a/sources/GameModes/GameMode.uc b/sources/GameModes/GameMode.uc index 492929c..5eeff6e 100644 --- a/sources/GameModes/GameMode.uc +++ b/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) { diff --git a/sources/MapList.uc b/sources/MapList/MapList.uc similarity index 96% rename from sources/MapList.uc rename to sources/MapList/MapList.uc index 299b63f..ea4bf6e 100644 --- a/sources/MapList.uc +++ b/sources/MapList/MapList.uc @@ -1,4 +1,4 @@ -class MapList extends AcediaConfig +class MapList extends FeatureConfig perObjectConfig config(AcediaMaps); diff --git a/sources/MapList/MapList_Feature.uc b/sources/MapList/MapList_Feature.uc new file mode 100644 index 0000000..c36057e --- /dev/null +++ b/sources/MapList/MapList_Feature.uc @@ -0,0 +1,7 @@ +class MapList_Feature extends Feature; + + + +defaultproperties { + configClass = class'MapList' +} \ No newline at end of file diff --git a/sources/StartUp.uc b/sources/StartUp.uc index 478883d..87ee756 100644 --- a/sources/StartUp.uc +++ b/sources/StartUp.uc @@ -50,6 +50,7 @@ private function InitializeServer() { local int i; local GameMode currentGameMode; + local MapList_Feature mapListFeature; local array 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.