From 83f137c0635306c6b6f09d987d17d4b5bcc9e9e6 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Fri, 15 Jul 2022 20:37:04 +0700 Subject: [PATCH 1/3] Change to new AcediaCore collections --- sources/GameModes/GameMode.uc | 10 +++++----- sources/VotingHandlerAdapter.uc | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sources/GameModes/GameMode.uc b/sources/GameModes/GameMode.uc index 6e37490..7c869be 100644 --- a/sources/GameModes/GameMode.uc +++ b/sources/GameModes/GameMode.uc @@ -167,13 +167,13 @@ public function ReportBadOptions() } /** - * @return Server options as key-value pairs in an `AssociativeArray`. + * @return Server options as key-value pairs in an `HashTable`. */ -public function AssociativeArray GetOptions() +public function HashTable GetOptions() { - local int i; - local AssociativeArray result; - result = _.collections.EmptyAssociativeArray(); + local int i; + local HashTable result; + result = _.collections.EmptyHashTable(); for (i = 0; i < option.length; i += 1) { if (!ValidateServerURLName(option[i].key)) continue; diff --git a/sources/VotingHandlerAdapter.uc b/sources/VotingHandlerAdapter.uc index 04be56f..bb73010 100644 --- a/sources/VotingHandlerAdapter.uc +++ b/sources/VotingHandlerAdapter.uc @@ -170,19 +170,18 @@ private function string BuildOptionsString(GameMode gameMode) local string result; local string nextKey, nextValue; local CollectionIterator iter; - local AssociativeArray options; + local HashTable options; options = gameMode.GetOptions(); for (iter = options.Iterate(); !iter.HasFinished(); iter.Next()) { - nextKey = Text(iter.GetKey()).ToString(); - nextValue = Text(iter.Get()).ToString(); + nextKey = _.text.ToString(Text(iter.GetKey())); + nextValue = _.text.ToString(Text(iter.Get())); if (optionWasAdded) { result $= "?"; } result $= (nextKey $ "=" $ nextValue); optionWasAdded = true; } - options.Empty(true); options.FreeSelf(); iter.FreeSelf(); return result; From 51beae9849cf01ece356839722866790717906be Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 17 Jul 2022 02:30:35 +0700 Subject: [PATCH 2/3] Change to support Acedia's new shutdown proces --- sources/Packages.uc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/Packages.uc b/sources/Packages.uc index cfe9ce4..9f984df 100644 --- a/sources/Packages.uc +++ b/sources/Packages.uc @@ -81,6 +81,7 @@ private simulated function InitializeClient() return; } default.selfReference = self; + // TODO: Swap these around after dealing with aliases class'ClientLevelCore'.static.CreateLevelCore(self); _ = class'Global'.static.GetInstance(); } @@ -103,6 +104,7 @@ private function InitializeServer() } default.selfReference = self; // Launch and setup core Acedia + // TODO: Swap these around after dealing with aliases serverCore = class'ServerLevelCore'.static.CreateLevelCore(self); _ = class'Global'.static.GetInstance(); _server = class'ServerGlobal'.static.GetInstance(); @@ -148,9 +150,7 @@ function ServerTraveling(string URL, bool bItems) votingAdapter = none; } default.selfReference = none; - _.environment.DisableAllFeatures(); - class'UnrealService'.static.Require().Destroy(); - class'ServerLevelCore'.static.GetInstance().Destroy(); + _.environment.ShutDown(); if (nextMutator != none) { nextMutator.ServerTraveling(URL, bItems); } From 7f7221e1b75a3f4d3dc14fbca7461ae1d10a19dc Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 18 Jul 2022 02:03:08 +0700 Subject: [PATCH 3/3] Change to use `ServerUnrealAPI` instead --- sources/Packages.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Packages.uc b/sources/Packages.uc index 9f984df..e87d703 100644 --- a/sources/Packages.uc +++ b/sources/Packages.uc @@ -224,8 +224,8 @@ private function EnableFeatures(array features) // Fetches and sets up signals that `Mutator` needs to provide private function SetupMutatorSignals() { - local UnrealService service; - service = UnrealService(class'UnrealService'.static.Require()); + local ServerUnrealService service; + service = ServerUnrealService(class'ServerUnrealService'.static.Require()); onMutateSignal = Mutator_OnMutate_Signal( service.GetSignal(class'Mutator_OnMutate_Signal')); onModifyLoginSignal = Mutator_OnModifyLogin_Signal(