add validation flagging for server objects

sets up a generic `ServerAssetValidator` PersistenceManager onServerCreated and saves anything marked dirty after processing. demonstrates looking that up and setting something dirty via shapebase::preload asset tagging
This commit is contained in:
AzaezelX 2020-12-16 21:31:54 -06:00
parent b2495fe957
commit 6408297eb9
2 changed files with 9 additions and 0 deletions

View file

@ -185,6 +185,7 @@ function createServer(%serverType, %levelAsset)
function onServerCreated()
{
new PersistenceManager( ServerAssetValidator );
// Server::GameType is sent to the master server.
// This variable should uniquely identify your game and/or mod.
$Server::GameType = $appName;
@ -208,6 +209,7 @@ function onServerCreated()
// Keep track of when the game started
$Game::StartTime = $Sim::Time;
ServerAssetValidator.saveDirty();
}
/// Shut down the server