Browse Source

Move `DBAPI` from base realm into core realm

core_refactor
Anton Tarasenko 2 years ago
parent
commit
74be378e5e
  1. 5
      sources/BaseRealm/Global.uc
  2. 1
      sources/ClientRealm/ClientAcediaAdapter.uc
  3. 1
      sources/CoreRealm/AcediaAdapter.uc
  4. 2
      sources/CoreRealm/CoreGlobal.uc
  5. 1
      sources/ServerRealm/ServerAcediaAdapter.uc

5
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;

1
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'
}

1
sources/CoreRealm/AcediaAdapter.uc

@ -37,6 +37,7 @@ class AcediaAdapter extends AcediaObject
var public const class<SideEffectAPI> sideEffectAPIClass;
var public const class<TimeAPI> timeAPIClass;
var public const class<DBAPI> dbAPIClass;
defaultproperties
{

2
sources/CoreRealm/CoreGlobal.uc

@ -26,6 +26,7 @@ var protected class<AcediaAdapter> adapterClass;
var public SideEffectAPI sideEffects;
var public TimeAPI time;
var public DBAPI db;
var private LoggerAPI.Definition fatNoAdapterClass;
@ -78,6 +79,7 @@ protected function Initialize()
sideEffects =
SideEffectAPI(api.Allocate(adapterClass.default.sideEffectAPIClass));
time = TimeAPI(api.Allocate(adapterClass.default.timeAPIClass));
db = DBAPI(api.Allocate(adapterClass.default.dbAPIClass));
}
/**

1
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'

Loading…
Cancel
Save