Merge remote-tracking branch 'origin/7.0-features' into 7.0-features
This commit is contained in:
@@ -86,6 +86,13 @@ public final class FogControl implements CustomChunk{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//unit dead -> fog updates
|
||||||
|
Events.on(UnitDestroyEvent.class, e -> {
|
||||||
|
if(state.rules.fog && fog[e.unit.team.id] != null){
|
||||||
|
fog[e.unit.team.id].dynamicUpdated = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
SaveVersion.addCustomChunk("static-fog-data", this);
|
SaveVersion.addCustomChunk("static-fog-data", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class OverlayRenderer{
|
|||||||
Draw.color();
|
Draw.color();
|
||||||
}else{
|
}else{
|
||||||
state.teams.eachEnemyCore(player.team(), core -> {
|
state.teams.eachEnemyCore(player.team(), core -> {
|
||||||
if(Core.camera.bounds(Tmp.r1).overlaps(Tmp.r2.setCentered(core.x, core.y, state.rules.enemyCoreBuildRadius * 2f))){
|
if(core.wasVisible && Core.camera.bounds(Tmp.r1).overlaps(Tmp.r2.setCentered(core.x, core.y, state.rules.enemyCoreBuildRadius * 2f))){
|
||||||
Draw.color(Color.darkGray);
|
Draw.color(Color.darkGray);
|
||||||
Lines.circle(core.x, core.y - 2, state.rules.enemyCoreBuildRadius);
|
Lines.circle(core.x, core.y - 2, state.rules.enemyCoreBuildRadius);
|
||||||
Draw.color(Pal.accent, core.team.color, 0.5f + Mathf.absin(Time.time, 10f, 0.5f));
|
Draw.color(Pal.accent, core.team.color, 0.5f + Mathf.absin(Time.time, 10f, 0.5f));
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
public void drawOverlapCheck(Block block, int cursorX, int cursorY, boolean valid){
|
public void drawOverlapCheck(Block block, int cursorX, int cursorY, boolean valid){
|
||||||
if(!valid && state.rules.placeRangeCheck){
|
if(!valid && state.rules.placeRangeCheck){
|
||||||
var blocker = Build.getEnemyOverlap(block, player.team(), cursorX, cursorY);
|
var blocker = Build.getEnemyOverlap(block, player.team(), cursorX, cursorY);
|
||||||
if(blocker != null){
|
if(blocker != null && blocker.wasVisible){
|
||||||
Drawf.selected(blocker, Pal.remove);
|
Drawf.selected(blocker, Pal.remove);
|
||||||
Tmp.v1.set(cursorX, cursorY).scl(tilesize).add(block.offset, block.offset).sub(blocker).scl(-1f).nor();
|
Tmp.v1.set(cursorX, cursorY).scl(tilesize).add(block.offset, block.offset).sub(blocker).scl(-1f).nor();
|
||||||
Drawf.dashLineDst(Pal.remove,
|
Drawf.dashLineDst(Pal.remove,
|
||||||
|
|||||||
@@ -79,9 +79,12 @@ public class BurstDrill extends Drill{
|
|||||||
}
|
}
|
||||||
|
|
||||||
invertTime = 1f;
|
invertTime = 1f;
|
||||||
Effect.shake(shake, shake, this);
|
|
||||||
progress %= drillTime;
|
progress %= drillTime;
|
||||||
drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
|
||||||
|
if(wasVisible){
|
||||||
|
Effect.shake(shake, shake, this);
|
||||||
|
drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ public class Drill extends Block{
|
|||||||
|
|
||||||
progress %= delay;
|
progress %= delay;
|
||||||
|
|
||||||
drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
if(wasVisible) drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ public class GenericCrafter extends Block{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Mathf.chanceDelta(updateEffectChance)){
|
if(wasVisible && Mathf.chanceDelta(updateEffectChance)){
|
||||||
updateEffect.at(x + Mathf.range(size * 4f), y + Mathf.range(size * 4));
|
updateEffect.at(x + Mathf.range(size * 4f), y + Mathf.range(size * 4));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -242,7 +242,9 @@ public class GenericCrafter extends Block{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
craftEffect.at(x, y);
|
if(wasVisible){
|
||||||
|
craftEffect.at(x, y);
|
||||||
|
}
|
||||||
progress %= 1f;
|
progress %= 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class WallCrafter extends Block{
|
|||||||
|
|
||||||
float eff = getEfficiency(tile.x, tile.y, rotation, dest -> {
|
float eff = getEfficiency(tile.x, tile.y, rotation, dest -> {
|
||||||
//TODO make not chance based?
|
//TODO make not chance based?
|
||||||
if(cons && Mathf.chanceDelta(updateEffectChance * warmup)){
|
if(wasVisible && cons && Mathf.chanceDelta(updateEffectChance * warmup)){
|
||||||
updateEffect.at(
|
updateEffect.at(
|
||||||
dest.worldx() + Mathf.range(3f) - dx * tilesize,
|
dest.worldx() + Mathf.range(3f) - dx * tilesize,
|
||||||
dest.worldy() + Mathf.range(3f) - dy * tilesize,
|
dest.worldy() + Mathf.range(3f) - dy * tilesize,
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ public class CoreBlock extends StorageBlock{
|
|||||||
if(player == null || tile == null || !(tile.build instanceof CoreBuild entity)) return;
|
if(player == null || tile == null || !(tile.build instanceof CoreBuild entity)) return;
|
||||||
|
|
||||||
CoreBlock block = (CoreBlock)tile.block();
|
CoreBlock block = (CoreBlock)tile.block();
|
||||||
Fx.spawn.at(entity);
|
if(entity.wasVisible){
|
||||||
|
Fx.spawn.at(entity);
|
||||||
|
}
|
||||||
|
|
||||||
player.set(entity);
|
player.set(entity);
|
||||||
|
|
||||||
@@ -392,7 +394,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
if(team == state.rules.defaultTeam && state.isCampaign()){
|
if(team == state.rules.defaultTeam && state.isCampaign()){
|
||||||
state.rules.sector.info.handleCoreItem(item, amount);
|
state.rules.sector.info.handleCoreItem(item, amount);
|
||||||
|
|
||||||
if(realAmount == 0){
|
if(realAmount == 0 && wasVisible){
|
||||||
Fx.coreBurn.at(x, y);
|
Fx.coreBurn.at(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class StorageBlock extends Block{
|
|||||||
if(Mathf.chance(0.3)){
|
if(Mathf.chance(0.3)){
|
||||||
Tile edge = Edges.getFacingEdge(source, self);
|
Tile edge = Edges.getFacingEdge(source, self);
|
||||||
Tile edge2 = Edges.getFacingEdge(self, source);
|
Tile edge2 = Edges.getFacingEdge(self, source);
|
||||||
if(edge != null && edge2 != null){
|
if(edge != null && edge2 != null && self.wasVisible){
|
||||||
Fx.coreBurn.at((edge.worldx() + edge2.worldx())/2f, (edge.worldy() + edge2.worldy())/2f);
|
Fx.coreBurn.at((edge.worldx() + edge2.worldx())/2f, (edge.worldy() + edge2.worldy())/2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=162d5f8fa4
|
archash=d630626387
|
||||||
|
|||||||
Reference in New Issue
Block a user