mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-09 02:09:07 +07:00
Added "Launching From" info
This commit is contained in:
parent
8692639e62
commit
72d5a8a768
BIN
core/assets-raw/sprites/effects/launch-arrow.png
Normal file
BIN
core/assets-raw/sprites/effects/launch-arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 213 B |
@ -505,6 +505,7 @@ loadout = Loadout
|
||||
resources = Resources
|
||||
bannedblocks = Banned Blocks
|
||||
addall = Add All
|
||||
launch.from = Launching From: [accent]{0}
|
||||
launch.destination = Destination: {0}
|
||||
configure.invalid = Amount must be a number between 0 and {0}.
|
||||
zone.unlocked = [lightgray]{0} unlocked.
|
||||
|
@ -43,6 +43,8 @@ public class SectorInfo{
|
||||
public boolean waves = true;
|
||||
/** Whether attack mode is enabled here. */
|
||||
public boolean attack = false;
|
||||
/** Whether this sector has any enemy spawns. */
|
||||
public boolean hasSpawns = true;
|
||||
/** Wave # from state */
|
||||
public int wave = 1, winWave = -1;
|
||||
/** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */
|
||||
@ -168,6 +170,7 @@ public class SectorInfo{
|
||||
secondsPassed = 0;
|
||||
wavesPassed = 0;
|
||||
damage = 0;
|
||||
hasSpawns = spawner.countSpawns() > 0;
|
||||
|
||||
if(state.rules.sector != null){
|
||||
state.rules.sector.saveInfo();
|
||||
|
@ -206,7 +206,7 @@ public class Universe{
|
||||
}
|
||||
|
||||
//queue random invasions
|
||||
if(!sector.isAttacked() && turn > invasionGracePeriod){
|
||||
if(!sector.isAttacked() && turn > invasionGracePeriod && sector.info.hasSpawns){
|
||||
//invasion chance depends on # of nearby bases
|
||||
if(Mathf.chance(baseInvasionChance * sector.near().count(Sector::hasEnemyBase))){
|
||||
int waveMax = Math.max(sector.info.winWave, sector.isBeingPlayed() ? state.wave : sector.info.wave + sector.info.wavesPassed) + Mathf.random(2, 5) * 5;
|
||||
|
@ -103,6 +103,8 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
||||
ButtonGroup<Button> group = new ButtonGroup<>();
|
||||
selected = universe.getLoadout(core);
|
||||
|
||||
cont.add(Core.bundle.format("launch.from", sector.name())).row();
|
||||
|
||||
cont.pane(t -> {
|
||||
int i = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user