Compare commits

..

No commits in common. 'e8ae6fd8d16dc51d22ad4f5525c5399a447e9f69' and 'ff31ef24728557cbfecc4f3d109f5e317af80e1d' have entirely different histories.

  1. 4
      sources/BaseAPI/API/Commands/Voting/Voting.uc
  2. 2
      sources/BaseAPI/API/Unflect/UnflectApi.uc
  3. 25
      sources/Data/Database/DBAPI.uc

4
sources/BaseAPI/API/Commands/Voting/Voting.uc

@ -526,6 +526,7 @@ public final function PrintVotingInfoFor(EPlayer requester) {
/// Override this to perform necessary logic after voting has succeeded.
protected function Execute(HashTable arguments) {}
/// Fill `currentAnnouncements` here!!!
/// Override this method to:
///
/// 1. Specify any of the messages inside `currentAnnouncements` to fit passed
@ -828,8 +829,7 @@ private final function AnnounceOutcome(BaseText outcomeMessage, optional EPlayer
currentPlayers = _.players.GetAll();
for (i = 0; i < currentPlayers.length; i += 1) {
writer = currentPlayers[i].BorrowConsole();
writer.Write(editedOutcomeMessage);
writer.Write(P(" / "));
writer.WriteLine(editedOutcomeMessage);
writer.WriteLine(summaryLine);
currentPlayers[i].Notify(editedOutcomeMessage, summaryLine,, P("voting"));
}

2
sources/BaseAPI/API/Unflect/UnflectApi.uc

@ -67,7 +67,6 @@ public final function _drop() {
// Drop is called when Acedia is shutting down, so releasing references isn't necessary
iter = HashTableIterator(completedReplacements.Iterate());
while (!iter.HasFinished()) {
nextFunctionInstance = none;
nextFunctionName = Text(iter.GetKey());
nextSources = ByteArrayBox(originalScriptCodes.GetItem(nextFunctionName));
if (nextSources != none ) {
@ -76,7 +75,6 @@ public final function _drop() {
if (nextFunctionInstance != none) {
nextFunctionInstance.script = nextSources.Get();
}
iter.Next();
}
}

25
sources/Data/Database/DBAPI.uc

@ -250,49 +250,48 @@ public final function LocalDatabaseInstance LoadLocal(BaseText databaseName)
local DBRecord rootRecord;
local Text rootRecordName;
local LocalDatabase newConfig;
local LocalDatabaseInstance newLocalDBInstance, result;
local LocalDatabaseInstance newLocalDBInstance;
local Text dbKey;
if (databaseName == none) {
return none;
}
CreateLocalDBMapIfMissing();
dbKey = databaseName.Copy();
if (loadedLocalDatabases.HasKey(dbKey))
if (loadedLocalDatabases.HasKey(databaseName))
{
result = LocalDatabaseInstance(loadedLocalDatabases.GetItem(dbKey));
_.memory.Free(dbKey);
return result;
return LocalDatabaseInstance(loadedLocalDatabases
.GetItem(databaseName));
}
// No need to check `dbKey` for being valid,
// No need to check `databaseName` for being valid,
// since `Load()` will just return `none` if it is not.
newConfig = class'LocalDatabase'.static.Load(dbKey);
newConfig = class'LocalDatabase'.static.Load(databaseName);
if (newConfig == none) {
_.memory.Free(dbKey);
return none;
}
if (!newConfig.HasDefinedRoot() && !newConfig.ShouldCreateIfMissing()) {
_.memory.Free(dbKey);
return none;
}
newLocalDBInstance = LocalDatabaseInstance(_.memory.Allocate(localDBClass));
dbKey = databaseName.Copy();
loadedLocalDatabases.SetItem(dbKey, newLocalDBInstance);
dbKey.FreeSelf();
if (newConfig.HasDefinedRoot())
{
rootRecordName = newConfig.GetRootName();
rootRecord = class'DBRecord'.static.LoadRecord(rootRecordName, dbKey);
rootRecord = class'DBRecord'.static
.LoadRecord(rootRecordName, databaseName);
}
else
{
rootRecord = class'DBRecord'.static.NewRecord(dbKey);
rootRecord = class'DBRecord'.static.NewRecord(databaseName);
rootRecordName = _.text.FromString(string(rootRecord.name));
newConfig.SetRootName(rootRecordName);
newConfig.Save();
}
newLocalDBInstance.Initialize(newConfig, rootRecord);
_.logger.Auto(infoLocalDatabaseLoaded).Arg(dbKey);
_.logger.Auto(infoLocalDatabaseLoaded).Arg(databaseName.Copy());
_.memory.Free(rootRecordName);
_.memory.Free(newLocalDBInstance);
return newLocalDBInstance;
}

Loading…
Cancel
Save