Fixed #7801
This commit is contained in:
@@ -73,7 +73,6 @@ public class Liquids{
|
|||||||
hidden = true;
|
hidden = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO reactivity, etc
|
|
||||||
ozone = new Liquid("ozone", Color.valueOf("fc81dd")){{
|
ozone = new Liquid("ozone", Color.valueOf("fc81dd")){{
|
||||||
gas = true;
|
gas = true;
|
||||||
barColor = Color.valueOf("d699f0");
|
barColor = Color.valueOf("d699f0");
|
||||||
@@ -81,7 +80,6 @@ public class Liquids{
|
|||||||
flammability = 1f;
|
flammability = 1f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO combustion
|
|
||||||
hydrogen = new Liquid("hydrogen", Color.valueOf("9eabf7")){{
|
hydrogen = new Liquid("hydrogen", Color.valueOf("9eabf7")){{
|
||||||
gas = true;
|
gas = true;
|
||||||
flammability = 1f;
|
flammability = 1f;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class EventType{
|
|||||||
//events that occur very often
|
//events that occur very often
|
||||||
public enum Trigger{
|
public enum Trigger{
|
||||||
shock,
|
shock,
|
||||||
|
openConsole,
|
||||||
blastFreeze,
|
blastFreeze,
|
||||||
impactPower,
|
impactPower,
|
||||||
blastGenerator,
|
blastGenerator,
|
||||||
|
|||||||
@@ -205,9 +205,7 @@ public class Saves{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void save(){
|
public void save(){
|
||||||
long time = totalPlaytime;
|
|
||||||
long prev = totalPlaytime;
|
long prev = totalPlaytime;
|
||||||
totalPlaytime = time;
|
|
||||||
|
|
||||||
SaveIO.save(file);
|
SaveIO.save(file);
|
||||||
meta = SaveIO.getMeta(file);
|
meta = SaveIO.getMeta(file);
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ public class GameService{
|
|||||||
captureAllSectors.complete();
|
captureAllSectors.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Events.run(Trigger.openConsole, () -> openConsole.complete());
|
||||||
|
|
||||||
Events.run(Trigger.unitCommandAttack, () -> {
|
Events.run(Trigger.unitCommandAttack, () -> {
|
||||||
if(campaign()){
|
if(campaign()){
|
||||||
issueAttackCommand.complete();
|
issueAttackCommand.complete();
|
||||||
@@ -534,10 +536,6 @@ public class GameService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ui.consolefrag.shown()){
|
|
||||||
openConsole.complete();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void save(){
|
private void save(){
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import arc.scene.ui.TextField.*;
|
|||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|
||||||
@@ -175,6 +176,7 @@ public class ConsoleFragment extends Table{
|
|||||||
public void toggle(){
|
public void toggle(){
|
||||||
|
|
||||||
if(!open){
|
if(!open){
|
||||||
|
Events.fire(Trigger.openConsole);
|
||||||
scene.setKeyboardFocus(chatfield);
|
scene.setKeyboardFocus(chatfield);
|
||||||
open = !open;
|
open = !open;
|
||||||
if(mobile){
|
if(mobile){
|
||||||
|
|||||||
Reference in New Issue
Block a user