Implemented various suggestions

- Pathfinding weighs walls more
- C disables all HUD
- Unloader doesn't store items
- Some bugfixes
This commit is contained in:
Anuken
2020-05-07 21:37:41 -04:00
parent 2ca7f553bb
commit 2b9d618bd2
16 changed files with 78 additions and 54 deletions

View File

@@ -20,7 +20,7 @@ public class Tile implements Position, QuadTreeObject{
static final ObjectSet<Tilec> tileSet = new ObjectSet<>();
/** Tile traversal cost. */
public byte cost = 1;
public short cost = 1;
/** Tile entity, usually null. */
public @Nullable Tilec entity;
public short x, y;
@@ -452,32 +452,22 @@ public class Tile implements Position, QuadTreeObject{
}
}
//+24
if(occluded){
cost += 2;
}
//+26
if(block.synthetic() && solid()){
cost += Mathf.clamp(block.health / 10f, 0, 20);
cost += Mathf.clamp(block.health / 6f, 0, 1000);
}
//+46
if(floor.isLiquid){
cost += 10;
}
//+56
if(floor.drownTime > 0){
cost += 70;
}
//+126
if(cost < 0){
cost = Byte.MAX_VALUE;
}