diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67a3ae87..8173267b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,68 +5,62 @@ on: [push, pull_request] jobs: build: runs-on: windows-latest + strategy: + matrix: + mode: ["Debug", "Release"] steps: - - uses: actions/checkout@v1 + - name: Git checkout + uses: actions/checkout@v1 with: submodules: recursive - - name: Install nuget - run: choco install nuget.commandline - - name: OTAPI Debug - shell: cmd + - name: Install NuGet client + uses: nuget/setup-nuget@v1 + - name: Restore NuGet packages run: | nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Debug - cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug - TShock.Modifications.Bootstrapper.exe - - name: OTAPI Release + nuget restore TShock.sln + - name: Build OTAPI shell: cmd run: | - nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Release - cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release + "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=${{ matrix.mode }} + cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\${{ matrix.mode }} TShock.Modifications.Bootstrapper.exe - - name: TerrariaServerAPI Debug + - name: Build TerrariaServerAPI shell: cmd run: | cd .\TerrariaServerAPI - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Debug - - name: TShock Debug + "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=${{ matrix.mode }} + - name: Build TShock shell: cmd run: | - nuget restore TShock.sln - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Debug - - name: TerrariaServerAPI Release - shell: cmd - run: | - cd .\TerrariaServerAPI - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release - - name: TShock Release - shell: cmd - run: | - nuget restore TShock.sln - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Release + "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=${{ matrix.mode }} - name: Normalize release packaging shell: cmd run: | - xcopy /Y prebuilts\*.* TShockAPI\bin\Release - xcopy /Y prebuilts\*.* TShockAPI\bin\Debug - mkdir TShockAPI\bin\Debug\ServerPlugins - mkdir TShockAPI\bin\Release\ServerPlugins - move TShockAPI\bin\Release\TShockAPI.dll TShockAPI\bin\Release\ServerPlugins - move TShockAPI\bin\Debug\TShockAPI.dll TShockAPI\bin\Debug\ServerPlugins - - uses: actions/upload-artifact@master - with: - name: Experimental TShock (not debug) - path: TShockAPI\bin\Release - - uses: actions/upload-artifact@master + xcopy /Y prebuilts\*.* TShockAPI\bin\${{ matrix.mode }} + mkdir TShockAPI\bin\${{ matrix.mode }}\ServerPlugins + move TShockAPI\bin\${{ matrix.mode }}\TShockAPI.dll TShockAPI\bin\${{ matrix.mode }}\ServerPlugins + - name: Upload TShock (Debug) + if: contains(matrix.mode, 'Debug') + uses: actions/upload-artifact@master with: name: Experimental TShock (debug) path: TShockAPI\bin\Debug - - uses: actions/upload-artifact@master + - name: Upload OTAPI Bootstrapper (Debug) + if: contains(matrix.mode, 'Debug') + uses: actions/upload-artifact@master with: name: Experimental (debug) OTAPI Bootstrapper path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug\TShock.Modifications.Bootstrapper.exe - - uses: actions/upload-artifact@master + - name: Upload TShock (Not Debug) + if: contains(matrix.mode, 'Release') + uses: actions/upload-artifact@master + with: + name: Experimental TShock (not debug) + path: TShockAPI\bin\Release + - name: Upload OTAPI Bootstrapper (Not Debug) + if: contains(matrix.mode, 'Release') + uses: actions/upload-artifact@master with: name: Experimental (not debug) OTAPI Bootstrapper path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release\TShock.Modifications.Bootstrapper.exe diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d5cfb3..9eda1a4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. -## Upcoming Release +## Upcoming release +* Your change goes here! + +## TShock 4.4.0 (Pre-release 9) * Fixed pet licenses. (@Olink) * Added initial support for Journey mode in SSC worlds. (@Olink) * Made TShock database MySQL 8 compatible by escaping column names in our IQueryBuilder code. (Name `Groups` is a reserved element in this version, which is used in our `Region` table.) (@Patrikkk) @@ -29,6 +32,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * To add this command to your guest group, give them `tshock.synclocalarea`, with `/group addperm guest tshock.synclocalarea`. * This command may be removed at any time in the future (and will likely be removed when send tile square handling is fixed). * Add FishOutNPC event handler, which is called whenever a player fishes out an NPC using a fishing rod. Added antihack to Bouncer, to prevent unathorized and invalid mob spawning, by checking player action, NPC IDs and range. (@Patrikkk, @moisterrific) +* Fixed smart door automatic door desync and deletion issue. (@hakusaro) ## TShock 4.4.0 (Pre-release 8) * Update for OTAPI 2.0.0.36 and Terraria 1.4.0.4. (@hakusaro, @Patrikkk, @DeathCradle) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 3559303f..09c06f3c 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -561,6 +561,7 @@ namespace TShockAPI bool changed = false; bool failed = false; + bool doorRelated = false; try { var tiles = new NetTile[size, size]; @@ -592,6 +593,11 @@ namespace TShockAPI continue; } + if (newtile.Active && Terraria.ID.TileID.Sets.RoomNeeds.CountsAsDoor.Contains(newtile.Type)) + { + doorRelated = true; + } + // Fixes the Flower Boots not creating flowers issue if (size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) { @@ -705,7 +711,8 @@ namespace TShockAPI } else { - args.Player.SendTileSquare(tileX, tileY, size); + if (!doorRelated) + args.Player.SendTileSquare(tileX, tileY, size); } } catch