void Vm_OnChatEvent(VMChatEvent evt) { if (ZoomLevel < 4) { Title.SetTitle(LotControl.GetLotTitle()); } }
private void Vm_OnChatEvent(SimAntics.NetPlay.Model.VMChatEvent evt) { if (ZoomLevel < 4) { Title.SetTitle(LotControl.GetLotTitle()); } }
private void VMRefreshed() { if (vm == null) { return; } LotControl.ActiveEntity = null; LotControl.RefreshCut(); }
private void VMRefreshed() { if (vm == null) { return; } GameThread.InUpdate(() => { if (vm.LoadErrors.Count > 0) { HandleLoadErrors(); } LotControl.ActiveEntity = null; LotControl.RefreshCut(); }); }
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(); }
public void CleanupLastWorld() { if (vm == null) { return; } //clear our cache too, if the setting lets us do that TimedReferenceController.Clear(); TimedReferenceController.Clear(); VM.ClearAssembled(); 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; SandServer?.Shutdown(); SandCli?.Disconnect(); SandServer = null; SandCli = null; }
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; } }