mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
Balance
This commit is contained in:
parent
6c3372e71c
commit
59b5d809db
@ -726,6 +726,7 @@ setting.blockreplace.name = Automatic Block Suggestions
|
|||||||
setting.linear.name = Linear Filtering
|
setting.linear.name = Linear Filtering
|
||||||
setting.hints.name = Hints
|
setting.hints.name = Hints
|
||||||
setting.flow.name = Display Resource Flow Rate
|
setting.flow.name = Display Resource Flow Rate
|
||||||
|
setting.backgroundpause.name = Pause In Background
|
||||||
setting.buildautopause.name = Auto-Pause Building
|
setting.buildautopause.name = Auto-Pause Building
|
||||||
setting.animatedwater.name = Animated Surfaces
|
setting.animatedwater.name = Animated Surfaces
|
||||||
setting.animatedshields.name = Animated Shields
|
setting.animatedshields.name = Animated Shields
|
||||||
|
@ -412,13 +412,15 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pause(){
|
public void pause(){
|
||||||
wasPaused = state.is(State.paused);
|
if(settings.getBool("backgroundpause", true)){
|
||||||
if(state.is(State.playing)) state.set(State.paused);
|
wasPaused = state.is(State.paused);
|
||||||
|
if(state.is(State.playing)) state.set(State.paused);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resume(){
|
public void resume(){
|
||||||
if(state.is(State.paused) && !wasPaused){
|
if(state.is(State.paused) && !wasPaused && settings.getBool("backgroundpause", true)){
|
||||||
state.set(State.playing);
|
state.set(State.playing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -378,6 +378,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("@ok", this::hide).size(120, 50).pad(4);
|
cont.button("@ok", this::hide).size(120, 50).pad(4);
|
||||||
|
closeOnBack();
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,6 +406,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.button("@ok", this::hide).size(110, 50).fillX().left();
|
cont.button("@ok", this::hide).size(110, 50).fillX().left();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(col).colspan(2).pad(2);
|
cont.add(col).colspan(2).pad(2);
|
||||||
|
closeOnBack();
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,6 +422,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
||||||
cont.row();
|
cont.row();
|
||||||
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
|
closeOnBack();
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,6 +430,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(titleText){{
|
new Dialog(titleText){{
|
||||||
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
||||||
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
|
closeOnBack();
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,6 +440,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
||||||
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
|
closeOnBack();
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,7 +869,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
public void placed(){
|
public void placed(){
|
||||||
if(net.client()) return;
|
if(net.client()) return;
|
||||||
|
|
||||||
if((block.consumesPower && !block.outputsPower) || (!block.consumesPower && block.outputsPower)){
|
if(block.consumesPower || block.outputsPower){
|
||||||
int range = 10;
|
int range = 10;
|
||||||
tempTiles.clear();
|
tempTiles.clear();
|
||||||
Geometry.circle(tileX(), tileY(), range, (x, y) -> {
|
Geometry.circle(tileX(), tileY(), range, (x, y) -> {
|
||||||
|
@ -197,7 +197,7 @@ public class Universe{
|
|||||||
if(!sector.isAttacked() && turn > invasionGracePeriod){
|
if(!sector.isAttacked() && turn > invasionGracePeriod){
|
||||||
//invasion chance depends on # of nearby bases
|
//invasion chance depends on # of nearby bases
|
||||||
if(Mathf.chance(baseInvasionChance * sector.near().count(Sector::hasEnemyBase))){
|
if(Mathf.chance(baseInvasionChance * sector.near().count(Sector::hasEnemyBase))){
|
||||||
int waveMax = Math.max(sector.info.winWave, sector.isBeingPlayed() ? state.wave : 0) + Mathf.random(2, 5) * 5;
|
int waveMax = Math.max(sector.info.winWave, state.wave) + Mathf.random(2, 5) * 5;
|
||||||
|
|
||||||
//assign invasion-related things
|
//assign invasion-related things
|
||||||
if(sector.isBeingPlayed()){
|
if(sector.isBeingPlayed()){
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package mindustry.ui.dialogs;
|
package mindustry.ui.dialogs;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.input.*;
|
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.core.GameState.*;
|
import mindustry.core.GameState.*;
|
||||||
@ -54,11 +53,7 @@ public class BaseDialog extends Dialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addCloseListener(){
|
public void addCloseListener(){
|
||||||
keyDown(key -> {
|
closeOnBack();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -281,7 +281,9 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
game.checkPref("blockreplace", true);
|
game.checkPref("blockreplace", true);
|
||||||
game.checkPref("conveyorpathfinding", true);
|
game.checkPref("conveyorpathfinding", true);
|
||||||
game.checkPref("hints", true);
|
game.checkPref("hints", true);
|
||||||
|
|
||||||
if(!mobile){
|
if(!mobile){
|
||||||
|
game.checkPref("backgroundpause", true);
|
||||||
game.checkPref("buildautopause", false);
|
game.checkPref("buildautopause", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ public class Block extends UnlockableContent{
|
|||||||
public ItemStack[] researchRequirements(){
|
public ItemStack[] researchRequirements(){
|
||||||
ItemStack[] out = new ItemStack[requirements.length];
|
ItemStack[] out = new ItemStack[requirements.length];
|
||||||
for(int i = 0; i < out.length; i++){
|
for(int i = 0; i < out.length; i++){
|
||||||
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.15f) * 20 * researchCostMultiplier, 10);
|
int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.15f) * 20 * researchCostMultiplier, 10);
|
||||||
|
|
||||||
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
|
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
protected void getPotentialLinks(Tile tile, Cons<Building> others){
|
protected void getPotentialLinks(Tile tile, Cons<Building> others){
|
||||||
Boolf<Building> valid = other -> other != null && other.tile() != tile && other.power != null &&
|
Boolf<Building> valid = other -> other != null && other.tile() != tile && other.power != null &&
|
||||||
((!other.block.outputsPower && other.block.consumesPower) || (other.block.outputsPower && !other.block.consumesPower) || other.block instanceof PowerNode) &&
|
(other.block.outputsPower || other.block.consumesPower || other.block instanceof PowerNode) &&
|
||||||
overlaps(tile.x * tilesize + offset, tile.y * tilesize + offset, other.tile(), laserRange * tilesize) && other.team == player.team()
|
overlaps(tile.x * tilesize + offset, tile.y * tilesize + offset, other.tile(), laserRange * tilesize) && other.team == player.team()
|
||||||
&& !other.proximity.contains(e -> e.tile == tile) && !graphs.contains(other.power.graph);
|
&& !other.proximity.contains(e -> e.tile == tile) && !graphs.contains(other.power.graph);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user