mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Pathfinder fix / Version logging
This commit is contained in:
parent
c924559327
commit
2dee4a380f
3 changed files with 8 additions and 3 deletions
|
|
@ -279,6 +279,10 @@ public class Vars implements Loadable{
|
||||||
Version.init();
|
Version.init();
|
||||||
CacheLayer.init();
|
CacheLayer.init();
|
||||||
|
|
||||||
|
if(!headless){
|
||||||
|
Log.info("[Mindustry] Version: @", Version.buildString());
|
||||||
|
}
|
||||||
|
|
||||||
dataDirectory = settings.getDataDirectory();
|
dataDirectory = settings.getDataDirectory();
|
||||||
screenshotDirectory = dataDirectory.child("screenshots/");
|
screenshotDirectory = dataDirectory.child("screenshots/");
|
||||||
customMapDirectory = dataDirectory.child("maps/");
|
customMapDirectory = dataDirectory.child("maps/");
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.blocks.*;
|
||||||
import mindustry.world.blocks.environment.*;
|
import mindustry.world.blocks.environment.*;
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
@ -152,11 +153,11 @@ public class Pathfinder implements Runnable{
|
||||||
|
|
||||||
/** Packs a tile into its internal representation. */
|
/** Packs a tile into its internal representation. */
|
||||||
public int packTile(Tile tile){
|
public int packTile(Tile tile){
|
||||||
boolean nearLiquid = false, nearSolid = false, nearGround = false, solid = tile.solid(), allDeep = tile.floor().isDeep();
|
boolean nearLiquid = false, nearSolid = false, nearGround = false, solid = tile.solid() || tile.block() instanceof ConstructBlock, allDeep = tile.floor().isDeep();
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
Tile other = tile.nearby(i);
|
Tile other = tile.nearby(i);
|
||||||
if(other != null) {
|
if(other != null){
|
||||||
Floor floor = other.floor();
|
Floor floor = other.floor();
|
||||||
boolean osolid = other.solid();
|
boolean osolid = other.solid();
|
||||||
if(floor.isLiquid) nearLiquid = true;
|
if(floor.isLiquid) nearLiquid = true;
|
||||||
|
|
|
||||||
|
|
@ -1616,7 +1616,7 @@ public class Fx{
|
||||||
alpha(0.5f);
|
alpha(0.5f);
|
||||||
rand.setSeed(e.id);
|
rand.setSeed(e.id);
|
||||||
for(int i = 0; i < 35; i++){
|
for(int i = 0; i < 35; i++){
|
||||||
v.trns(e.rotation + rand.range(21f), rand.random(e.finpow() * 90f)).add(rand.range(3f), rand.range(3f));
|
v.trns(e.rotation + 180f + rand.range(21f), rand.random(e.finpow() * 90f)).add(rand.range(3f), rand.range(3f));
|
||||||
e.scaled(e.lifetime * rand.random(0.2f, 1f), b -> {
|
e.scaled(e.lifetime * rand.random(0.2f, 1f), b -> {
|
||||||
Fill.circle(e.x + v.x, e.y + v.y, b.fout() * 9f + 0.3f);
|
Fill.circle(e.x + v.x, e.y + v.y, b.fout() * 9f + 0.3f);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue