From 8a424111f04a969add0f9750384d60a5cd07ac29 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 28 Nov 2020 09:43:35 -0500 Subject: [PATCH] Fixed #3633 --- .github/workflows/deployment.yml | 16 +++++++++------- core/src/mindustry/core/Logic.java | 2 +- core/src/mindustry/entities/comp/MinerComp.java | 2 ++ core/src/mindustry/input/InputHandler.java | 2 +- .../metadata/android/en-US/changelogs/29730.txt | 10 ++++++++++ 5 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/29730.txt diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index bc993bae07..e98615e268 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -15,9 +15,11 @@ jobs: uses: actions/setup-java@v1 with: java-version: 14 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Create artifacts run: | - ./gradlew desktop:dist server:dist core:javadoc -Pbuildversion=${GITHUB_REF:1} + ./gradlew desktop:dist server:dist core:javadoc -Pbuildversion=${RELEASE_VERSION:1} - name: Update docs run: | cd ../ @@ -27,24 +29,24 @@ jobs: cp -a Mindustry/core/build/docs/javadoc/. docs/ cd docs git add . - git commit -m "Update ${GITHUB_REF:1}" + git commit -m "Update ${RELEASE_VERSION:1}" git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/MindustryGame/docs cd ../Mindustry - name: Add Arc release run: | git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc cd ../Arc - git tag ${GITHUB_REF} - git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${GITHUB_REF}; + git tag ${RELEASE_VERSION} + git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${RELEASE_VERSION}; cd ../Mindustry - name: Update F-Droid build string run: | git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds cd ../MindustryBuilds - echo "Updating version to ${GITHUB_REF:1}" - echo versionName=6-fdroid-${GITHUB_REF:1}$'\n'versionCode=${GITHUB_REF:1} > version_fdroid.txt + echo "Updating version to ${RELEASE_VERSION:1}" + echo versionName=6-fdroid-${RELEASE_VERSION:1}$'\n'versionCode=${RELEASE_VERSION:1} > version_fdroid.txt git add . - git commit -m "Updating to build ${GITHUB_REF:1}" + git commit -m "Updating to build ${RELEASE_VERSION:1}" cd ../Mindustry - name: Upload client artifacts uses: svenstaro/upload-release-action@v2 diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index abcdfc85a0..a13e37cbac 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -135,8 +135,8 @@ public class Logic implements ApplicationListener{ //convert all blocks to neutral, randomly killing them if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){ Building b = tile.build; + Call.setTeam(b, Team.derelict); Time.run(Mathf.random(0f, 60f * 6f), () -> { - Call.setTeam(b, Team.derelict); if(Mathf.chance(0.25)){ b.kill(); } diff --git a/core/src/mindustry/entities/comp/MinerComp.java b/core/src/mindustry/entities/comp/MinerComp.java index f10a217105..81aa812f61 100644 --- a/core/src/mindustry/entities/comp/MinerComp.java +++ b/core/src/mindustry/entities/comp/MinerComp.java @@ -77,6 +77,8 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ mineTimer = 0; if(core != null && within(core, mineTransferRange) && core.acceptStack(item, 1, this) == 1 && offloadImmediately()){ + //add item to inventory before it is transferred + if(item() == item) addItem(item); Call.transferItemTo(self(), item, 1, mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), core); diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 551fd5e82d..c7ca5cd022 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -105,7 +105,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ public static void transferItemTo(@Nullable Unit unit, Item item, int amount, float x, float y, Building build){ if(build == null || build.items == null) return; - if(unit != null) unit.stack.amount = Math.max(unit.stack.amount - amount, 0); + if(unit != null && unit.item() == item) unit.stack.amount = Math.max(unit.stack.amount - amount, 0); for(int i = 0; i < Mathf.clamp(amount / 3, 1, 8); i++){ Time.run(i * 3, () -> createItemTransfer(item, amount, x, y, build, () -> {})); diff --git a/fastlane/metadata/android/en-US/changelogs/29730.txt b/fastlane/metadata/android/en-US/changelogs/29730.txt new file mode 100644 index 0000000000..c98275f647 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/29730.txt @@ -0,0 +1,10 @@ +This should be one of the last beta builds. In a couple of days, I will make a final release with the most recent translation bundles & bugfixes. + +- Fixed infinitely looping Vela laser sound +- Fixed fire not burning on tar +- Disabled fire for items with flammability <= 1 (this means coal bombing no longer causes fire) +- Disabled unit explosion team damage +- Disabled core unit crash damage +- Disabled automatic linking of adjacent bridges + +Campaign: