diff --git a/core/assets-raw/sprites/blocks/drills/oil-extractor-top.png b/core/assets-raw/sprites/blocks/drills/oil-extractor-top.png index 37bebd60c1..ba07cbb184 100644 Binary files a/core/assets-raw/sprites/blocks/drills/oil-extractor-top.png and b/core/assets-raw/sprites/blocks/drills/oil-extractor-top.png differ diff --git a/core/assets-raw/sprites/blocks/drills/oil-extractor.png b/core/assets-raw/sprites/blocks/drills/oil-extractor.png index e137d2e773..8d363c44cb 100644 Binary files a/core/assets-raw/sprites/blocks/drills/oil-extractor.png and b/core/assets-raw/sprites/blocks/drills/oil-extractor.png differ diff --git a/core/assets-raw/sprites/blocks/liquid/mechanical-pump.png b/core/assets-raw/sprites/blocks/liquid/mechanical-pump.png index 3e98ba5081..b92420f1c3 100644 Binary files a/core/assets-raw/sprites/blocks/liquid/mechanical-pump.png and b/core/assets-raw/sprites/blocks/liquid/mechanical-pump.png differ diff --git a/core/assets-raw/sprites/blocks/liquid/thermal-pump.png b/core/assets-raw/sprites/blocks/liquid/thermal-pump.png index 47d5349d23..c89ff8890d 100644 Binary files a/core/assets-raw/sprites/blocks/liquid/thermal-pump.png and b/core/assets-raw/sprites/blocks/liquid/thermal-pump.png differ diff --git a/core/assets-raw/sprites/blocks/production/oilrefinery.png b/core/assets-raw/sprites/blocks/production/oilrefinery.png deleted file mode 100644 index b6fdea3228..0000000000 Binary files a/core/assets-raw/sprites/blocks/production/oilrefinery.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/plastanium-compressor.png b/core/assets-raw/sprites/blocks/production/plastanium-compressor.png index 4bd9a0098f..8bcbc2c911 100644 Binary files a/core/assets-raw/sprites/blocks/production/plastanium-compressor.png and b/core/assets-raw/sprites/blocks/production/plastanium-compressor.png differ diff --git a/core/assets/sprites/block_colors.png b/core/assets/sprites/block_colors.png index 7a9bed0f1a..6642bd33d3 100644 Binary files a/core/assets/sprites/block_colors.png and b/core/assets/sprites/block_colors.png differ diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 093098f960..db9d58e5f5 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -727,7 +727,6 @@ public class Blocks implements ContentList{ mechanicalPump = new Pump("mechanical-pump"){{ requirements(Category.liquid, ItemStack.with(Items.copper, 30, Items.lead, 20)); pumpAmount = 0.1f; - tier = 0; }}; rotaryPump = new Pump("rotary-pump"){{ @@ -737,17 +736,15 @@ public class Blocks implements ContentList{ liquidCapacity = 30f; hasPower = true; size = 2; - tier = 1; }}; thermalPump = new Pump("thermal-pump"){{ requirements(Category.liquid, ItemStack.with(Items.copper, 160, Items.lead, 130, Items.silicon, 60, Items.titanium, 80, Items.thorium, 70)); - pumpAmount = 0.275f; + pumpAmount = 0.22f; consumes.power(0.30f); liquidCapacity = 40f; hasPower = true; - size = 2; - tier = 2; + size = 3; }}; conduit = new Conduit("conduit"){{ @@ -949,7 +946,7 @@ public class Blocks implements ContentList{ waterExtractor = new SolidPump("water-extractor"){{ requirements(Category.production, ItemStack.with(Items.copper, 50, Items.graphite, 50, Items.lead, 40)); result = Liquids.water; - pumpAmount = 0.065f; + pumpAmount = 0.13f; size = 2; liquidCapacity = 30f; rotateSpeed = 1.4f; @@ -963,7 +960,7 @@ public class Blocks implements ContentList{ updateEffect = Fx.pulverize; liquidCapacity = 50f; updateEffectChance = 0.05f; - pumpAmount = 0.09f; + pumpAmount = 0.25f; size = 3; liquidCapacity = 30f; diff --git a/core/src/io/anuke/mindustry/content/Liquids.java b/core/src/io/anuke/mindustry/content/Liquids.java index dadd720f47..17cc695c0e 100644 --- a/core/src/io/anuke/mindustry/content/Liquids.java +++ b/core/src/io/anuke/mindustry/content/Liquids.java @@ -12,14 +12,12 @@ public class Liquids implements ContentList{ water = new Liquid("water", Color.valueOf("596ab8")){{ heatCapacity = 0.4f; - tier = 0; effect = StatusEffects.wet; }}; slag = new Liquid("slag", Color.valueOf("ffa166")){{ temperature = 1f; viscosity = 0.8f; - tier = 2; effect = StatusEffects.melting; }}; @@ -28,14 +26,12 @@ public class Liquids implements ContentList{ flammability = 1.2f; explosiveness = 1.2f; heatCapacity = 0.7f; - tier = 1; effect = StatusEffects.tarred; }}; cryofluid = new Liquid("cryofluid", Color.valueOf("6ecdec")){{ heatCapacity = 0.9f; temperature = 0.25f; - tier = 1; effect = StatusEffects.freezing; }}; } diff --git a/core/src/io/anuke/mindustry/entities/Units.java b/core/src/io/anuke/mindustry/entities/Units.java index d99b0aff67..7c72ad9492 100644 --- a/core/src/io/anuke/mindustry/entities/Units.java +++ b/core/src/io/anuke/mindustry/entities/Units.java @@ -143,16 +143,21 @@ public class Units{ /**Returns the closest target enemy. First, units are checked, then tile entities.*/ public static TargetTrait getClosestTarget(Team team, float x, float y, float range){ - return getClosestTarget(team, x, y, range, u -> !u.isDead() && u.isAdded()); + return getClosestTarget(team, x, y, range, Unit::isValid); } /**Returns the closest target enemy. First, units are checked, then tile entities.*/ public static TargetTrait getClosestTarget(Team team, float x, float y, float range, Predicate unitPred){ + return getClosestTarget(team, x, y, range, unitPred, t -> true); + } + + /**Returns the closest target enemy. First, units are checked, then tile entities.*/ + public static TargetTrait getClosestTarget(Team team, float x, float y, float range, Predicate unitPred, Predicate tilePred){ Unit unit = getClosestEnemy(team, x, y, range, unitPred); if(unit != null){ return unit; }else{ - return findEnemyTile(team, x, y, range, tile -> true); + return findEnemyTile(team, x, y, range, tilePred); } } diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 8938aaf7ad..dfd5e02029 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -462,11 +462,8 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{ //region update methods - Vector2 last = new Vector2(); - @Override public void update(){ - last.set(this); hitTime -= Time.delta(); @@ -685,7 +682,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{ if(target == null){ isShooting = false; if(Core.settings.getBool("autotarget")){ - target = Units.getClosestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.none); + target = Units.getClosestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.none, u -> u.getTeam() != Team.none); if(mech.canHeal && target == null){ target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.blue)); diff --git a/core/src/io/anuke/mindustry/type/Liquid.java b/core/src/io/anuke/mindustry/type/Liquid.java index 72b67edea6..2f04dfa787 100644 --- a/core/src/io/anuke/mindustry/type/Liquid.java +++ b/core/src/io/anuke/mindustry/type/Liquid.java @@ -25,8 +25,6 @@ public class Liquid extends UnlockableContent{ public Color flameColor = Color.valueOf("ffb763"); /**The associated status effect.*/ public StatusEffect effect = StatusEffects.none; - /**Pump tier. Controls which pumps can use this liquid.*/ - public int tier; /**Displayed icon. TODO fix it by removing autogen, draw icons manually*/ public TextureRegion iconRegion; diff --git a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java index 8937fcaceb..37af6a825e 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java @@ -23,7 +23,6 @@ import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.game.EventType.StateChangeEvent; -import io.anuke.mindustry.game.Team; import io.anuke.mindustry.game.UnlockableContent; import io.anuke.mindustry.gen.Call; import io.anuke.mindustry.graphics.Pal; @@ -466,12 +465,8 @@ public class HudFragment extends Fragment{ }else{ state.wavetime = 0f; } - }).growY().fillX().right().width(40f).update(l -> { - boolean vis = !state.rules.waveTimer && ((Net.server() || players[0].isAdmin) || !Net.active()); - boolean paused = state.is(State.paused) || !vis; - - l.getStyle().imageUp = Core.scene.skin.getDrawable(vis ? "icon-play" : "clear"); - l.touchable(!paused ? Touchable.enabled : Touchable.disabled); - }).visible(() -> !state.rules.waveTimer && ((Net.server() || players[0].isAdmin) || !Net.active()) && unitGroups[Team.red.ordinal()].size() == 0); + }).growY().fillX().right().width(40f) + .visible(() -> state.rules.waves && ((Net.server() || players[0].isAdmin) || !Net.active()) && state.enemies() == 0 + && state.wavetime < state.rules.waveSpacing - 60); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index e421be3bd9..ff8f0b0662 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -28,7 +28,6 @@ import static io.anuke.mindustry.Vars.*; public class Conveyor extends Block{ private static final float itemSpace = 0.135f * 3f; - private static final float offsetScl = 128f * 3f; private static final float minmove = 1f / (Short.MAX_VALUE - 2); private static ItemPos drawpos = new ItemPos(); private static ItemPos pos1 = new ItemPos(); diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index a91b74e466..3bd9bb259e 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -160,7 +160,7 @@ public class Drill extends Block{ } }); - stats.add(BlockStat.drillSpeed, 60f / drillTime, StatUnit.itemsSecond); + stats.add(BlockStat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond); } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Pump.java b/core/src/io/anuke/mindustry/world/blocks/production/Pump.java index 75c168cc74..8201f434be 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Pump.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Pump.java @@ -21,8 +21,6 @@ public class Pump extends LiquidBlock{ /**Pump amount per tile this block is on.*/ protected float pumpAmount = 1f; - /**Maximum liquid tier this pump can use.*/ - protected int tier = 0; public Pump(String name){ super(name); @@ -42,7 +40,7 @@ public class Pump extends LiquidBlock{ @Override public void setStats(){ super.setStats(); - stats.add(BlockStat.liquidOutputSpeed, 60f * pumpAmount, StatUnit.liquidSecond); + stats.add(BlockStat.liquidOutputSpeed, 60f * pumpAmount * size * size, StatUnit.liquidSecond); } @Override @@ -115,7 +113,7 @@ public class Pump extends LiquidBlock{ } protected boolean isValid(Tile tile){ - return tile != null && tile.floor().liquidDrop != null && tier >= tile.floor().liquidDrop.tier; + return tile != null && tile.floor().liquidDrop != null; } } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java index 7af581fa66..226933c355 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java @@ -69,7 +69,7 @@ public class SolidPump extends Pump{ if(isMultiblock()){ for(Tile other : tile.getLinkedTiles(tempTiles)){ if(isValid(other)){ - fraction += 1f / size; + fraction += 1f / (size * size); } } }else{ diff --git a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java index be2cc85caa..92a8e9212c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java @@ -222,7 +222,7 @@ public class MechPad extends Block{ player.rotation = 90f; player.baseRotation = 90f; - player.set(x, y); + player.setNet(x, y); player.beginRespawning(this); } }