public void SetPublishedFileId(PublishedFileId_t newPfid) { publishedFileIdInt = newPfid; if (Category == ScenarioCategory.CustomLocal && !fileName.NullOrEmpty()) { GameDataSaveLoader.SaveScenario(this, GenFilePaths.AbsPathForScenario(fileName)); } }
protected override void DoFileInteraction(string fileName) { string absPath = GenFilePaths.AbsPathForScenario(fileName); LongEventHandler.QueueLongEvent(delegate { GameDataSaveLoader.SaveScenario(this.savingScen, absPath); }, "SavingLongEvent", false, null); Messages.Message("SavedAs".Translate(fileName), MessageTypeDefOf.SilentInput); this.Close(true); }
public void PrepareForWorkshopUpload() { string path = name + Rand.RangeInclusive(100, 999); tempUploadDir = Path.Combine(GenFilePaths.TempFolderPath, path); DirectoryInfo directoryInfo = new DirectoryInfo(tempUploadDir); if (directoryInfo.Exists) { directoryInfo.Delete(); } directoryInfo.Create(); string str = Path.Combine(tempUploadDir, name); str += ".rsc"; GameDataSaveLoader.SaveScenario(this, str); }
internal void <> m__0() { GameDataSaveLoader.SaveScenario(this.$this.savingScen, this.absPath); }