Prevent achievements from completing with dev console open
This commit is contained in:
@@ -4499,7 +4499,7 @@ public class Blocks{
|
|||||||
deathExplosionEffect = Fx.massiveExplosion;
|
deathExplosionEffect = Fx.massiveExplosion;
|
||||||
shootOnDeath = true;
|
shootOnDeath = true;
|
||||||
shake = 10f;
|
shake = 10f;
|
||||||
bullet = new ExplosionBulletType(60f, 65f){{
|
bullet = new ExplosionBulletType(620f, 65f){{
|
||||||
hitColor = Pal.redLight;
|
hitColor = Pal.redLight;
|
||||||
shootEffect = new MultiEffect(Fx.massiveExplosion, Fx.scatheExplosion, Fx.scatheLight, new WaveEffect(){{
|
shootEffect = new MultiEffect(Fx.massiveExplosion, Fx.scatheExplosion, Fx.scatheLight, new WaveEffect(){{
|
||||||
lifetime = 10f;
|
lifetime = 10f;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package mindustry.service;
|
package mindustry.service;
|
||||||
|
|
||||||
|
import arc.util.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public enum Achievement{
|
public enum Achievement{
|
||||||
@@ -138,8 +140,12 @@ public enum Achievement{
|
|||||||
|
|
||||||
public void complete(){
|
public void complete(){
|
||||||
if(!isAchieved()){
|
if(!isAchieved()){
|
||||||
|
//can't complete achievements with the dev console shown.
|
||||||
|
if(ui != null && ui.consolefrag != null && ui.consolefrag.shown() && !OS.username.equals("anuke")) return;
|
||||||
|
|
||||||
service.completeAchievement(name());
|
service.completeAchievement(name());
|
||||||
service.storeStats();
|
service.storeStats();
|
||||||
|
completed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ public class ConsumeLiquidFilter extends ConsumeLiquidBase{
|
|||||||
public void build(Building build, Table table){
|
public void build(Building build, Table table){
|
||||||
Seq<Liquid> list = content.liquids().select(l -> !l.isHidden() && filter.get(l));
|
Seq<Liquid> list = content.liquids().select(l -> !l.isHidden() && filter.get(l));
|
||||||
MultiReqImage image = new MultiReqImage();
|
MultiReqImage image = new MultiReqImage();
|
||||||
list.each(liquid -> image.add(new ReqImage(liquid.uiIcon, () ->
|
list.each(liquid -> image.add(new ReqImage(liquid.uiIcon, () -> getConsumed(build) == liquid)));
|
||||||
build.liquids != null && build.liquids.get(liquid) > 0)));
|
|
||||||
|
|
||||||
table.add(image).size(8 * 4);
|
table.add(image).size(8 * 4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=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=8793e01874
|
archash=5a1cbb8b59
|
||||||
|
|||||||
Reference in New Issue
Block a user