Better fog / Research cost tweaks
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user