From 8d4ab2d7fb4b27cf39312e4b40df5c5b32fd7721 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 8 Dec 2020 14:23:13 -0500 Subject: [PATCH] Cleanup --- .../mindustry/entities/comp/PayloadComp.java | 2 ++ .../src/mindustry/desktop/steam/SStats.java | 19 ------------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/core/src/mindustry/entities/comp/PayloadComp.java b/core/src/mindustry/entities/comp/PayloadComp.java index c89dc2b10b..9e8675fcce 100644 --- a/core/src/mindustry/entities/comp/PayloadComp.java +++ b/core/src/mindustry/entities/comp/PayloadComp.java @@ -117,6 +117,8 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{ u.rotation(rotation); //reset the ID to a new value to make sure it's synced u.id = EntityGroup.nextId(); + //decrement count to prevent double increment + if(!u.isAdded()) u.team.data().updateCount(u.type, -1); u.add(); return true; diff --git a/desktop/src/mindustry/desktop/steam/SStats.java b/desktop/src/mindustry/desktop/steam/SStats.java index 5471e4310d..1705603043 100644 --- a/desktop/src/mindustry/desktop/steam/SStats.java +++ b/desktop/src/mindustry/desktop/steam/SStats.java @@ -249,15 +249,6 @@ public class SStats implements SteamUserStatsCallback{ } }); - Events.on(LoseEvent.class, e -> { - if(campaign()){ - //TODO implement - //if(state.getSector().metCondition() && (state.wave - state.getSector().conditionWave) / state.getSector().launchPeriod >= 1){ - // skipLaunching2Death.complete(); - //} - } - }); - Events.on(SectorLaunchEvent.class, e -> { SStat.timesLaunched.add(); }); @@ -325,16 +316,6 @@ public class SStats implements SteamUserStatsCallback{ SStat.sectorsControlled.set(e.sector.planet.sectors.count(Sector::hasBase)); }); - - //TODO dead achievement - /* - Events.on(MechChangeEvent.class, e -> { - if(campaign()){ - if(mechs.add(e.mech.name)){ - SStat.zoneMechsUsed.max(mechs.size); - } - } - });*/ } private void save(){