Removed unnecessary TODOs
This commit is contained in:
@@ -143,7 +143,6 @@ public class EntityIO{
|
|||||||
if(sl) cont("if(!islocal)");
|
if(sl) cont("if(!islocal)");
|
||||||
|
|
||||||
if(sf){
|
if(sf){
|
||||||
//TODO + targetSuf may not give the right result, test it
|
|
||||||
st(field.name + lastSuf + " = this." + field.name + targetSuf);
|
st(field.name + lastSuf + " = this." + field.name + targetSuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ public class JsonIO{
|
|||||||
json.setElementType(Rules.class, "spawns", SpawnGroup.class);
|
json.setElementType(Rules.class, "spawns", SpawnGroup.class);
|
||||||
json.setElementType(Rules.class, "loadout", ItemStack.class);
|
json.setElementType(Rules.class, "loadout", ItemStack.class);
|
||||||
|
|
||||||
//TODO this is terrible
|
|
||||||
|
|
||||||
json.setSerializer(Sector.class, new Serializer<>(){
|
json.setSerializer(Sector.class, new Serializer<>(){
|
||||||
@Override
|
@Override
|
||||||
public void write(Json json, Sector object, Class knownType){
|
public void write(Json json, Sector object, Class knownType){
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import arc.*;
|
|||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.noise.*;
|
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.ai.types.*;
|
import mindustry.ai.types.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
@@ -538,7 +537,7 @@ public class LExecutor{
|
|||||||
public void run(LExecutor exec){
|
public void run(LExecutor exec){
|
||||||
Object obj = exec.obj(target);
|
Object obj = exec.obj(target);
|
||||||
if(obj instanceof Building b && b.team == exec.team && exec.linkIds.contains(b.id)){
|
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));
|
b.control(type, exec.obj(p1), exec.num(p2), exec.num(p3), exec.num(p4));
|
||||||
}else{
|
}else{
|
||||||
b.control(type, exec.num(p1), exec.num(p2), exec.num(p3), exec.num(p4));
|
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 v = exec.var(to);
|
||||||
Var f = exec.var(from);
|
Var f = exec.var(from);
|
||||||
|
|
||||||
//TODO error out when the from-value is a constant
|
|
||||||
if(!v.constant){
|
if(!v.constant){
|
||||||
if(f.isobj){
|
if(f.isobj){
|
||||||
v.objval = f.objval;
|
v.objval = f.objval;
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ public class Administration{
|
|||||||
});
|
});
|
||||||
|
|
||||||
//block interaction rate limit
|
//block interaction rate limit
|
||||||
//TODO when someone disconnects, a different player is mistakenly kicked for spamming actions
|
|
||||||
addActionFilter(action -> {
|
addActionFilter(action -> {
|
||||||
if(action.type != ActionType.breakBlock &&
|
if(action.type != ActionType.breakBlock &&
|
||||||
action.type != ActionType.placeBlock &&
|
action.type != ActionType.placeBlock &&
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ public class ParticleWeather extends Weather{
|
|||||||
region = Core.atlas.find(particleRegion);
|
region = Core.atlas.find(particleRegion);
|
||||||
|
|
||||||
//load noise texture
|
//load noise texture
|
||||||
//TODO mod support
|
|
||||||
if(drawNoise && Core.assets != null){
|
if(drawNoise && Core.assets != null){
|
||||||
Core.assets.load("sprites/" + noisePath + ".png", Texture.class);
|
Core.assets.load("sprites/" + noisePath + ".png", Texture.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ public class KeybindDialog extends Dialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(sections.length != 1){
|
if(sections.length != 1){
|
||||||
//TODO toggle style
|
|
||||||
TextButton button = new TextButton(bundle.get("section." + section.name + ".name", Strings.capitalize(section.name))/*, "toggle"*/);
|
TextButton button = new TextButton(bundle.get("section." + section.name + ".name", Strings.capitalize(section.name))/*, "toggle"*/);
|
||||||
if(section.equals(this.section))
|
if(section.equals(this.section))
|
||||||
button.toggle();
|
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()));
|
if(showImport) dialog.buttons.button("@mods.browser.reinstall", Icon.download, () -> githubImportMod(mod.getRepo(), mod.isJava()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO improve this menu later
|
|
||||||
dialog.cont.pane(desc -> {
|
dialog.cont.pane(desc -> {
|
||||||
desc.center();
|
desc.center();
|
||||||
desc.defaults().padTop(10).left();
|
desc.defaults().padTop(10).left();
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
dialog.add("@sectors.captured");
|
dialog.add("@sectors.captured");
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO unimplemented, cutscene needed
|
||||||
public void showPlanetLaunch(Sector sector, Cons<Sector> listener){
|
public void showPlanetLaunch(Sector sector, Cons<Sector> listener){
|
||||||
selected = null;
|
selected = null;
|
||||||
hovered = null;
|
hovered = null;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import arc.util.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.production.GenericCrafter.*;
|
import mindustry.world.blocks.production.GenericCrafter.*;
|
||||||
|
|
||||||
//TODO
|
|
||||||
public class DrawArcSmelter extends DrawBlock{
|
public class DrawArcSmelter extends DrawBlock{
|
||||||
public TextureRegion top, bottom;
|
public TextureRegion top, bottom;
|
||||||
public Color flameColor = Color.valueOf("f58349"), midColor = Color.valueOf("f2d585");
|
public Color flameColor = Color.valueOf("f58349"), midColor = Color.valueOf("f2d585");
|
||||||
|
|||||||
+1
-1
@@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
|
|||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
#needed for android compilation
|
#needed for android compilation
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
archash=b9d3067269d34c8f0cf3657c6b3919e327727f7e
|
archash=52f21644b8f70c3a926d3d8d8130f0d71e0e4e79
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.backend.headless.*;
|
import arc.backend.headless.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
|
||||||
import arc.math.*;
|
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
@@ -508,72 +506,6 @@ public class ApplicationTests{
|
|||||||
world.tile(0, 0).build.acceptStack(Items.copper, 1000, null);
|
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
|
@Test
|
||||||
void conveyorBench(){
|
void conveyorBench(){
|
||||||
int[] itemsa = {0};
|
int[] itemsa = {0};
|
||||||
|
|||||||
@@ -390,7 +390,6 @@ public class Generators{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO broken, freezes
|
|
||||||
generate("unit-icons", () -> content.units().each(type -> {
|
generate("unit-icons", () -> content.units().each(type -> {
|
||||||
if(type.isHidden()) return; //hidden units don't generate
|
if(type.isHidden()) return; //hidden units don't generate
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user