C# Class WhiteCore.Modules.FileBasedSimulationData

FileBased DataStore, do not store anything in any databases, instead save .sim files for it
Inheritance: ISimulationDataStore, IDisposable
Afficher le fichier Open project: WhiteCoreSim/WhiteCore-Dev

Protected Properties

Свойство Type Description
_oldRegionLoader IRegionDataLoader
_regionData RegionData
_regionLoader IRegionDataLoader
defaultDataPath string
m_backupSaveTimer System.Timers.Timer
m_displayNotSavingNotice bool
m_fileName string
m_keepOldSave bool
m_mapcenter_x int
m_mapcenter_y int
m_oldSaveDirectory string
m_oldSaveHasBeenSaved bool
m_regionNameSeed string[]
m_removeArchiveDays int
m_requiresSave bool
m_saveBackupChanges bool
m_saveBackups bool
m_saveChanges bool
m_saveLock object
m_saveTimer System.Timers.Timer
m_scene IScene
m_shutdown bool
m_storeDirectory string
m_timeBetweenBackupSaves int
m_timeBetweenSaves int

Méthodes publiques

Méthode Description
CacheDispose ( ) : void
CleanupRegionBackups ( IScene scene, string cmds ) : void

Cleanups the old region backups.

Copy ( ) : ISimulationDataStore
CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
CreateNewRegion ( ISimulationBase simBase, WhiteCore.Framework.SceneInfo.RegionInfo regionInfo, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo

Initializes a new region using the passed regioninfo

CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
DeleteUpOldArchives ( int daysOld ) : void
Dispose ( ) : void
FileBasedSimulationData ( ) : System
FindBackupRegionFiles ( ) : List
FindRegionBackupFiles ( string regionName ) : List
FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
ForceBackup ( ) : void
GetLastBackupFileName ( string regionName ) : string
Initialise ( ) : void
LoadLandObjects ( ) : List

Around for legacy things

LoadObjects ( ) : List
LoadRegionInfo ( string fileName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RemoveRegion ( ) : void
RestoreBackupFile ( string fileName, string regionName ) : bool
RestoreLastBackup ( string regionName ) : bool

Restores the last backup.

SetRegion ( IScene scene ) : void
Shutdown ( ) : void
Tainted ( ) : void
UpdateRegionInfo ( IScene scene, string cmds ) : void

Updates the region info, allowing for changes etc.

UpdateRegionPrims ( IScene scene, string cmds ) : void

Sets the region prim capacity.

Méthodes protégées

Méthode Description
ReadBackup ( string fileName ) : void
ReadConfig ( ISimulationBase simBase ) : void

Read the config for the data loader

SaveBackup ( bool isOldSave ) : void

Save a backup of the sim

SerializeDateTime ( ) : string
UpdateRegionCapacity ( ) : void
m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup into the oldSaveDirectory on the timer event

m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup on the timer event

Private Methods

Méthode Description
BuildOldSaveFileName ( ) : string
BuildSaveFileName ( ) : string
BuildSaveFileName ( string name ) : string
CreateRegionFromConsole ( WhiteCore.Framework.SceneInfo.RegionInfo info, bool prompt, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo

Creates/updates a region from console.

GetRegionArchives ( ) : List

Gets any region preset OAR files.

GetRegionLocation ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the region location.

GetRegionName ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the name of the region.

GetRegionOptional ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the region optional settings.

GetRegionSize ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the size of the region.

ModifyRegionSettings ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo, bool advanced ) : bool

Modifies the region settings.

ReadFromData ( byte data ) : ITerrainChannel
WhiteCoreEventManager_OnGenericEvent ( string FunctionName, object parameters ) : object

Look for the backup event, and if it is there, trigger the backup of the sim

WriteTerrainToStream ( ITerrainChannel tModule ) : byte[]

Method Details

CacheDispose() public méthode

public CacheDispose ( ) : void
Résultat void

CleanupRegionBackups() public méthode

Cleanups the old region backups.
public CleanupRegionBackups ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Résultat void

Copy() public méthode

public Copy ( ) : ISimulationDataStore
Résultat ISimulationDataStore

CreateNewRegion() public méthode

public CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase
currentInfo int>.Dictionary
Résultat WhiteCore.Framework.SceneInfo.RegionInfo

CreateNewRegion() public méthode

Initializes a new region using the passed regioninfo
public CreateNewRegion ( ISimulationBase simBase, WhiteCore.Framework.SceneInfo.RegionInfo regionInfo, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase Sim base.
regionInfo WhiteCore.Framework.SceneInfo.RegionInfo Region info.
currentInfo int>.Dictionary Current region info.
Résultat WhiteCore.Framework.SceneInfo.RegionInfo

CreateNewRegion() public méthode

public CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase
regionName string
currentInfo int>.Dictionary
Résultat WhiteCore.Framework.SceneInfo.RegionInfo

DeleteUpOldArchives() public méthode

public DeleteUpOldArchives ( int daysOld ) : void
daysOld int
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FileBasedSimulationData() public méthode

public FileBasedSimulationData ( ) : System
Résultat System

FindBackupRegionFiles() public méthode

public FindBackupRegionFiles ( ) : List
Résultat List

FindRegionBackupFiles() public méthode

public FindRegionBackupFiles ( string regionName ) : List
regionName string
Résultat List

FindRegionInfos() public méthode

public FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
newRegion bool
simBase ISimulationBase
Résultat List

ForceBackup() public méthode

public ForceBackup ( ) : void
Résultat void

GetLastBackupFileName() public méthode

public GetLastBackupFileName ( string regionName ) : string
regionName string
Résultat string

Initialise() public méthode

public Initialise ( ) : void
Résultat void

LoadLandObjects() public méthode

Around for legacy things
public LoadLandObjects ( ) : List
Résultat List

LoadObjects() public méthode

public LoadObjects ( ) : List
Résultat List

LoadRegionInfo() public méthode

public LoadRegionInfo ( string fileName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
fileName string
simBase ISimulationBase
Résultat WhiteCore.Framework.SceneInfo.RegionInfo

LoadRegionNameInfo() public méthode

public LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
regionName string
simBase ISimulationBase
Résultat WhiteCore.Framework.SceneInfo.RegionInfo

LoadTerrain() public méthode

public LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
Résultat void

LoadWater() public méthode

public LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
Résultat void

ReadBackup() protected méthode

protected ReadBackup ( string fileName ) : void
fileName string
Résultat void

ReadConfig() protected méthode

Read the config for the data loader
protected ReadConfig ( ISimulationBase simBase ) : void
simBase ISimulationBase
Résultat void

RemoveRegion() public méthode

public RemoveRegion ( ) : void
Résultat void

RestoreBackupFile() public méthode

public RestoreBackupFile ( string fileName, string regionName ) : bool
fileName string
regionName string
Résultat bool

RestoreLastBackup() public méthode

Restores the last backup.
public RestoreLastBackup ( string regionName ) : bool
regionName string Region name.
Résultat bool

SaveBackup() protected méthode

Save a backup of the sim
protected SaveBackup ( bool isOldSave ) : void
isOldSave bool
Résultat void

SerializeDateTime() protected méthode

protected SerializeDateTime ( ) : string
Résultat string

SetRegion() public méthode

public SetRegion ( IScene scene ) : void
scene IScene
Résultat void

Shutdown() public méthode

public Shutdown ( ) : void
Résultat void

Tainted() public méthode

public Tainted ( ) : void
Résultat void

UpdateRegionCapacity() protected méthode

protected UpdateRegionCapacity ( ) : void
Résultat void

UpdateRegionInfo() public méthode

Updates the region info, allowing for changes etc.
public UpdateRegionInfo ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Résultat void

UpdateRegionPrims() public méthode

Sets the region prim capacity.
public UpdateRegionPrims ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Résultat void

m_backupSaveTimer_Elapsed() protected méthode

Save a backup into the oldSaveDirectory on the timer event
protected m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
Résultat void

m_saveTimer_Elapsed() protected méthode

Save a backup on the timer event
protected m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
Résultat void

Property Details

_oldRegionLoader protected_oe property

protected IRegionDataLoader _oldRegionLoader
Résultat IRegionDataLoader

_regionData protected_oe property

protected RegionData,WhiteCore.Modules _regionData
Résultat RegionData

_regionLoader protected_oe property

protected IRegionDataLoader _regionLoader
Résultat IRegionDataLoader

defaultDataPath protected_oe property

protected string defaultDataPath
Résultat string

m_backupSaveTimer protected_oe property

protected Timer,System.Timers m_backupSaveTimer
Résultat System.Timers.Timer

m_displayNotSavingNotice protected_oe property

protected bool m_displayNotSavingNotice
Résultat bool

m_fileName protected_oe property

protected string m_fileName
Résultat string

m_keepOldSave protected_oe property

protected bool m_keepOldSave
Résultat bool

m_mapcenter_x protected_oe property

protected int m_mapcenter_x
Résultat int

m_mapcenter_y protected_oe property

protected int m_mapcenter_y
Résultat int

m_oldSaveDirectory protected_oe property

protected string m_oldSaveDirectory
Résultat string

m_oldSaveHasBeenSaved protected_oe property

protected bool m_oldSaveHasBeenSaved
Résultat bool

m_regionNameSeed protected_oe property

protected string[] m_regionNameSeed
Résultat string[]

m_removeArchiveDays protected_oe property

protected int m_removeArchiveDays
Résultat int

m_requiresSave protected_oe property

protected bool m_requiresSave
Résultat bool

m_saveBackupChanges protected_oe property

protected bool m_saveBackupChanges
Résultat bool

m_saveBackups protected_oe property

protected bool m_saveBackups
Résultat bool

m_saveChanges protected_oe property

protected bool m_saveChanges
Résultat bool

m_saveLock protected_oe property

protected object m_saveLock
Résultat object

m_saveTimer protected_oe property

protected Timer,System.Timers m_saveTimer
Résultat System.Timers.Timer

m_scene protected_oe property

protected IScene m_scene
Résultat IScene

m_shutdown protected_oe property

protected bool m_shutdown
Résultat bool

m_storeDirectory protected_oe property

protected string m_storeDirectory
Résultat string

m_timeBetweenBackupSaves protected_oe property

protected int m_timeBetweenBackupSaves
Résultat int

m_timeBetweenSaves protected_oe property

protected int m_timeBetweenSaves
Résultat int