diff --git a/core/assets/version.properties b/core/assets/version.properties index e369f5a76b..95ceb34662 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sat Apr 14 21:02:06 EDT 2018 +#Sat Apr 14 21:49:43 EDT 2018 version=release -androidBuildCode=922 +androidBuildCode=923 name=Mindustry code=3.5 build=custom build diff --git a/core/src/io/anuke/mindustry/content/blocks/Blocks.java b/core/src/io/anuke/mindustry/content/blocks/Blocks.java index c58d7f879c..6ce3406b3f 100644 --- a/core/src/io/anuke/mindustry/content/blocks/Blocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/Blocks.java @@ -37,6 +37,7 @@ public class Blocks { }}, deepwater = new Floor("deepwater") {{ + placeableOn = false; liquidColor = Color.valueOf("546bb3"); speedMultiplier = 0.2f; variants = 0; diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 50460f2ef1..c8c13070ee 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -236,7 +236,11 @@ public class Player extends Unit{ dashing = Inputs.keyDown("dash"); - float speed = dashing ? (debug ? Player.dashSpeed * 5f : Player.dashSpeed) : Player.speed; + float speed = dashing ? (debug ? Player.dashSpeed * 5f : Player.dashSpeed) : Player.speed ; + + float carrySlowdown = 0.3f; + + speed *= ((1f-carrySlowdown) + (inventory.hasItem() ? (float)inventory.getItem().amount/inventory.capacity(): 1f) * carrySlowdown); if(health < maxhealth && timer.get(timerRegen, 20)) health ++; diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 282ff144f6..f05666eb35 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -60,6 +60,8 @@ public class Block extends BaseBlock { public boolean breakable; /**whether this block can be drowned in*/ public boolean liquid; + /**whether this floor can be placed on.*/ + public boolean placeableOn = true; /**time it takes to break*/ public float breaktime = 18; /**tile entity health*/ diff --git a/core/src/io/anuke/mindustry/world/Placement.java b/core/src/io/anuke/mindustry/world/Placement.java index 7db7438ba4..a6b2c800a3 100644 --- a/core/src/io/anuke/mindustry/world/Placement.java +++ b/core/src/io/anuke/mindustry/world/Placement.java @@ -132,14 +132,14 @@ public class Placement { for(int dx = 0; dx < type.size; dx ++){ for(int dy = 0; dy < type.size; dy ++){ Tile other = world.tile(x + dx + offsetx, y + dy + offsety); - if(other == null || (other.block() != Blocks.air && !other.block().alwaysReplace) || isSpawnPoint(other)){ + if(other == null || (other.block() != Blocks.air && !other.block().alwaysReplace) || isSpawnPoint(other) || !other.floor().placeableOn){ return false; } } } return true; }else { - return (tile.getTeam() == Team.none || tile.getTeam() == team) + return (tile.getTeam() == Team.none || tile.getTeam() == team) && tile.floor().placeableOn && ((type.canReplace(tile.block()) && !(type == tile.block() && rotation == tile.getRotation() && type.rotate)) || tile.block().alwaysReplace) && tile.block().isMultiblock() == type.isMultiblock() || tile.block() == Blocks.air; }