Minor tweaks

This commit is contained in:
Anuken
2022-02-18 15:04:48 -05:00
parent 396afb5144
commit f9c0065a99
4 changed files with 14 additions and 9 deletions

View File

@@ -2486,7 +2486,7 @@ public class UnitTypes{
heatColor = Color.valueOf("f9350f");
cooldownTime = 80f;
bullet = new BasicBulletType(8f, 140){{
bullet = new BasicBulletType(8f, 130){{
sprite = "missile-large";
width = 9.5f;
height = 15f;
@@ -2502,6 +2502,8 @@ public class UnitTypes{
trailWidth = 3.1f;
trailLength = 8;
hitEffect = despawnEffect = Fx.blastExplosion;
splashDamageRadius = 20f;
splashDamage = 50f;
}};
}});

View File

@@ -16,7 +16,7 @@ import static mindustry.Vars.*;
public class FogControl implements CustomChunk{
private static volatile int ww, wh;
private static final int buildLight = 1;
private static final int buildLight = 0;
private final Object sync = new Object();
/** indexed by [team] [packed array tile pos] */
@@ -42,7 +42,7 @@ public class FogControl implements CustomChunk{
if(state.rules.fog && read){
for(var build : Groups.build){
synchronized(events){
events.add(FogEvent.get(build.tile.x, build.tile.y, buildLight, build.team.id));
events.add(FogEvent.get(build.tile.x, build.tile.y, buildLight + build.block.size, build.team.id));
}
}

View File

@@ -11,12 +11,12 @@ import arc.util.*;
import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.world.*;
import static mindustry.Vars.*;
/** Highly experimental fog-of-war renderer. */
public class FogRenderer{
private static final float fogSpeed = 1f;
private FrameBuffer buffer = new FrameBuffer();
private LongSeq events = new LongSeq();
private Rect rect = new Rect();
@@ -27,9 +27,6 @@ public class FogRenderer{
lastTeam = null;
events.clear();
});
//TODO draw fog when tile is placed?
}
public void handleEvent(long event){
@@ -72,7 +69,13 @@ public class FogRenderer{
//process new fog events
for(int i = 0; i < events.size; i++){
long e = events.items[i];
Fill.poly(FogEvent.x(e) + 0.5f, FogEvent.y(e) + 0.5f, 20, FogEvent.radius(e) + 0.3f);
Tile tile = world.tile(FogEvent.x(e), FogEvent.y(e));
float o = 0f;
//visual offset for uneven blocks; this is not reflected on the CPU, but it doesn't really matter
if(tile != null && tile.block().size % 2 == 0 && tile.isCenter()){
o = 0.5f;
}
Fill.poly(FogEvent.x(e) + 0.5f + o, FogEvent.y(e) + 0.5f + o, 20, FogEvent.radius(e) + 0.3f);
}
events.clear();

View File

@@ -61,7 +61,7 @@ public class UnitCargoLoader extends Block{
super.drawPlace(x, y, rotation, valid);
if(!Units.canCreate(Vars.player.team(), unitType)){
drawPlaceText(Core.bundle.get("@bar.cargounitcap"), x, y, valid);
drawPlaceText(Core.bundle.get("bar.cargounitcap"), x, y, valid);
}
}