From 488c5f9bf0369a8a9a1a1fcee1e1f03d6d52ce73 Mon Sep 17 00:00:00 2001 From: Salvador Cipolla Date: Thu, 12 Dec 2024 21:57:32 -0300 Subject: [PATCH 1/3] Change modcard to 3 tabs Add fred 2 debug, qtfred debug and play in vr buttons. --- Knossos.NET/Classes/Knossos.cs | 8 +++++++- .../ViewModels/Templates/ModCardViewModel.cs | 3 +++ Knossos.NET/Views/Templates/ModCardView.axaml | 18 ++++++++++++++---- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Knossos.NET/Classes/Knossos.cs b/Knossos.NET/Classes/Knossos.cs index ceb69a2b..3379c439 100644 --- a/Knossos.NET/Classes/Knossos.cs +++ b/Knossos.NET/Classes/Knossos.cs @@ -738,7 +738,7 @@ private static void AutoUpdateBuilds() /// /// /// - public static async void PlayMod(Mod mod, FsoExecType fsoExecType, bool standaloneServer = false, int standalonePort = 0) + public static async void PlayMod(Mod mod, FsoExecType fsoExecType, bool standaloneServer = false, int standalonePort = 0, bool vrMode = false) { if (TaskViewModel.Instance!.IsSafeState() == false) { @@ -801,6 +801,12 @@ public static async void PlayMod(Mod mod, FsoExecType fsoExecType, bool standalo var modList = new List(); FsoBuild? fsoBuild = null; + /* VR Mode Stuff */ + if(vrMode) + { + cmdline += " -vr"; + } + /* Resolve Dependencies should be all valid at this point */ var dependencyList = mod.GetModDependencyList(false,true); bool hasBuildDependency = false; diff --git a/Knossos.NET/ViewModels/Templates/ModCardViewModel.cs b/Knossos.NET/ViewModels/Templates/ModCardViewModel.cs index 590a6fff..1b7f0f4c 100644 --- a/Knossos.NET/ViewModels/Templates/ModCardViewModel.cs +++ b/Knossos.NET/ViewModels/Templates/ModCardViewModel.cs @@ -222,9 +222,12 @@ internal void ButtonCommand(object command) switch((string)command) { case "play" : Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.Release); break; + case "playvr": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.Release, false, 0, true); break; case "fred2": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.Fred2); break; + case "fred2debug": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.Fred2Debug); break; case "debug": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.Debug); break; case "qtfred": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.QtFred); break; + case "qtfreddebug": Knossos.PlayMod(modVersions[activeVersionIndex], FsoExecType.QtFredDebug); break; case "update": ButtonCommandUpdate(); break; case "modify": ButtonCommandModify(); break; case "delete": ButtonCommandDelete(); break; diff --git a/Knossos.NET/Views/Templates/ModCardView.axaml b/Knossos.NET/Views/Templates/ModCardView.axaml index 820e7ce1..9efa688d 100644 --- a/Knossos.NET/Views/Templates/ModCardView.axaml +++ b/Knossos.NET/Views/Templates/ModCardView.axaml @@ -37,7 +37,7 @@