This commit is contained in:
Anuken 2020-08-13 09:18:47 -04:00
parent 1249eb3b00
commit 9ba98ed4b4
7 changed files with 9 additions and 40 deletions

View File

@ -894,10 +894,10 @@ public class Blocks implements ContentList{
requirements(Category.effect, with(Items.lead, 25, Items.silicon, 12)); requirements(Category.effect, with(Items.lead, 25, Items.silicon, 12));
hasShadow = false; hasShadow = false;
health = 40; health = 40;
damage = 11; damage = 23;
tileDamage = 7f; tileDamage = 7f;
length = 10; length = 10;
tendrils = 5; tendrils = 4;
}}; }};
//endregion //endregion

View File

@ -72,6 +72,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override @Override
public double sense(LAccess sensor){ public double sense(LAccess sensor){
if(sensor == LAccess.totalItems) return stack().amount; if(sensor == LAccess.totalItems) return stack().amount;
if(sensor == LAccess.rotation) return rotation;
if(sensor == LAccess.health) return health; if(sensor == LAccess.health) return health;
if(sensor == LAccess.x) return x; if(sensor == LAccess.x) return x;
if(sensor == LAccess.y) return y; if(sensor == LAccess.y) return y;

View File

@ -53,6 +53,7 @@ public class BuildPlan{
} }
/** Transforms the internal position of this config using the specified function, and return the result. */
public static Object pointConfig(Block block, Object config, Cons<Point2> cons){ public static Object pointConfig(Block block, Object config, Cons<Point2> cons){
if(config instanceof Point2){ if(config instanceof Point2){
config = ((Point2)config).cpy(); config = ((Point2)config).cpy();
@ -71,8 +72,7 @@ public class BuildPlan{
return config; return config;
} }
/** If this requests's config is a Point2 or an array of Point2s, this returns a copy of them for transformation. /** Transforms the internal position of this config using the specified function. */
* Otherwise does nothing. */
public void pointConfig(Cons<Point2> cons){ public void pointConfig(Cons<Point2> cons){
this.config = pointConfig(block, this.config, cons); this.config = pointConfig(block, this.config, cons);
} }

View File

@ -532,10 +532,10 @@ public class MobileInput extends InputHandler implements GestureListener{
lineMode = true; lineMode = true;
if(mode == breaking){ if(mode == breaking){
Fx.tapBlock.at(cursor.worldx(), cursor.worldy(), 1f); if(!state.isPaused()) Fx.tapBlock.at(cursor.worldx(), cursor.worldy(), 1f);
}else if(block != null){ }else if(block != null){
updateLine(lineStartX, lineStartY, cursor.x, cursor.y); updateLine(lineStartX, lineStartY, cursor.x, cursor.y);
Fx.tapBlock.at(cursor.worldx() + block.offset, cursor.worldy() + block.offset, block.size); if(!state.isPaused()) Fx.tapBlock.at(cursor.worldx() + block.offset, cursor.worldy() + block.offset, block.size);
} }
} }

View File

@ -646,37 +646,4 @@ public class LStatements{
return LCategory.control; return LCategory.control;
} }
} }
//disabled until further notice - bypasses the network
/*
@RegisterStatement("getbuild")
public static class getBuildStatement extends LStatement{
public String x = "0", y = "0", dest = "result";
@Override
public void build(Table table){
table.field(dest, Styles.nodeField, str -> dest = str)
.size(100f, 40f).pad(2f).color(table.color);
table.add(" = ");
table.field(x, Styles.nodeField, str -> x = str)
.size(90f, 40f).pad(2f).color(table.color);
table.add(", ");
table.field(y, Styles.nodeField, str -> y = str)
.size(90f, 40f).pad(2f).color(table.color);
}
@Override
public LInstruction build(LAssembler builder){
return new GetBuildI(builder.var(dest), builder.var(x), builder.var(y));
}
@Override
public LCategory category(){
return LCategory.blocks;
}
}*/
} }

View File

@ -405,6 +405,7 @@ public class Block extends UnlockableContent{
} }
/** Transforms the internal position of this config using the specified function, and return the result. */
public Object pointConfig(Object config, Cons<Point2> transformer){ public Object pointConfig(Object config, Cons<Point2> transformer){
return config; return config;
} }

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=55e3f18ceeafc718d401b62d0129855f665920e4 archash=425860b7f549e36a17bc6fa5b26798af5b291480