public void ShowCredits() { var screen = Kernel.Get <Credits>(); GameFacade.Screens.RemoveCurrent(); GameFacade.Screens.AddScreen(screen); DiscordRpcEngine.SendFSOPresence("Viewing Credits"); }
public void EnterSandboxMode(string lotName, bool external) { var screen = new SandboxGameScreen(); GameFacade.Screens.RemoveCurrent(); GameFacade.Screens.AddScreen(screen); screen.Initialize(lotName, external); DiscordRpcEngine.SendFSOPresence("Playing Sandbox Mode"); }
/// <summary> /// Go to the person selection page /// </summary> public void ShowPersonSelection() { if (GlobalSettings.Default.CompatState == -1) { GlobalSettings.Default.CompatState = 0; GlobalSettings.Default.Save(); } ChangeState <PersonSelection, PersonSelectionController>((view, controller) => { DiscordRpcEngine.SendFSOPresence("In Select A Sim"); }); }
/// <summary> /// Show the login screen /// </summary> public void ShowLogin() { ChangeState <LoginScreen, LoginController>((view, controller) => { DiscordRpcEngine.SendFSOPresence("In Main Menu"); }); /* * var screen = Kernel.Get<LoginScreen>(); * GameFacade.Screens.RemoveCurrent(); * GameFacade.Screens.AddScreen(screen); */ }
private void SetTitle() { var title = LotControl.GetLotTitle(); Title.SetTitle(title); if (lastLotTitle != title) { DiscordRpcEngine.SendFSOPresence( vm.LotName, (int)FindController <CoreGameScreenController>().GetCurrentLotID(), vm.Entities.Count(x => x is VMAvatar && x.PersistID != 0), vm.LotName.StartsWith("{job:") ? 4 : 24, vm.TSOState.PropertyCategory ); lastLotTitle = title; } }
public void CleanupLastWorld() { if (vm == null) { return; } //clear our cache too, if the setting lets us do that DiscordRpcEngine.SendFSOPresence(gizmo.CurrentAvatar.Value.Avatar_Name, null, 0, 0, 0, 0, gizmo.CurrentAvatar.Value.Avatar_PrivacyMode > 0); TimedReferenceController.Clear(); TimedReferenceController.Clear(); if (ZoomLevel < 4) { ZoomLevel = 5; } vm.Context.Ambience.Kill(); foreach (var ent in vm.Entities) //stop object sounds { var threads = ent.SoundThreads; for (int i = 0; i < threads.Count; i++) { threads[i].Sound.RemoveOwner(ent.ObjectID); } threads.Clear(); } vm.CloseNet(VMCloseNetReason.LeaveLot); Driver.OnClientCommand -= VMSendCommand; GameFacade.Scenes.Remove(World); World.Dispose(); LotControl.Dispose(); this.Remove(LotControl); ucp.SetPanel(-1); ucp.SetInLot(false); vm.SuppressBHAVChanges(); vm = null; World = null; Driver = null; LotControl = null; CityRenderer.DisposeOnLot(); }
private void SetTitle() { var title = LotControl.GetLotTitle(); Title.SetTitle(title); if (lastLotTitle != title) { bool isPrivate = false; if (gizmo.CurrentAvatar.Value.Avatar_PrivacyMode > 0) { isPrivate = true; } DiscordRpcEngine.SendFSOPresence( gizmo.CurrentAvatar.Value.Avatar_Name, vm.LotName, (int)FindController <CoreGameScreenController>().GetCurrentLotID(), vm.Entities.Count(x => x is VMAvatar && x.PersistID != 0), vm.LotName.StartsWith("{job:") ? 4 : 24, vm.TSOState.PropertyCategory, isPrivate ); lastLotTitle = title; } }
public CoreGameScreen() : base() { DiscordRpcEngine.SendFSOPresence(null, 0, 0, 0, 0); StateChanges = new Queue <SimConnectStateChange>(); /** * Music */ HITVM.Get().PlaySoundEvent(UIMusic.Map); /*VMDebug = new UIButton() * { * Caption = "Simantics", * Y = 45, * Width = 100, * X = GlobalSettings.Default.GraphicsWidth - 110 * }; * VMDebug.OnButtonClick += new ButtonClickDelegate(VMDebug_OnButtonClick); * this.Add(VMDebug);*/ /*SaveHouseButton = new UIButton() * { * Caption = "Save House", * Y = 10, * Width = 100, * X = GlobalSettings.Default.GraphicsWidth - 110 * }; * SaveHouseButton.OnButtonClick += new ButtonClickDelegate(SaveHouseButton_OnButtonClick); * this.Add(SaveHouseButton);*/ ucp = new UIUCP(this); ucp.Y = ScreenHeight - 210; ucp.SetInLot(false); ucp.UpdateZoomButton(); ucp.MoneyText.Caption = "0";// PlayerAccount.Money.ToString(); this.Add(ucp); gizmo = new UIGizmo(); ControllerUtils.BindController <GizmoController>(gizmo); gizmo.X = ScreenWidth - 430; gizmo.Y = ScreenHeight - 230; this.Add(gizmo); Title = new UIGameTitle(); Title.SetTitle(""); this.Add(Title); this.Add(FSOFacade.MessageController); MessageTray = new UIMessageTray(); MessageTray.X = ScreenWidth - 70; MessageTray.Y = 12; this.Add(MessageTray); WindowContainer = new UIContainer(); Add(WindowContainer); PersonPage = new UIPersonPage(); PersonPage.Visible = false; ControllerUtils.BindController <PersonPageController>(PersonPage); WindowContainer.Add(PersonPage); LotPage = new UILotPage(); LotPage.Visible = false; ControllerUtils.BindController <LotPageController>(LotPage); WindowContainer.Add(LotPage); Bookmarks = new UIBookmarks(); Bookmarks.Visible = false; ControllerUtils.BindController <BookmarksController>(Bookmarks); WindowContainer.Add(Bookmarks); Relationships = new UIRelationshipDialog(); Relationships.Visible = false; ControllerUtils.BindController <RelationshipDialogController>(Relationships); WindowContainer.Add(Relationships); Inbox = new UIInbox(); Inbox.Visible = false; ControllerUtils.BindController <InboxController>(Inbox); WindowContainer.Add(Inbox); }