From 69575dbab340cdbf2277bff2e4248992dfac602c Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 9 May 2019 18:10:12 -0400 Subject: [PATCH] Fixed multiblocks not drawing --- core/src/io/anuke/mindustry/content/Bullets.java | 1 - .../io/anuke/mindustry/content/StatusEffects.java | 2 -- core/src/io/anuke/mindustry/content/Zones.java | 14 -------------- core/src/io/anuke/mindustry/editor/MapEditor.java | 2 ++ .../io/anuke/mindustry/editor/MapRenderer.java | 1 - .../io/anuke/mindustry/entities/type/Player.java | 2 +- core/src/io/anuke/mindustry/graphics/Shapes.java | 1 - core/src/io/anuke/mindustry/io/SaveVersion.java | 1 - core/src/io/anuke/mindustry/net/CrashSender.java | 1 - .../src/io/anuke/mindustry/type/WeatherEvent.java | 2 +- .../mindustry/ui/fragments/PlacementFragment.java | 2 +- core/src/io/anuke/mindustry/world/Tile.java | 15 +-------------- 12 files changed, 6 insertions(+), 38 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index fb6ca467fe..9119ed9575 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -424,7 +424,6 @@ public class Bullets implements ContentList{ @Override public void draw(Bullet b){ - //TODO add color to the bullet depending on the color of the flame it came from Draw.color(Pal.lightFlame, Pal.darkFlame, Color.GRAY, b.fin()); Fill.circle(b.x, b.y, 3f * b.fout()); Draw.reset(); diff --git a/core/src/io/anuke/mindustry/content/StatusEffects.java b/core/src/io/anuke/mindustry/content/StatusEffects.java index f10340df75..a869b0cbe9 100644 --- a/core/src/io/anuke/mindustry/content/StatusEffects.java +++ b/core/src/io/anuke/mindustry/content/StatusEffects.java @@ -75,8 +75,6 @@ public class StatusEffects implements ContentList{ armorMultiplier = 3f; damageMultiplier = 3f; speedMultiplier = 1.1f; - //TODO custom effect - //effect = Fx.overdriven; }}; shocked = new StatusEffect(); diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index a85fcd2e07..e8e3933150 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -154,20 +154,6 @@ public class Zones implements ContentList{ }}; }}; - /* - crags = new Zone("crags", new MapGenerator("groundZero", 1)){{ //TODO implement - baseLaunchCost = ItemStack.with(Items.copper, 300); - startingItems = ItemStack.with(Items.copper, 200); - conditionWave = 15; - zoneRequirements = new Zone[]{frozenForest}; - blockRequirements = new Block[]{Blocks.copperWall}; - rules = () -> new Rules(){{ - waves = true;] - waveTimer = true; - waveSpacing = 60 * 80; - }}; - }};*/ - stainedMountains = new Zone("stainedMountains", new MapGenerator("stainedMountains", 2) .dist(0f, false) .decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{ diff --git a/core/src/io/anuke/mindustry/editor/MapEditor.java b/core/src/io/anuke/mindustry/editor/MapEditor.java index f6f7f7c584..8968731799 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditor.java +++ b/core/src/io/anuke/mindustry/editor/MapEditor.java @@ -168,6 +168,8 @@ public class MapEditor{ if(block.isMultiblock() || block instanceof BlockPart){ return; } + + renderer.updatePoint(worldx, worldy); } } } diff --git a/core/src/io/anuke/mindustry/editor/MapRenderer.java b/core/src/io/anuke/mindustry/editor/MapRenderer.java index 8be3489f1d..decc0c18d3 100644 --- a/core/src/io/anuke/mindustry/editor/MapRenderer.java +++ b/core/src/io/anuke/mindustry/editor/MapRenderer.java @@ -85,7 +85,6 @@ public class MapRenderer implements Disposable{ } public void updatePoint(int x, int y){ - //TODO spread out over multiple frames? updates.add(x + y * width); } diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 033a51b1b8..3a653962ae 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -859,7 +859,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{ @Override public void write(DataOutput buffer) throws IOException{ super.writeSave(buffer, !isLocal); - TypeIO.writeStringData(buffer, name); //TODO writing strings is very inefficient + TypeIO.writeStringData(buffer, name); buffer.writeByte(Pack.byteValue(isAdmin) | (Pack.byteValue(dead) << 1) | (Pack.byteValue(isBoosting) << 2) | (Pack.byteValue(isTyping) << 3)); buffer.writeInt(Color.rgba8888(color)); buffer.writeByte(mech.id); diff --git a/core/src/io/anuke/mindustry/graphics/Shapes.java b/core/src/io/anuke/mindustry/graphics/Shapes.java index 4918d5dd1b..7e629d347b 100644 --- a/core/src/io/anuke/mindustry/graphics/Shapes.java +++ b/core/src/io/anuke/mindustry/graphics/Shapes.java @@ -5,7 +5,6 @@ import io.anuke.arc.graphics.g2d.*; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Tmp; -//TODO remove public class Shapes{ public static void laser(String line, String edge, float x, float y, float x2, float y2, float scale){ diff --git a/core/src/io/anuke/mindustry/io/SaveVersion.java b/core/src/io/anuke/mindustry/io/SaveVersion.java index 7026bdd549..1e217cffbe 100644 --- a/core/src/io/anuke/mindustry/io/SaveVersion.java +++ b/core/src/io/anuke/mindustry/io/SaveVersion.java @@ -72,7 +72,6 @@ public abstract class SaveVersion extends SaveFileReader{ } public void writeMap(DataOutput stream) throws IOException{ - //TODO something here messes up everything //write world size stream.writeShort(world.width()); stream.writeShort(world.height()); diff --git a/core/src/io/anuke/mindustry/net/CrashSender.java b/core/src/io/anuke/mindustry/net/CrashSender.java index b6e37c0dec..89a38ed5a5 100644 --- a/core/src/io/anuke/mindustry/net/CrashSender.java +++ b/core/src/io/anuke/mindustry/net/CrashSender.java @@ -26,7 +26,6 @@ public class CrashSender{ exception.printStackTrace(); //don't create crash logs for me (anuke) or custom builds, as it's expected - //TODO maybe custom builds such as bleeding edge in certain cases if(System.getProperty("user.name").equals("anuke") || Version.build == -1) return; //attempt to load version regardless diff --git a/core/src/io/anuke/mindustry/type/WeatherEvent.java b/core/src/io/anuke/mindustry/type/WeatherEvent.java index e2aaa5f778..385124a1b9 100644 --- a/core/src/io/anuke/mindustry/type/WeatherEvent.java +++ b/core/src/io/anuke/mindustry/type/WeatherEvent.java @@ -2,7 +2,7 @@ package io.anuke.mindustry.type; import io.anuke.mindustry.game.Content; -//TODO implement-- should it even be content? +//currently unimplemented, see trello for implementation plans public class WeatherEvent extends Content{ public final String name; diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java index c8c0013a23..0514f6fc35 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java @@ -38,7 +38,7 @@ public class PlacementFragment extends Fragment{ Table blockTable, toggler, topTable; boolean lastGround; - //TODO make this configurable + //not configurable, no plans to make it configurable final KeyCode[] inputGrid = { KeyCode.NUM_1, KeyCode.NUM_2, KeyCode.NUM_3, KeyCode.NUM_4, KeyCode.Q, KeyCode.W, KeyCode.E, KeyCode.R, diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 70b652912a..97a5f3b1b8 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -452,19 +452,6 @@ public class Tile implements Position, TargetTrait{ @Override public String toString(){ - return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass())) + - (isLinked() ? " link=[" + linkX(rotation) + ", " + linkY(rotation) + "]" : ""); - } - - //TODO remove these! - - /**Returns the relative X from a link byte.*/ - public static int linkX(byte value){ - return -((byte)((value >> 4) & (byte)0x0F) - 8); - } - - /**Returns the relative Y from a link byte.*/ - public static int linkY(byte value){ - return -((byte)(value & 0x0F) - 8); + return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass())); } } \ No newline at end of file