From 95fc53ee123389dcd3226757acdad15ce8bfda77 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Fri, 7 Nov 2025 05:27:58 +0000 Subject: [PATCH 1/3] Testing out github actions workflow --- .github/workflows/build.yml | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..73d1437 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Build Simitone + +on: + workflow_dispatch: + inputs: + configuration: + description: 'Build configuration' + required: false + default: 'Release' + type: choice + options: + - Release + - Debug + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup .NET 9 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Run Protobuild + shell: pwsh + run: | + cd FreeSO/Other/libs/FSOMonoGame/ + ./protobuild.exe --generate + continue-on-error: true + + - name: Restore Simitone dependencies + run: dotnet restore Client/Simitone/Simitone.sln + + - name: Restore FreeSO dependencies + run: dotnet restore FreeSO/TSOClient/FreeSO.sln + continue-on-error: true + + - name: Restore Roslyn dependencies + shell: pwsh + run: | + cd FreeSO/TSOClient/FSO.SimAntics.JIT.Roslyn/ + dotnet restore + continue-on-error: true + + - name: Build + run: dotnet build Client/Simitone/Simitone.sln -c ${{ inputs.configuration || 'Release' }} --no-restore + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: SimitoneWindows-${{ inputs.configuration || 'Release' }} + path: Client/Simitone/Simitone.Windows/bin/${{ inputs.configuration || 'Release' }}/net9.0-windows/ + if-no-files-found: error From b5bb78eadf908d29fe6b85142981d72c7af5f0d4 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Fri, 6 Feb 2026 22:23:07 +0000 Subject: [PATCH 2/3] Fixing an issue where the delete family button on CAS wasn't working properly --- .../UI/Panels/CAS/UIFamiliesCASPanel.cs | 2 + .../UI/Screens/TS1CASScreen.cs | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/Client/Simitone/Simitone.Client/UI/Panels/CAS/UIFamiliesCASPanel.cs b/Client/Simitone/Simitone.Client/UI/Panels/CAS/UIFamiliesCASPanel.cs index 5659886..99caa41 100644 --- a/Client/Simitone/Simitone.Client/UI/Panels/CAS/UIFamiliesCASPanel.cs +++ b/Client/Simitone/Simitone.Client/UI/Panels/CAS/UIFamiliesCASPanel.cs @@ -28,6 +28,7 @@ public class UIFamiliesCASPanel : UIContainer public UITwoStateButton NewButton; public event Action OnNewFamily; + public event Action OnDeleteFamily; public List Families = new List(); private VM vm; @@ -63,6 +64,7 @@ public UIFamiliesCASPanel() DeleteButton = new UITwoStateButton(ui.Get("btn_deletefam.png").Get(gd)); DeleteButton.Position = new Vector2(sw - 140, sh - 260); Add(DeleteButton); + DeleteButton.OnButtonClick += (btn) => OnDeleteFamily?.Invoke(); NewButton = new UITwoStateButton(ui.Get("btn_createfam.png").Get(gd)); NewButton.Position = new Vector2(sw - 140, sh - 380); diff --git a/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs b/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs index 68f7072..5736c88 100644 --- a/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs +++ b/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs @@ -449,6 +449,7 @@ public TS1CASScreen() FamiliesPanel = new UIFamiliesCASPanel(); FamiliesPanel.OnNewFamily += () => { SetMode(UICASMode.FamilyEdit); }; + FamiliesPanel.OnDeleteFamily += DeleteFamily; Add(FamiliesPanel); BackButton = new UITwoStateButton(ui.Get("btn_back.png").Get(gd)); @@ -764,6 +765,46 @@ public override void Update(UpdateState state) } } + public void DeleteFamily() + { + if (FamiliesPanel.Selection == -1) return; + + var selectedFamily = FamiliesPanel.Families[FamiliesPanel.Selection]; + var familyName = Content.Get().Neighborhood.MainResource.Get(selectedFamily.ChunkID)?.GetString(0) ?? "this family"; + + if (ConfirmDialog == null) + { + ConfirmDialog = new UIMobileAlert(new UIAlertOptions() + { + Title = "Delete Family", + Message = $"Are you sure you want to delete the {familyName} family? This cannot be undone.", + Buttons = UIAlertButton.YesNo( + (ybtn) => { + ConfirmDialog.Close(); + ConfirmDialog = null; + // Actually delete the family + var neigh = Content.Get().Neighborhood; + var fami = selectedFamily; + var fams = neigh.MainResource.Get(fami.ChunkID); + + // Remove both FAMI and FAMs chunks + fami.ChunkParent.FullRemoveChunk(fami); + if (fams != null) fams.ChunkParent.FullRemoveChunk(fams); + + // Save the neighborhood + neigh.SaveNeighbourhood(true); + + // Refresh the list and clear selection + FamiliesPanel.SetSelection(-1); + SetFamilies(); + }, + (nbtn) => { ConfirmDialog.Close(); ConfirmDialog = null; } + ) + }); + UIScreen.GlobalShowDialog(ConfirmDialog, true); + } + } + public void SetFamilies() { //get all families that don't have a house from neighbourhood, and populate the list From e178c4ec665bbfe219a326e2285e79c6aa8fe436 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Tue, 10 Feb 2026 19:06:19 +0000 Subject: [PATCH 3/3] cleaning --- Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs b/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs index 5736c88..f4797ad 100644 --- a/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs +++ b/Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs @@ -782,19 +782,15 @@ public void DeleteFamily() (ybtn) => { ConfirmDialog.Close(); ConfirmDialog = null; - // Actually delete the family var neigh = Content.Get().Neighborhood; var fami = selectedFamily; var fams = neigh.MainResource.Get(fami.ChunkID); - // Remove both FAMI and FAMs chunks fami.ChunkParent.FullRemoveChunk(fami); if (fams != null) fams.ChunkParent.FullRemoveChunk(fams); - // Save the neighborhood neigh.SaveNeighbourhood(true); - // Refresh the list and clear selection FamiliesPanel.SetSelection(-1); SetFamilies(); },