/// <summary> /// Initialises the interop values between this application and TRGE. /// </summary> /// <param name="applicationID">The ID for this application, used in the application config file name.</param> /// <param name="modificationStamp">The text to inject into the passport and inventory titles to show that this application has modified the game.</param> /// <param name="version">The current version of the executing assembly e.g. 1.0.0</param> /// <param name="taggedVersion">The tagged version of the current release e.g. 1.0.0-beta</param> public void Initialise(string applicationID, string modificationStamp, string version, string taggedVersion) { TRInterop.ExecutingVersionName = applicationID; TRInterop.ScriptModificationStamp = modificationStamp; TRInterop.ExecutingVersion = version; TRInterop.TaggedVersion = taggedVersion; TRInterop.RandomisationSupported = true; TRLevelEditorFactory.RegisterEditor(TRVersion.TR2, typeof(TR2LevelRandomizer)); TRLevelEditorFactory.RegisterEditor(TRVersion.TR2G, typeof(TR2LevelRandomizer)); }
/// <summary> /// Initialises the interop values between this application and TRGE. /// </summary> /// <param name="applicationID">The ID for this application, used in the application config file name.</param> /// <param name="version">The current version of the executing assembly e.g. 1.0.0</param> /// <param name="taggedVersion">The tagged version of the current release e.g. 1.0.0-beta</param> /// <param name="modificationStamp">The text to inject into the passport and inventory titles to show that this application has modified the game.</param> public void Initialise(string applicationID, string version, string taggedVersion, ModificationStamp modificationStamp) { TRInterop.ExecutingVersionName = applicationID; modificationStamp.ApplyTo(TRInterop.ScriptModificationStamp); TRInterop.ExecutingVersion = version; TRInterop.TaggedVersion = taggedVersion; TRInterop.RandomisationSupported = true; TRLevelEditorFactory.RegisterEditor(TRVersion.TR2, typeof(TR2LevelRandomizer)); TRLevelEditorFactory.RegisterEditor(TRVersion.TR2G, typeof(TR2LevelRandomizer)); // #125 Invoke TRCoord.Instance after defining TRInterop.ExecutingVersionName otherwise // TRGE will not know the config file name to look for. TRCoord.Instance.HistoryChanged += TRCoord_HistoryChanged; TRCoord.Instance.HistoryAdded += TRCoord_HistoryChanged; TRCoord.Instance.BackupProgressChanged += TRCoord_BackupProgressChanged; }