Removed unnecessary TODOs

This commit is contained in:
Anuken
2021-06-22 16:07:19 -04:00
parent 4417a83424
commit d468a4f328
12 changed files with 3 additions and 82 deletions
@@ -143,7 +143,6 @@ public class EntityIO{
if(sl) cont("if(!islocal)");
if(sf){
//TODO + targetSuf may not give the right result, test it
st(field.name + lastSuf + " = this." + field.name + targetSuf);
}
-2
View File
@@ -70,8 +70,6 @@ public class JsonIO{
json.setElementType(Rules.class, "spawns", SpawnGroup.class);
json.setElementType(Rules.class, "loadout", ItemStack.class);
//TODO this is terrible
json.setSerializer(Sector.class, new Serializer<>(){
@Override
public void write(Json json, Sector object, Class knownType){
+1 -3
View File
@@ -4,7 +4,6 @@ import arc.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.util.*;
import arc.util.noise.*;
import mindustry.*;
import mindustry.ai.types.*;
import mindustry.content.*;
@@ -538,7 +537,7 @@ public class LExecutor{
public void run(LExecutor exec){
Object obj = exec.obj(target);
if(obj instanceof Building b && b.team == exec.team && exec.linkIds.contains(b.id)){
if(type.isObj && exec.var(p1).isobj){ //TODO may break logic?
if(type.isObj && exec.var(p1).isobj){
b.control(type, exec.obj(p1), exec.num(p2), exec.num(p3), exec.num(p4));
}else{
b.control(type, exec.num(p1), exec.num(p2), exec.num(p3), exec.num(p4));
@@ -765,7 +764,6 @@ public class LExecutor{
Var v = exec.var(to);
Var f = exec.var(from);
//TODO error out when the from-value is a constant
if(!v.constant){
if(f.isobj){
v.objval = f.objval;
@@ -61,7 +61,6 @@ public class Administration{
});
//block interaction rate limit
//TODO when someone disconnects, a different player is mistakenly kicked for spamming actions
addActionFilter(action -> {
if(action.type != ActionType.breakBlock &&
action.type != ActionType.placeBlock &&
@@ -33,7 +33,6 @@ public class ParticleWeather extends Weather{
region = Core.atlas.find(particleRegion);
//load noise texture
//TODO mod support
if(drawNoise && Core.assets != null){
Core.assets.load("sprites/" + noisePath + ".png", Texture.class);
}
@@ -72,7 +72,6 @@ public class KeybindDialog extends Dialog{
}
if(sections.length != 1){
//TODO toggle style
TextButton button = new TextButton(bundle.get("section." + section.name + ".name", Strings.capitalize(section.name))/*, "toggle"*/);
if(section.equals(this.section))
button.toggle();
@@ -324,7 +324,6 @@ public class ModsDialog extends BaseDialog{
if(showImport) dialog.buttons.button("@mods.browser.reinstall", Icon.download, () -> githubImportMod(mod.getRepo(), mod.isJava()));
}
//TODO improve this menu later
dialog.cont.pane(desc -> {
desc.center();
desc.defaults().padTop(10).left();
@@ -240,7 +240,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
dialog.add("@sectors.captured");
}
//TODO
//TODO unimplemented, cutscene needed
public void showPlanetLaunch(Sector sector, Cons<Sector> listener){
selected = null;
hovered = null;
@@ -8,7 +8,6 @@ import arc.util.*;
import mindustry.world.*;
import mindustry.world.blocks.production.GenericCrafter.*;
//TODO
public class DrawArcSmelter extends DrawBlock{
public TextureRegion top, bottom;
public Color flameColor = Color.valueOf("f58349"), midColor = Color.valueOf("f2d585");
+1 -1
View File
@@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
kotlin.stdlib.default.dependency=false
#needed for android compilation
android.useAndroidX=true
archash=b9d3067269d34c8f0cf3657c6b3919e327727f7e
archash=52f21644b8f70c3a926d3d8d8130f0d71e0e4e79
-68
View File
@@ -1,8 +1,6 @@
import arc.*;
import arc.backend.headless.*;
import arc.files.*;
import arc.func.*;
import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.util.*;
@@ -508,72 +506,6 @@ public class ApplicationTests{
world.tile(0, 0).build.acceptStack(Items.copper, 1000, null);
}
@Test
void indexingBasic(){
resetWorld();
SaveIO.load(Core.files.internal("77.msav"));
//test basic method.
Rand r = new Rand(0);
Building[] res = {null};
Cons<Building> assigner = t -> res[0] = t;
int iterations = 100;
r.setSeed(0);
//warmup.
for(int i = 0; i < iterations; i++){
int x = r.random(0, world.width()), y = r.random(0, world.height());
float range = r.random(tilesize * 30);
indexer.eachBlock(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
}
//TODO impl
/*
r.setSeed(0);
for(int i = 0; i < iterations; i++){
int x = r.random(0, world.width()), y = r.random(0, world.height());
float range = r.random(tilesize * 30);
indexer.eachBlock2(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
}*/
//benchmark.
r.setSeed(0);
Time.mark();
for(int i = 0; i < iterations; i++){
int x = r.random(0, world.width()), y = r.random(0, world.height());
float range = r.random(tilesize * 30);
indexer.eachBlock(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
}
Log.info("Time for basic indexing: @", Time.elapsed());
r.setSeed(0);
/*
Time.mark();
for(int i = 0; i < iterations; i++){
int x = r.random(0, world.width()), y = r.random(0, world.height());
float range = r.random(tilesize * 30);
indexer.eachBlock2(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
}
Log.info("Time for quad: {0}", Time.elapsed());
*/
}
@Test
void conveyorBench(){
int[] itemsa = {0};
@@ -390,7 +390,6 @@ public class Generators{
}
});
//TODO broken, freezes
generate("unit-icons", () -> content.units().each(type -> {
if(type.isHidden()) return; //hidden units don't generate