mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 20:48:33 +07:00
Fixed pathfinding using water / Fixed mech factories moving too fast
This commit is contained in:
parent
4fa165bc6a
commit
8c6cda0d97
@ -150,7 +150,7 @@ text.save.rename=Rename
|
||||
text.save.rename.text=New name:
|
||||
text.selectslot=Select a save.
|
||||
text.slot=[accent]Slot {0}
|
||||
text.save.corrupted=[orange]Save file corrupted or invalid!
|
||||
text.save.corrupted=[orange]Save file corrupted or invalid!\nIf you have just updated your game, this is probably a change in the save format and [scarlet]not[] a bug.
|
||||
text.empty=<empty>
|
||||
text.on=On
|
||||
text.off=Off
|
||||
|
@ -84,7 +84,7 @@ public class Pathfinder {
|
||||
}
|
||||
|
||||
private boolean passable(Tile tile, Team team){
|
||||
return (tile.getWallID() == 0 && tile.cliffs == 0 && !tile.floor().solid && !(tile.floor().isLiquid && (tile.floor().damageTaken > 0 || tile.floor().drownTime > 0)))
|
||||
return (tile.getWallID() == 0 && !tile.floor().isLiquid && tile.cliffs == 0 && !tile.floor().solid && !(tile.floor().isLiquid && (tile.floor().damageTaken > 0 || tile.floor().drownTime > 0)))
|
||||
|| (tile.breakable() && (tile.getTeam() != team)) || !tile.solid();
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ public class Control extends Module{
|
||||
if(!Settings.has("4.0-warning")){
|
||||
Settings.putBool("4.0-warning", true);
|
||||
|
||||
Timers.runTask(5f, () -> {
|
||||
Timers.run(5f, () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("[orange]WARNING![]");
|
||||
dialog.buttons().addButton("$text.ok", dialog::hide).size(100f, 60f);
|
||||
dialog.content().add("The beta version you are about to play should be considered very unstable, and is [accent]not representative of the final 4.0 release.[]\n\n " +
|
||||
@ -328,7 +328,7 @@ public class Control extends Module{
|
||||
if(!Settings.has("4.0-no-sound")){
|
||||
Settings.putBool("4.0-no-sound", true);
|
||||
|
||||
Timers.runTask(4f, () -> {
|
||||
Timers.run(4f, () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("[orange]Attention![]");
|
||||
dialog.buttons().addButton("$text.ok", dialog::hide).size(100f, 60f);
|
||||
dialog.content().add("You might have noticed that 4.0 does not have any sound.\nThis is [orange]intentional![] Sound will be added in a later update.\n\n[LIGHT_GRAY](now stop reporting this as a bug)").wrap().width(500f);
|
||||
|
@ -441,6 +441,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
boostHeat = 0f;
|
||||
updateRespawning();
|
||||
return;
|
||||
}else{
|
||||
spawner = -1;
|
||||
}
|
||||
|
||||
if(!isLocal){
|
||||
@ -667,11 +669,14 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
}
|
||||
|
||||
public void updateRespawning(){
|
||||
CoreEntity entity = (CoreEntity)getClosestCore();
|
||||
|
||||
if (entity != null) {
|
||||
if (spawner != -1 && world.tile(spawner) != null && world.tile(spawner).entity instanceof SpawnerTrait) {
|
||||
((SpawnerTrait) world.tile(spawner).entity).updateSpawning(this);
|
||||
}else{
|
||||
CoreEntity entity = (CoreEntity)getClosestCore();
|
||||
if(entity != null){
|
||||
this.spawner = entity.tile.id();
|
||||
entity.updateSpawning(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class MechFactory extends Block{
|
||||
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
|
||||
entity.progress += 1f / buildTime;
|
||||
|
||||
entity.time += entity.heat;
|
||||
entity.time += 0.5f;
|
||||
|
||||
if(entity.progress >= 1f){
|
||||
CallBlocks.onMechFactoryDone(tile);
|
||||
|
Loading…
Reference in New Issue
Block a user