From fdd0c25a25a7343e3ea4820f82708c92dc2cd9c8 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 6 Jan 2019 09:27:56 -0500 Subject: [PATCH] Removed core drone --- .../world/blocks/storage/CoreBlock.java | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java index d33212a858..c31c44d030 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java @@ -36,9 +36,6 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; public class CoreBlock extends StorageBlock{ - protected float droneRespawnDuration = 60 * 6; - protected UnitType droneType = UnitTypes.spirit; - protected TextureRegion openRegion; protected TextureRegion topRegion; @@ -187,38 +184,11 @@ public class CoreBlock extends StorageBlock{ } entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f); entity.time += entity.delta(); - entity.progress += 1f / (entity.currentUnit instanceof Player ? state.mode.respawnTime : droneRespawnDuration) * entity.delta(); + entity.progress += 1f / state.mode.respawnTime * entity.delta(); if(entity.progress >= 1f){ Call.onUnitRespawn(tile, entity.currentUnit); } - }else if(!netServer.isWaitingForPlayers()){ - entity.warmup += Time.delta(); - - if(entity.solid && entity.warmup > 60f && unitGroups[tile.getTeamID()].getByID(entity.droneID) == null && !Net.client()){ - - boolean found = false; - for(BaseUnit unit : unitGroups[tile.getTeamID()].all()){ - if(unit.getType().id == droneType.id){ - entity.droneID = unit.id; - found = true; - break; - } - } - - if(!found && !TutorialSector.supressDrone()){ - BaseUnit unit = droneType.create(tile.getTeam()); - unit.setSpawner(tile); - unit.setDead(true); - unit.add(); - - useContent(tile, droneType); - - entity.droneID = unit.id; - } - } - - entity.heat = Mathf.lerpDelta(entity.heat, 0f, 0.1f); } } @@ -229,9 +199,7 @@ public class CoreBlock extends StorageBlock{ public class CoreEntity extends TileEntity implements SpawnerTrait{ public Unit currentUnit; - int droneID = -1; boolean solid = true; - float warmup; float progress; float time; float heat; @@ -253,13 +221,11 @@ public class CoreBlock extends StorageBlock{ @Override public void write(DataOutput stream) throws IOException{ stream.writeBoolean(solid); - stream.writeInt(droneID); } @Override public void read(DataInput stream) throws IOException{ solid = stream.readBoolean(); - droneID = stream.readInt(); } } }