From 95fc53ee123389dcd3226757acdad15ce8bfda77 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Fri, 7 Nov 2025 05:27:58 +0000 Subject: [PATCH 1/4] 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 d4763d0dbad7fbddfc9303d857348a369d8eaa32 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Tue, 3 Feb 2026 23:32:27 -0500 Subject: [PATCH 2/4] Right clicking a sim will select them, and clicking on mouse wheel will rotate camera --- .../Simitone.Client/UI/Panels/UILotControl.cs | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs index 5e73ba1..1accd2b 100644 --- a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs +++ b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs @@ -88,6 +88,10 @@ public uint SelectedSimID private int RMBScrollX; private int RMBScrollY; + private bool MMBScroll; + private int MMBScrollX; + private int MMBScrollY; + //1 = near, 0.5 = med, 0.25 = far //"target" because we rescale the game target to fit this zoom level. public float TargetZoom = 1; @@ -865,10 +869,59 @@ public override void Update(UpdateState state) if (state.MouseState.RightButton != ButtonState.Pressed) { - if (RMBScroll) GameFacade.Cursor.SetCursor(CursorType.Normal); + if (RMBScroll) + { + GameFacade.Cursor.SetCursor(CursorType.Normal); + // Check if it was a click (not a drag) on a family member Sim + var deltaX = Math.Abs(state.MouseState.X - RMBScrollX); + var deltaY = Math.Abs(state.MouseState.Y - RMBScrollY); + if (deltaX < 5 && deltaY < 5 && LiveMode && ActiveEntity != null) + { + // It was a click - check if clicking on a household Sim + var clickedObjId = World.GetObjectIDAtScreenPos(RMBScrollX, RMBScrollY, GameFacade.GraphicsDevice); + if (clickedObjId > 0) + { + var clickedObj = vm.GetObjectById(clickedObjId); + if (clickedObj is VMAvatar && vm.TS1State.CurrentFamily?.RuntimeSubset.Contains(clickedObj.Object.OBJ.GUID) == true) + { + // Switch to this family member + vm.SendCommand(new VMNetChangeControlCmd() { TargetID = clickedObj.ObjectID }); + HITVM.Get().PlaySoundEvent(UISounds.QueueAdd); + } + } + } + } RMBScroll = false; } + // Middle mouse button handling for camera rotation + if (state.MouseState.MiddleButton == ButtonState.Pressed) + { + if (!MMBScroll) + { + MMBScroll = true; + MMBScrollX = state.MouseState.X; + MMBScrollY = state.MouseState.Y; + } + } + else + { + if (MMBScroll) + { + // Check if it was a click (not a drag) + var deltaX = Math.Abs(state.MouseState.X - MMBScrollX); + var deltaY = Math.Abs(state.MouseState.Y - MMBScrollY); + if (deltaX < 5 && deltaY < 5) + { + // It was a click - rotate camera 90 degrees clockwise + World.State.Rotation = (WorldRotation)(((int)World.State.Rotation + 1) % 4); + HITVM.Get().PlaySoundEvent(UISounds.Click); + } + } + MMBScroll = false; + } + + if (!LiveMode && PieMenu != null) { PieMenu.RemoveSimScene(); From 3d3a78d4d8e6932b911d199465b47dc04511db49 Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Tue, 3 Feb 2026 23:47:23 -0500 Subject: [PATCH 3/4] Change sound event from QueueAdd to Click --- Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs index 1accd2b..756ea9d 100644 --- a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs +++ b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs @@ -886,7 +886,7 @@ public override void Update(UpdateState state) { // Switch to this family member vm.SendCommand(new VMNetChangeControlCmd() { TargetID = clickedObj.ObjectID }); - HITVM.Get().PlaySoundEvent(UISounds.QueueAdd); + HITVM.Get().PlaySoundEvent(UISounds.Click); } } } From ca6ac018f6df9bb058f86a538d5838df7426f77b Mon Sep 17 00:00:00 2001 From: Alex Yong Date: Tue, 3 Feb 2026 23:59:49 -0500 Subject: [PATCH 4/4] making right click work properly --- Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs index 756ea9d..c5d9580 100644 --- a/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs +++ b/Client/Simitone/Simitone.Client/UI/Panels/UILotControl.cs @@ -886,6 +886,9 @@ public override void Update(UpdateState state) { // Switch to this family member vm.SendCommand(new VMNetChangeControlCmd() { TargetID = clickedObj.ObjectID }); + // Update local state immediately so interactions work right away + ActiveEntity = clickedObj; + Queue.QueueOwner = ActiveEntity; HITVM.Get().PlaySoundEvent(UISounds.Click); } }