mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 10:47:13 +07:00
Fixed #2346
This commit is contained in:
parent
1249eb3b00
commit
9ba98ed4b4
@ -894,10 +894,10 @@ public class Blocks implements ContentList{
|
||||
requirements(Category.effect, with(Items.lead, 25, Items.silicon, 12));
|
||||
hasShadow = false;
|
||||
health = 40;
|
||||
damage = 11;
|
||||
damage = 23;
|
||||
tileDamage = 7f;
|
||||
length = 10;
|
||||
tendrils = 5;
|
||||
tendrils = 4;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
|
@ -72,6 +72,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
@Override
|
||||
public double sense(LAccess sensor){
|
||||
if(sensor == LAccess.totalItems) return stack().amount;
|
||||
if(sensor == LAccess.rotation) return rotation;
|
||||
if(sensor == LAccess.health) return health;
|
||||
if(sensor == LAccess.x) return x;
|
||||
if(sensor == LAccess.y) return y;
|
||||
|
@ -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){
|
||||
if(config instanceof Point2){
|
||||
config = ((Point2)config).cpy();
|
||||
@ -71,8 +72,7 @@ public class BuildPlan{
|
||||
return config;
|
||||
}
|
||||
|
||||
/** If this requests's config is a Point2 or an array of Point2s, this returns a copy of them for transformation.
|
||||
* Otherwise does nothing. */
|
||||
/** Transforms the internal position of this config using the specified function. */
|
||||
public void pointConfig(Cons<Point2> cons){
|
||||
this.config = pointConfig(block, this.config, cons);
|
||||
}
|
||||
|
@ -532,10 +532,10 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
lineMode = true;
|
||||
|
||||
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){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -646,37 +646,4 @@ public class LStatements{
|
||||
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;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -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){
|
||||
return config;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=55e3f18ceeafc718d401b62d0129855f665920e4
|
||||
archash=425860b7f549e36a17bc6fa5b26798af5b291480
|
||||
|
Loading…
Reference in New Issue
Block a user