Removed and added many TODOs

This commit is contained in:
Anuken 2018-01-09 18:02:37 -05:00
parent 9c48ab1128
commit c6dfe1775e
21 changed files with 14 additions and 89 deletions

View file

@ -32,7 +32,6 @@ public class DonationsActivity extends FragmentActivity {
setTheme(R.style.GdxTheme);
//TODO
setContentView(R.layout.donations_activity);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
@ -74,7 +73,7 @@ public class DonationsActivity extends FragmentActivity {
Fragment fragment = fragmentManager.findFragmentByTag("donationsFragment");
if (fragment != null) {
fragment.onActivityResult(requestCode, resultCode, data);
//TODO donation event, set settings
//TODO donation event, set settings?
}
}
}

View file

@ -20,7 +20,7 @@ public class Vars{
//respawn time in frames
public static final float respawnduration = 60*4;
//time between waves in frames (on normal mode)
public static final float wavespace = 60*60*(android ? 1 : 1); //TODO revert
public static final float wavespace = 60*60*(android ? 1 : 1);
//waves can last no longer than 3 minutes, otherwise the next one spawns
public static final float maxwavespace = 60*60*4f;
//advance time the pathfinding starts at

View file

@ -16,7 +16,7 @@ public class MHueristic implements Heuristic<Tile>{
public static float estimateStatic(Tile node, Tile other){
float cost = Math.abs(node.worldx() - other.worldx()) + Math.abs(node.worldy() - other.worldy());
//TODO balance multiplier
if(node.breakable() && node.block().solid) cost += Vars.tilesize*multiplier;
if(other.breakable() && other.block().solid) cost += Vars.tilesize*multiplier;

View file

@ -1,7 +1,5 @@
package io.anuke.mindustry.entities;
import static io.anuke.mindustry.Vars.tilesize;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.entities.BulletEntity;
@ -9,6 +7,8 @@ import io.anuke.ucore.entities.Entity;
import io.anuke.ucore.entities.SolidEntity;
import io.anuke.ucore.util.Mathf;
import static io.anuke.mindustry.Vars.tilesize;
public class Bullet extends BulletEntity{
BulletType type;
@ -39,7 +39,6 @@ public class Bullet extends BulletEntity{
targetEntity = tile.entity;
}else{
//make sure to check for linked block collisions
//TODO move this to the block class?
Tile linked = tile.getLinked();
if(linked != null &&
linked.entity != null && linked.entity.collide(this) && !linked.entity.dead){

View file

@ -20,7 +20,6 @@ public class Shield extends Entity{
private float uptime = 0f;
private final Tile tile;
//TODO
public Shield(Tile tile){
this.tile = tile;

View file

@ -63,7 +63,6 @@ public class TeslaOrb extends Entity{
}
void damageEnemy(Enemy enemy){
//TODO
enemy.damage(damage);
Effects.effect(Fx.laserhit, enemy.x + Mathf.range(2f), enemy.y + Mathf.range(2f));
}

View file

@ -36,7 +36,7 @@ public class FortressType extends EnemyType {
if(Timers.get(this, "spawn", spawnTime) && enemy.spawned < maxSpawn){
Angles.translation(enemy.angle, 20f);
Enemy s = new Enemy(EnemyTypes.fast); //TODO assign type!
Enemy s = new Enemy(EnemyTypes.fast);
s.lane = enemy.lane;
s.tier = enemy.tier;
s.spawner = enemy;

View file

@ -91,8 +91,6 @@ public class Maps implements Disposable{
saveCustomMap(map);
Vars.ui.levels.reload();
//TODO reload map dialog
}
public void saveMaps(Array<Map> array, FileHandle file){

View file

@ -150,8 +150,7 @@ public class SaveIO{
public static void load(FileHandle file){
load(file.read());
}
//TODO GWT support
public static void load(InputStream is){
DataInputStream stream;

View file

@ -15,7 +15,6 @@ import io.anuke.ucore.function.Consumer;
import java.io.IOException;
//TODO stub
public class Net{
private static boolean server;
private static boolean active;

View file

@ -9,7 +9,7 @@ public class PressGroup{
private boolean active = true;
public void add(Button button){
//TODO make only one button in the group be clickable
//TODO make only one button in the group be clickable, add implementation
buttons.add(button);
}

View file

@ -10,7 +10,7 @@ import io.anuke.ucore.util.Strings;
import java.io.IOException;
//TODO
//TODO add port specification
public class HostDialog extends Dialog{
float w = 300;

View file

@ -46,7 +46,6 @@ public class SettingsMenuDialog extends SettingsDialog{
wasPaused = ((PausedDialog)menu).wasPaused;
}
if(!Net.active()) GameState.set(State.paused);
//TODO hide menu
Vars.ui.paused.hide();
}
});

View file

@ -25,7 +25,6 @@ import io.anuke.ucore.scene.ui.layout.Unit;
import static io.anuke.ucore.core.Core.scene;
import static io.anuke.ucore.core.Core.skin;
//TODO show chat even when not toggled
public class ChatFragment extends Table implements Fragment{
private final static int messagesShown = 10;
private final static int maxLength = 150;
@ -49,7 +48,7 @@ public class ChatFragment extends Table implements Fragment{
setVisible(() -> !GameState.is(State.menu) && Net.active());
//TODO put it input
//TODO put it in input?
update(() -> {
if(Net.active() && Inputs.keyTap("chat")){
toggle();
@ -154,7 +153,7 @@ public class ChatFragment extends Table implements Fragment{
scene.setKeyboardFocus(null);
chatOpen = !chatOpen;
sendMessage();
fadetime = messagesShown + 1; //TODO?
fadetime = messagesShown + 1;
}
}

View file

@ -70,7 +70,6 @@ public class Tile{
}
public void damageNearby(int rad, int amount, float falloff){
//TODO damage falloff?
for(int dx = -rad; dx <= rad; dx ++){
for(int dy = -rad; dy <= rad; dy ++){
float dst = Vector2.dst(dx, dy, 0, 0);

View file

@ -173,8 +173,7 @@ public class WeaponBlocks{
shots = 2;
shootEffect = Fx.chainshot;
}
//TODO specify turret shootInternal effect in turret instead of doing it manually
@Override
protected void shoot(Tile tile){
TurretEntity entity = tile.entity();

View file

@ -100,7 +100,7 @@ public class Conveyor extends Block{
!(pos2.set(entity.convey.get(i + 1)).y - pos.y < itemSpace * Timers.delta());
if(canmove){
pos.y += Math.max(speed * Timers.delta(), 1f/252f); //TODO fix precision issues?
pos.y += Math.max(speed * Timers.delta(), 1f/252f); //TODO fix precision issues when at high FPS?
pos.x = Mathf.lerpDelta(pos.x, 0, 0.06f);
}else{
pos.x = Mathf.lerpDelta(pos.x, pos.seed/offsetScl, 0.1f);

View file

@ -33,7 +33,6 @@ public class Router extends Block{
@Override
public void update(Tile tile){
//TODO fix, check issue
tile.setRotation((byte)Mathf.mod(tile.getRotation(), 4));
if(tile.entity.totalItems() > 0){

View file

@ -1,60 +0,0 @@
package io.anuke.mindustry.world.blocks.types.production;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
public class LiquidItemPowerGenerator extends LiquidPowerGenerator{
public Item generateItem;
public int itemInput = 5;
public int itemCapacity = 30;
public LiquidItemPowerGenerator(String name) {
super(name);
}
@Override
public void drawSelect(Tile tile){
super.drawSelect(tile);
TileEntity entity = tile.entity();
Vector2 offset = getPlaceOffset();
Vars.renderer.drawBar(Color.GREEN, tile.worldx() + offset.x, tile.worldy() + 6 +
offset.y + height*Vars.tilesize/2f, (float)entity.getItem(generateItem) / itemCapacity);
Draw.reset();
}
//TODO implement?
/*
@Override
public void update(Tile tile){
LiquidPowerEntity entity = tile.entity();
//TODO don't generate when full of energy
if(entity.liquidAmount >= inputLiquid && entity.hasItem(generateItem, itemInput)
&& entity.power + generatePower < powerCapacity
&& Timers.get(tile, "consume", generateTime)){
entity.liquidAmount -= inputLiquid;
entity.power += generatePower;
Vector2 offset = getPlaceOffset();
Effects.effect(generateEffect, tile.worldx() + offset.x, tile.worldy() + offset.y);
}
distributeLaserPower(tile);
}*/
@Override
public boolean acceptItem(Item item, Tile tile, Tile source){
return item == generateItem && tile.entity.getItem(generateItem) < itemCapacity;
}
}

View file

@ -20,12 +20,10 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
//TODO possibly proken
public class NuclearReactor extends LiquidPowerGenerator{
protected final int timerFuel = timers++;
protected Item generateItem;
protected int itemInput = 5;
protected int itemCapacity = 30;
protected Color coolColor = new Color(1, 1, 1, 0f);
protected Color hotColor = Color.valueOf("ff9575a3");

View file

@ -46,7 +46,7 @@ public class DesktopLauncher {
};
handlers.joinRequest = request -> {
//TODO actual text
//TODO actual text, implementation of discord join dialog, possibly move it to Dialogs
Vars.ui.showConfirmListen("$text.join.discord.title", "$text.join.discord", b -> {
if(b){
lib.Discord_Respond(request.userId, DiscordRPC.DISCORD_REPLY_YES);