mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 04:28:27 +07:00
Fixed #7484
This commit is contained in:
parent
2f6ef4cefe
commit
4cd78aad91
@ -900,6 +900,7 @@ ability.statusfield = {0} Status Field
|
||||
ability.unitspawn = {0} Factory
|
||||
ability.shieldregenfield = Shield Regen Field
|
||||
ability.movelightning = Movement Lightning
|
||||
ability.shieldarc = Shield Arc
|
||||
ability.energyfield = Energy Field: [accent]{0}[] damage ~ [accent]{1}[] blocks / [accent]{2}[] targets
|
||||
|
||||
bar.onlycoredeposit = Only Core Depositing Allowed
|
||||
|
@ -22,7 +22,7 @@ public class ControlPathfinder{
|
||||
private static final long maxUpdate = Time.millisToNanos(30);
|
||||
private static final int updateFPS = 60;
|
||||
private static final int updateInterval = 1000 / updateFPS;
|
||||
private static final int wallImpassableCap = 100_000;
|
||||
private static final int wallImpassableCap = 1_000_000;
|
||||
|
||||
public static final PathCost
|
||||
|
||||
@ -134,13 +134,17 @@ public class ControlPathfinder{
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var view = Core.camera.bounds(Tmp.r1);
|
||||
int len = req.frontier.size;
|
||||
float[] weights = req.frontier.weights;
|
||||
int[] poses = req.frontier.queue;
|
||||
for(int i = 0; i < len; i++){
|
||||
Draw.color(Tmp.c1.set(Color.white).fromHsv((weights[i] * 4f) % 360f, 1f, 0.9f));
|
||||
for(int i = 0; i < Math.min(len, 1000); i++){
|
||||
int pos = poses[i];
|
||||
Lines.square(pos % wwidth * tilesize, pos / wwidth * tilesize, 4f);
|
||||
if(view.contains(pos % wwidth * tilesize, pos / wwidth * tilesize)){
|
||||
Draw.color(Tmp.c1.set(Color.white).fromHsv((weights[i] * 4f) % 360f, 1f, 0.9f));
|
||||
|
||||
Lines.square(pos % wwidth * tilesize, pos / wwidth * tilesize, 4f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Draw.reset();
|
||||
@ -529,6 +533,8 @@ public class ControlPathfinder{
|
||||
float add = tileCost(team, cost, current, next);
|
||||
float currentCost = costs.get(current);
|
||||
|
||||
if(add < 0) continue;
|
||||
|
||||
//the cost can include an impassable enemy wall, so cap the cost if so and add the base cost instead
|
||||
//essentially this means that any path with enemy walls will only count the walls once, preventing strange behavior like avoiding based on wall count
|
||||
float newCost = currentCost >= wallImpassableCap && add >= wallImpassableCap ? currentCost + add - wallImpassableCap : currentCost + add;
|
||||
|
@ -4367,10 +4367,10 @@ public class Blocks{
|
||||
lustre = new ContinuousTurret("lustre"){{
|
||||
requirements(Category.turret, with(Items.silicon, 250, Items.graphite, 200, Items.oxide, 50, Items.carbide, 90));
|
||||
|
||||
range = 100f;
|
||||
range = 130f;
|
||||
|
||||
shootType = new PointLaserBulletType(){{
|
||||
damage = 140f;
|
||||
damage = 180f;
|
||||
buildingDamageMultiplier = 0.3f;
|
||||
hitColor = Color.valueOf("fda981");
|
||||
}};
|
||||
|
Loading…
Reference in New Issue
Block a user