diff --git a/sources/BaseRealm/Global.uc b/sources/BaseRealm/Global.uc index cc261a0..596e580 100644 --- a/sources/BaseRealm/Global.uc +++ b/sources/BaseRealm/Global.uc @@ -2,7 +2,7 @@ * Class for an object that will provide an access to a Acedia's functionality * that is common for both clients and servers by giving a reference to this * object to all Acedia's objects and actors, emulating a global API namespace. - * Copyright 2020-2022 Anton Tarasenko + * Copyright 2020-2023 Anton Tarasenko *------------------------------------------------------------------------------ * This file is part of Acedia. * @@ -39,7 +39,6 @@ var public ColorAPI color; var public UserAPI users; var public PlayersAPI players; var public JSONAPI json; -var public DBAPI db; var public SchedulerAPI scheduler; var public AvariceAPI avarice; @@ -76,7 +75,6 @@ protected function Initialize() chat = ChatAPI(memory.Allocate(class'ChatAPI')); users = UserAPI(memory.Allocate(class'UserAPI')); players = PlayersAPI(memory.Allocate(class'PlayersAPI')); - db = DBAPI(memory.Allocate(class'DBAPI')); scheduler = SchedulerAPI(memory.Allocate(class'SchedulerAPI')); avarice = AvariceAPI(memory.Allocate(class'AvariceAPI')); environment = AcediaEnvironment(memory.Allocate(class'AcediaEnvironment')); @@ -97,7 +95,6 @@ public function DropCoreAPI() users = none; players = none; json = none; - db = none; scheduler = none; avarice = none; default.myself = none; diff --git a/sources/ClientRealm/ClientAcediaAdapter.uc b/sources/ClientRealm/ClientAcediaAdapter.uc index 2fb3efa..f01b15a 100644 --- a/sources/ClientRealm/ClientAcediaAdapter.uc +++ b/sources/ClientRealm/ClientAcediaAdapter.uc @@ -29,6 +29,7 @@ defaultproperties { sideEffectAPIClass = class'KF1_SideEffectAPI' timeAPIClass = class'KF1_TimeAPI' + dbAPIClass = class'DBAPI' clientUnrealAPIClass = class'KF1_ClientUnrealAPI' clientInteractionAPIClass = class'KF1_InteractionAPI' } \ No newline at end of file diff --git a/sources/CoreRealm/AcediaAdapter.uc b/sources/CoreRealm/AcediaAdapter.uc index 66b856b..1b3ae94 100644 --- a/sources/CoreRealm/AcediaAdapter.uc +++ b/sources/CoreRealm/AcediaAdapter.uc @@ -37,6 +37,7 @@ class AcediaAdapter extends AcediaObject var public const class sideEffectAPIClass; var public const class timeAPIClass; +var public const class dbAPIClass; defaultproperties { diff --git a/sources/CoreRealm/CoreGlobal.uc b/sources/CoreRealm/CoreGlobal.uc index 807917a..a4aa24f 100644 --- a/sources/CoreRealm/CoreGlobal.uc +++ b/sources/CoreRealm/CoreGlobal.uc @@ -26,6 +26,7 @@ var protected class adapterClass; var public SideEffectAPI sideEffects; var public TimeAPI time; +var public DBAPI db; var private LoggerAPI.Definition fatNoAdapterClass; @@ -74,10 +75,11 @@ protected function Initialize() .ArgClass(self.class); return; } - api = class'Global'.static.GetInstance().memory; + api = class'Global'.static.GetInstance().memory; sideEffects = SideEffectAPI(api.Allocate(adapterClass.default.sideEffectAPIClass)); - time = TimeAPI(api.Allocate(adapterClass.default.timeAPIClass)); + time = TimeAPI(api.Allocate(adapterClass.default.timeAPIClass)); + db = DBAPI(api.Allocate(adapterClass.default.dbAPIClass)); } /** diff --git a/sources/ServerRealm/ServerAcediaAdapter.uc b/sources/ServerRealm/ServerAcediaAdapter.uc index 87690b4..4bcac4a 100644 --- a/sources/ServerRealm/ServerAcediaAdapter.uc +++ b/sources/ServerRealm/ServerAcediaAdapter.uc @@ -32,6 +32,7 @@ defaultproperties { sideEffectAPIClass = class'KF1_SideEffectAPI' timeAPIClass = class'KF1_TimeAPI' + dbAPIClass = class'DBAPI' serverUnrealAPIClass = class'KF1_ServerUnrealAPI' serverBroadcastAPIClass = class'KF1_BroadcastAPI' serverGameRulesAPIClass = class'KF1_GameRulesAPI'