From 9ba98ed4b403f407ba28887421e0195d9345d460 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 13 Aug 2020 09:18:47 -0400 Subject: [PATCH] Fixed #2346 --- core/src/mindustry/content/Blocks.java | 4 +-- .../src/mindustry/entities/comp/UnitComp.java | 1 + .../mindustry/entities/units/BuildPlan.java | 4 +-- core/src/mindustry/input/MobileInput.java | 4 +-- core/src/mindustry/logic/LStatements.java | 33 ------------------- core/src/mindustry/world/Block.java | 1 + gradle.properties | 2 +- 7 files changed, 9 insertions(+), 40 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index e55ecf8098..624e2aad09 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -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 diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index ff6c2ea62e..d500666ba2 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -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; diff --git a/core/src/mindustry/entities/units/BuildPlan.java b/core/src/mindustry/entities/units/BuildPlan.java index 1720bb6678..e8dba045d7 100644 --- a/core/src/mindustry/entities/units/BuildPlan.java +++ b/core/src/mindustry/entities/units/BuildPlan.java @@ -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 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 cons){ this.config = pointConfig(block, this.config, cons); } diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index cc6a3e6fff..a605a8580d 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -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); } } diff --git a/core/src/mindustry/logic/LStatements.java b/core/src/mindustry/logic/LStatements.java index d1f91a5def..7a5d7449c4 100644 --- a/core/src/mindustry/logic/LStatements.java +++ b/core/src/mindustry/logic/LStatements.java @@ -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; - } - }*/ } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index f48a5b40f3..2a8bc8e6f3 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -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 transformer){ return config; } diff --git a/gradle.properties b/gradle.properties index 387229d1ac..577b28a80c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=55e3f18ceeafc718d401b62d0129855f665920e4 +archash=425860b7f549e36a17bc6fa5b26798af5b291480