Better fog / Research cost tweaks

This commit is contained in:
Anuken
2022-02-19 16:24:22 -05:00
parent c5ec8ff3ce
commit 895fa784cf
17 changed files with 158 additions and 117 deletions

View File

@@ -1,5 +1,6 @@
package mindustry.world.blocks.defense.turrets;
import arc.math.*;
import arc.struct.*;
import arc.util.*;
import mindustry.content.*;
@@ -48,6 +49,7 @@ public class BaseTurret extends Block{
}
placeOverlapRange = Math.max(placeOverlapRange, range + placeOverlapMargin);
fogRadius = Math.max(Mathf.round(range / tilesize), fogRadius);
super.init();
}

View File

@@ -352,7 +352,7 @@ public class PowerNode extends PowerBlock{
}
public static boolean insulated(int x, int y, int x2, int y2){
return world.raycast(x, y, x2, y2, (wx, wy) -> {
return World.raycast(x, y, x2, y2, (wx, wy) -> {
Building tile = world.build(wx, wy);
return tile != null && tile.isInsulated();
});

View File

@@ -104,6 +104,7 @@ public class CoreBlock extends StorageBlock{
public void init(){
//assign to update clipSize internally
lightRadius = 30f + 20f * size;
fogRadius = Math.max(fogRadius, (int)(lightRadius / 8f * 2f));
emitLight = true;
super.init();