public MyScriptItemInfo(MyBlueprintTypeEnum type,string scriptName,ulong? id = null,string description =null,MySteamWorkshop.SubscribedItem item=null): base(type,id) { ScriptName = scriptName; Description = description; SteamItem = item; }
//loads next mission, SP only //id can be workshop ID or save name (in that case official scenarios are searched first, if not found, then user's saves) public void LoadNextScenario(string id) { ulong workshopID; if(ulong.TryParse(id,out workshopID)) { MySteamWorkshop.SubscribedItem item = new MySteamWorkshop.SubscribedItem(); item.PublishedFileId = workshopID; MySteamWorkshop.CreateWorldInstanceAsync(item, MySteamWorkshop.MyWorkshopPathInfo.CreateScenarioInfo(), true, delegate(bool success, string sessionPath) { if (success) LoadMission(sessionPath, false, MyOnlineModeEnum.OFFLINE, 1); else MyGuiSandbox.AddScreen(MyGuiSandbox.CreateMessageBox( messageText: MyTexts.Get(MySpaceTexts.MessageBoxTextWorkshopDownloadFailed), messageCaption: MyTexts.Get(MySpaceTexts.ScreenCaptionWorkshop))); }); } //else // LoadMission(save.Item1, false, MyOnlineModeEnum.OFFLINE, 1); }