Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ab96e2787 | ||
|
|
659c481c83 | ||
|
|
a18e1854ab | ||
|
|
6c67dc1266 | ||
|
|
0c581c520f | ||
|
|
c6c18696c0 | ||
|
|
4b1c55b876 |
@@ -12,7 +12,7 @@ public class FlyingAI extends AIController{
|
|||||||
@Override
|
@Override
|
||||||
public void updateMovement(){
|
public void updateMovement(){
|
||||||
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
|
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
|
||||||
if(unit.type.circleTarget){
|
if(!unit.type.circleTarget){
|
||||||
moveTo(target, unit.range() * 0.8f);
|
moveTo(target, unit.range() * 0.8f);
|
||||||
unit.lookAt(target);
|
unit.lookAt(target);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ public class Puddles{
|
|||||||
|
|
||||||
public static final float maxLiquid = 70f;
|
public static final float maxLiquid = 70f;
|
||||||
|
|
||||||
/** Deposists a Puddle between tile and source. */
|
/** Deposits a Puddle between tile and source. */
|
||||||
public static void deposit(Tile tile, Tile source, Liquid liquid, float amount){
|
public static void deposit(Tile tile, Tile source, Liquid liquid, float amount){
|
||||||
deposit(tile, source, liquid, amount, 0);
|
deposit(tile, source, liquid, amount, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Deposists a Puddle at a tile. */
|
/** Deposits a Puddle at a tile. */
|
||||||
public static void deposit(Tile tile, Liquid liquid, float amount){
|
public static void deposit(Tile tile, Liquid liquid, float amount){
|
||||||
deposit(tile, tile, liquid, amount, 0);
|
deposit(tile, tile, liquid, amount, 0);
|
||||||
}
|
}
|
||||||
@@ -38,9 +38,9 @@ public class Puddles{
|
|||||||
|
|
||||||
Puddle p = map.get(tile.pos());
|
Puddle p = map.get(tile.pos());
|
||||||
|
|
||||||
if(generation == 0 && p != null && p.lastRipple() <= Time.time - 40f){
|
if(generation == 0 && p != null && p.lastRipple <= Time.time - 40f){
|
||||||
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, tile.floor().liquidDrop.color);
|
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, tile.floor().liquidDrop.color);
|
||||||
p.lastRipple(Time.time);
|
p.lastRipple = Time.time;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -62,9 +62,9 @@ public class Puddles{
|
|||||||
}else if(p.liquid() == liquid){
|
}else if(p.liquid() == liquid){
|
||||||
p.accepting(Math.max(amount, p.accepting()));
|
p.accepting(Math.max(amount, p.accepting()));
|
||||||
|
|
||||||
if(generation == 0 && p.lastRipple() <= Time.time - 40f && p.amount() >= maxLiquid / 2f){
|
if(generation == 0 && p.lastRipple <= Time.time - 40f && p.amount() >= maxLiquid / 2f){
|
||||||
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, p.liquid().color);
|
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, p.liquid().color);
|
||||||
p.lastRipple(Time.time);
|
p.lastRipple = Time.time;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
p.amount(p.amount() + reactPuddle(p.liquid(), liquid, amount, p.tile(), (p.x() + source.worldx())/2f, (p.y() + source.worldy())/2f));
|
p.amount(p.amount() + reactPuddle(p.liquid(), liquid, amount, p.tile(), (p.x() + source.worldx())/2f, (p.y() + source.worldy())/2f));
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ import static mindustry.entities.Puddles.*;
|
|||||||
abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
||||||
private static final int maxGeneration = 2;
|
private static final int maxGeneration = 2;
|
||||||
private static final Color tmp = new Color();
|
private static final Color tmp = new Color();
|
||||||
private static final Rect rect = new Rect();
|
private static final Rect rect = new Rect(), rect2 = new Rect();
|
||||||
private static final Rect rect2 = new Rect();
|
|
||||||
private static int seeds;
|
private static int seeds;
|
||||||
|
|
||||||
@Import float x, y;
|
@Import float x, y;
|
||||||
@@ -53,7 +52,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
|||||||
Tile other = world.tile(tile.x + point.x, tile.y + point.y);
|
Tile other = world.tile(tile.x + point.x, tile.y + point.y);
|
||||||
if(other != null && other.block() == Blocks.air){
|
if(other != null && other.block() == Blocks.air){
|
||||||
Puddles.deposit(other, tile, liquid, deposited, generation + 1);
|
Puddles.deposit(other, tile, liquid, deposited, generation + 1);
|
||||||
amount -= deposited / 2f; //tweak to speed up/slow down Puddlec propagation
|
amount -= deposited / 2f; //tweak to speed up/slow down Puddle propagation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import mindustry.ui.fragments.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
import mindustry.world.blocks.ConstructBlock.*;
|
import mindustry.world.blocks.ConstructBlock.*;
|
||||||
|
import mindustry.world.blocks.distribution.*;
|
||||||
import mindustry.world.blocks.payloads.*;
|
import mindustry.world.blocks.payloads.*;
|
||||||
import mindustry.world.blocks.power.*;
|
import mindustry.world.blocks.power.*;
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||||
@@ -1161,7 +1162,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(diagonal){
|
if(diagonal){
|
||||||
points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY);
|
var start = world.build(startX, startY);
|
||||||
|
var end = world.build(endX, endY);
|
||||||
|
if(block != null && start instanceof ChainedBuilding && end instanceof ChainedBuilding
|
||||||
|
&& block.canReplace(end.block) && block.canReplace(start.block)){
|
||||||
|
points = Placement.upgradeLine(startX, startY, endX, endY);
|
||||||
|
}else{
|
||||||
|
points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
points = Placement.normalizeLine(startX, startY, endX, endY);
|
points = Placement.normalizeLine(startX, startY, endX, endY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.math.geom.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.pooling.*;
|
import arc.util.pooling.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.blocks.distribution.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -23,7 +24,6 @@ public class Placement{
|
|||||||
/** Normalize a diagonal line into points. */
|
/** Normalize a diagonal line into points. */
|
||||||
public static Seq<Point2> pathfindLine(boolean conveyors, int startX, int startY, int endX, int endY){
|
public static Seq<Point2> pathfindLine(boolean conveyors, int startX, int startY, int endX, int endY){
|
||||||
Pools.freeAll(points);
|
Pools.freeAll(points);
|
||||||
|
|
||||||
points.clear();
|
points.clear();
|
||||||
if(conveyors && Core.settings.getBool("conveyorpathfinding")){
|
if(conveyors && Core.settings.getBool("conveyorpathfinding")){
|
||||||
if(astar(startX, startY, endX, endY)){
|
if(astar(startX, startY, endX, endY)){
|
||||||
@@ -54,6 +54,19 @@ public class Placement{
|
|||||||
return points;
|
return points;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Seq<Point2> upgradeLine(int startX, int startY, int endX, int endY){
|
||||||
|
Pools.freeAll(points);
|
||||||
|
points.clear();
|
||||||
|
var build = world.build(startX, startY);
|
||||||
|
points.add(Pools.obtain(Point2.class, Point2::new).set(startX, startY));
|
||||||
|
while(build instanceof ChainedBuilding chain && (build.tile.x != endX || build.tile.y != endY)){
|
||||||
|
if(chain.next() == null) return pathfindLine(true, startX, startY, endX, endY);
|
||||||
|
build = chain.next();
|
||||||
|
points.add(Pools.obtain(Point2.class, Point2::new).set(build.tile.x, build.tile.y));
|
||||||
|
}
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
private static float tileHeuristic(Tile tile, Tile other){
|
private static float tileHeuristic(Tile tile, Tile other){
|
||||||
Block block = control.input.block;
|
Block block = control.input.block;
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public float health = 200f, range = -1, armor = 0f, maxRange = -1f;
|
public float health = 200f, range = -1, armor = 0f, maxRange = -1f;
|
||||||
public float crashDamageMultiplier = 1f;
|
public float crashDamageMultiplier = 1f;
|
||||||
public boolean targetAir = true, targetGround = true;
|
public boolean targetAir = true, targetGround = true;
|
||||||
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false, circleTarget = true;
|
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false, circleTarget = false;
|
||||||
public boolean canBoost = false;
|
public boolean canBoost = false;
|
||||||
public boolean destructibleWreck = true;
|
public boolean destructibleWreck = true;
|
||||||
public float groundLayer = Layer.groundUnit;
|
public float groundLayer = Layer.groundUnit;
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package mindustry.world.blocks.distribution;
|
||||||
|
|
||||||
|
import mindustry.gen.*;
|
||||||
|
|
||||||
|
public interface ChainedBuilding{
|
||||||
|
Building next();
|
||||||
|
}
|
||||||
@@ -91,7 +91,7 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
Mathf.mod(req.tile().build.rotation - req.rotation, 2) == 1 ? Blocks.junction : this;
|
Mathf.mod(req.tile().build.rotation - req.rotation, 2) == 1 ? Blocks.junction : this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConveyorBuild extends Building{
|
public class ConveyorBuild extends Building implements ChainedBuilding{
|
||||||
//parallel array data
|
//parallel array data
|
||||||
public Item[] ids = new Item[capacity];
|
public Item[] ids = new Item[capacity];
|
||||||
public float[] xs = new float[capacity];
|
public float[] xs = new float[capacity];
|
||||||
@@ -391,5 +391,11 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
|
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public Building next(){
|
||||||
|
return nextc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
|
import mindustry.world.blocks.distribution.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -73,7 +74,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
return new TextureRegion[]{Core.atlas.find("conduit-bottom"), topRegions[0]};
|
return new TextureRegion[]{Core.atlas.find("conduit-bottom"), topRegions[0]};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConduitBuild extends LiquidBuild{
|
public class ConduitBuild extends LiquidBuild implements ChainedBuilding{
|
||||||
public float smoothLiquid;
|
public float smoothLiquid;
|
||||||
public int blendbits, xscl, yscl, blending;
|
public int blendbits, xscl, yscl, blending;
|
||||||
|
|
||||||
@@ -137,5 +138,15 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
sleep();
|
sleep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public Building next(){
|
||||||
|
Tile next = tile.nearby(rotation);
|
||||||
|
if(next != null && next.build instanceof ConduitBuild){
|
||||||
|
return next.build;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
fastlane/metadata/android/en-US/changelogs/29788.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/29788.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[This is a truncated changelog, see Github for full notes]
|
||||||
|
- Decreased junction item capacity - this may cause slight desync on servers running previous 121 versions, servers are advised to update
|
||||||
|
- Many various small bugfixes
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "mindustry.pl",
|
"name": "mindustry.pl",
|
||||||
"address": ["mindustry.pl:6000", "mindustry.pl:6666", "91.134.217.10:6006"]
|
"address": ["mindustry.pl:6000", "mindustry.pl:6666", "mindustry.pl"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "{AA}",
|
"name": "{AA}",
|
||||||
|
|||||||
Reference in New Issue
Block a user