Bugfixes / Incomplete zone description field

This commit is contained in:
Anuken 2019-07-14 15:25:30 -04:00
parent 2a10562e9e
commit 63e1311656
10 changed files with 150 additions and 97 deletions

View File

@ -7,7 +7,7 @@ link.github.description = Game source code
link.changelog.description = List of update changes
link.dev-builds.description = Unstable development builds
link.trello.description = Official Trello board for planned features
link.itch.io.description = itch.io page with PC downloads and web version
link.itch.io.description = itch.io page with PC downloads
link.google-play.description = Google Play store listing
link.wiki.description = Official Mindustry wiki
linkfail = Failed to open link!\nThe URL has been copied to your clipboard.
@ -49,7 +49,7 @@ close = Close
quit = Quit
maps = Maps
continue = Continue
maps.none = [LIGHT_GRAY]No maps found!
maps.none = [lightgray]No maps found!
about.button = About
name = Name:
noname = Pick a[accent] player name[] first.
@ -57,9 +57,9 @@ filename = File Name:
unlocked = New content unlocked!
completed = [accent]Completed
techtree = Tech Tree
research.list = [LIGHT_GRAY]Research:
research.list = [lightgray]Research:
research = Research
researched = [LIGHT_GRAY]{0} researched.
researched = [lightgray]{0} researched.
players = {0} players online
players.single = {0} player online
server.closing = [accent]Closing server...
@ -74,8 +74,8 @@ server.kicked.nameEmpty = Your chosen name is invalid.
server.kicked.idInUse = You are already on this server! Connecting with two accounts is not permitted.
server.kicked.customClient = This server does not support custom builds. Download an official version.
server.kicked.gameover = Game over!
host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \nAnybody on the same [LIGHT_GRAY]wifi or local network[] should be able to see your server in their server list.\n\nIf you want people to be able to connect from anywhere by IP, [accent]port forwarding[] is required.\n\n[LIGHT_GRAY]Note: If someone is experiencing trouble connecting to your LAN game, make sure you have allowed Mindustry access to your local network in your firewall settings.
join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[LIGHT_GRAY]Note: There is no automatic global server list; if you want to connect to someone by IP, you would need to ask the host for their IP.
host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \nAnybody on the same [lightgray]wifi or local network[] should be able to see your server in their server list.\n\nIf you want people to be able to connect from anywhere by IP, [accent]port forwarding[] is required.\n\n[lightgray]Note: If someone is experiencing trouble connecting to your LAN game, make sure you have allowed Mindustry access to your local network in your firewall settings.
join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[lightgray]Note: There is no automatic global server list; if you want to connect to someone by IP, you would need to ask the host for their IP.
hostserver = Host Game
hostserver.mobile = Host\nGame
host = Host
@ -118,7 +118,7 @@ server.port = Port:
server.addressinuse = Address already in use!
server.invalidport = Invalid port number!
server.error = [crimson]Error hosting server: [accent]{0}
save.old = This save is for an older version of the game, and can no longer be used.\n\n[LIGHT_GRAY]Save backwards compatibility will be implemented in the full 4.0 release.
save.old = This save is for an older version of the game, and can no longer be used.\n\n[lightgray]Save backwards compatibility will be implemented in the full 4.0 release.
save.new = New Save
save.overwrite = Are you sure you want to overwrite\nthis save slot?
overwrite = Overwrite
@ -161,12 +161,12 @@ quit.confirm = Are you sure you want to quit?
loading = [accent]Loading...
saving = [accent]Saving...
wave = [accent]Wave {0}
wave.waiting = [LIGHT_GRAY]Wave in {0}
wave.waveInProgress = [LIGHT_GRAY]Wave in progress
waiting = [LIGHT_GRAY]Waiting...
wave.waiting = [lightgray]Wave in {0}
wave.waveInProgress = [lightgray]Wave in progress
waiting = [lightgray]Waiting...
waiting.players = Waiting for players...
wave.enemies = [LIGHT_GRAY]{0} Enemies Remaining
wave.enemy = [LIGHT_GRAY]{0} Enemy Remaining
wave.enemies = [lightgray]{0} Enemies Remaining
wave.enemy = [lightgray]{0} Enemy Remaining
loadimage = Load Image
saveimage = Save Image
unknown = Unknown
@ -204,7 +204,7 @@ waves.load = Load from Clipboard
waves.invalid = Invalid waves in clipboard.
waves.copied = Waves copied.
waves.none = No enemies defined.\nNote that empty wave layouts will automatically be replaced with the default layout.
editor.default = [LIGHT_GRAY]<Default>
editor.default = [lightgray]<Default>
edit = Edit...
editor.name = Name:
editor.spawn = Spawn Unit
@ -263,7 +263,7 @@ toolmode.fillteams.description = Fill teams instead of blocks.
toolmode.drawteams = Draw Teams
toolmode.drawteams.description = Draw teams instead of blocks.
filters.empty = [LIGHT_GRAY]No filters! Add one with the button below.
filters.empty = [lightgray]No filters! Add one with the button below.
filter.distort = Distort
filter.noise = Noise
filter.ore = Ore
@ -307,22 +307,25 @@ donate = Donate
abandon = Abandon
abandon.text = This zone and all its resources will be lost to the enemy.
locked = Locked
complete = [LIGHT_GRAY]Reach:
complete = [lightgray]Reach:
zone.requirement = Wave {0} in zone {1}
resume = Resume Zone:\n[LIGHT_GRAY]{0}
bestwave = [LIGHT_GRAY]Best Wave: {0}
resume = Resume Zone:\n[lightgray]{0}
bestwave = [lightgray]Best Wave: {0}
launch = < LAUNCH >
launch.title = Launch Successful
launch.next = [LIGHT_GRAY]next opportunity at wave {0}
launch.next = [lightgray]next opportunity at wave {0}
launch.unable = [scarlet]Unable to LAUNCH.[] {0} Enemies.
launch.confirm = This will launch all resources in your core.\nYou will not be able to return to this base.
uncover = Uncover
configure = Configure Loadout
configure.locked = [LIGHT_GRAY]Unlock configuring loadout: Wave {0}.
zone.unlocked = [LIGHT_GRAY]{0} unlocked.
configure.locked = [lightgray]Unlock configuring loadout: Wave {0}.
zone.unlocked = [lightgray]{0} unlocked.
zone.requirement.complete = Wave {0} reached:\n{1} zone requirements met.
zone.config.complete = Wave {0} reached:\nLoadout config unlocked.
zone.resources = Resources Detected:
zone.resources = [lightgray]Resources Detected:
zone.objective = [lightgray]Objective: [accent]{0}
zone.objective.survival = Survive
zone.objective.attack = Destroy Enemy Core
add = Add...
boss.health = Boss Health
@ -370,7 +373,7 @@ attackpvponly = [scarlet]Only available in Attack/PvP modes
blocks.input = Input
blocks.output = Output
blocks.booster = Booster
block.unknown = [LIGHT_GRAY]???
block.unknown = [lightgray]???
blocks.powercapacity = Power Capacity
blocks.powershot = Power/Shot
blocks.damage = Damage
@ -449,7 +452,7 @@ setting.shadows.name = Shadows
setting.linear.name = Linear Filtering
setting.animatedwater.name = Animated Water
setting.animatedshields.name = Animated Shields
setting.antialias.name = Antialias[LIGHT_GRAY] (requires restart)[]
setting.antialias.name = Antialias[lightgray] (requires restart)[]
setting.indicators.name = Enemy/Ally Indicators
setting.autotarget.name = Auto-Target
setting.keyboard.name = Mouse+Keyboard Controls
@ -469,11 +472,11 @@ setting.sensitivity.name = Controller Sensitivity
setting.saveinterval.name = Save Interval
setting.seconds = {0} Seconds
setting.fullscreen.name = Fullscreen
setting.borderlesswindow.name = Borderless Window[LIGHT_GRAY] (may require restart)
setting.borderlesswindow.name = Borderless Window[lightgray] (may require restart)
setting.fps.name = Show FPS
setting.vsync.name = VSync
setting.lasers.name = Show Power Lasers
setting.pixelate.name = Pixelate[LIGHT_GRAY] (disables animations)
setting.pixelate.name = Pixelate[lightgray] (disables animations)
setting.minimap.name = Show Minimap
setting.musicvol.name = Music Volume
setting.mutemusic.name = Mute Music
@ -541,13 +544,13 @@ rules.unithealthmultiplier = Unit Health Multiplier
rules.playerhealthmultiplier = Player Health Multiplier
rules.playerdamagemultiplier = Player Damage Multiplier
rules.unitdamagemultiplier = Unit Damage Multiplier
rules.enemycorebuildradius = Enemy Core No-Build Radius:[LIGHT_GRAY] (tiles)
rules.respawntime = Respawn Time:[LIGHT_GRAY] (sec)
rules.wavespacing = Wave Spacing:[LIGHT_GRAY] (sec)
rules.enemycorebuildradius = Enemy Core No-Build Radius:[lightgray] (tiles)
rules.respawntime = Respawn Time:[lightgray] (sec)
rules.wavespacing = Wave Spacing:[lightgray] (sec)
rules.buildcostmultiplier = Build Cost Multiplier
rules.buildspeedmultiplier = Build Speed Multiplier
rules.waitForWaveToEnd = Waves wait for enemies
rules.dropzoneradius = Drop Zone Radius:[LIGHT_GRAY] (tiles)
rules.dropzoneradius = Drop Zone Radius:[lightgray] (tiles)
rules.respawns = Max respawns per wave
rules.limitedRespawns = Limit Respawns
rules.title.waves = Waves
@ -627,21 +630,21 @@ mech.trident-ship.weapon = Bomb Bay
mech.glaive-ship.name = Glaive
mech.glaive-ship.description = A large, well-armored gunship. Equipped with an incendiary repeater. Good acceleration and maximum speed.
mech.glaive-ship.weapon = Flame Repeater
item.explosiveness = [LIGHT_GRAY]Explosiveness: {0}%
item.flammability = [LIGHT_GRAY]Flammability: {0}%
item.radioactivity = [LIGHT_GRAY]Radioactivity: {0}%
unit.health = [LIGHT_GRAY]Health: {0}
unit.speed = [LIGHT_GRAY]Speed: {0}
mech.weapon = [LIGHT_GRAY]Weapon: {0}
mech.health = [LIGHT_GRAY]Health: {0}
mech.itemcapacity = [LIGHT_GRAY]Item Capacity: {0}
mech.minespeed = [LIGHT_GRAY]Mining Speed: {0}%
mech.minepower = [LIGHT_GRAY]Mining Power: {0}
mech.ability = [LIGHT_GRAY]Ability: {0}
mech.buildspeed = [LIGHT_GRAY]Building Speed: {0}%
liquid.heatcapacity = [LIGHT_GRAY]Heat Capacity: {0}
liquid.viscosity = [LIGHT_GRAY]Viscosity: {0}
liquid.temperature = [LIGHT_GRAY]Temperature: {0}
item.explosiveness = [lightgray]Explosiveness: {0}%
item.flammability = [lightgray]Flammability: {0}%
item.radioactivity = [lightgray]Radioactivity: {0}%
unit.health = [lightgray]Health: {0}
unit.speed = [lightgray]Speed: {0}
mech.weapon = [lightgray]Weapon: {0}
mech.health = [lightgray]Health: {0}
mech.itemcapacity = [lightgray]Item Capacity: {0}
mech.minespeed = [lightgray]Mining Speed: {0}%
mech.minepower = [lightgray]Mining Power: {0}
mech.ability = [lightgray]Ability: {0}
mech.buildspeed = [lightgray]Building Speed: {0}%
liquid.heatcapacity = [lightgray]Heat Capacity: {0}
liquid.viscosity = [lightgray]Viscosity: {0}
liquid.temperature = [lightgray]Temperature: {0}
block.grass.name = Grass
block.salt.name = Salt
@ -668,7 +671,7 @@ block.kiln.name = Kiln
block.kiln.description = Smelts sand and lead into metaglass. Requires small amounts of power.
block.graphite-press.name = Graphite Press
block.multi-press.name = Multi-Press
block.constructing = {0} [LIGHT_GRAY](Constructing)
block.constructing = {0} [lightgray](Constructing)
block.spawn.name = Enemy Spawn
block.core-shard.name = Core: Shard
block.core-foundation.name = Core: Foundation
@ -857,13 +860,13 @@ unit.chaos-array.name = Chaos Array
unit.eradicator.name = Eradicator
unit.lich.name = Lich
unit.reaper.name = Reaper
tutorial.begin = Your mission here is to eradicate the[LIGHT_GRAY] enemy[].\n\nBegin by[accent] mining copper[]. Tap a copper ore vein near your core to do this.
tutorial.begin = Your mission here is to eradicate the[lightgray] enemy[].\n\nBegin by[accent] mining copper[]. Tap a copper ore vein near your core to do this.
tutorial.drill = Mining manually is inefficient.\n[accent]Drills []can mine automatically.\nPlace one on a copper vein.
tutorial.conveyor = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.
tutorial.morecopper = More copper is required.\n\nEither mine it manually, or place more drills.
tutorial.turret = Defensive structures must be built to repel the[LIGHT_GRAY] enemy[].\nBuild a duo turret near your base.
tutorial.turret = Defensive structures must be built to repel the[lightgray] enemy[].\nBuild a duo turret near your base.
tutorial.drillturret = Duo turrets require[accent] copper ammo []to shoot.\nPlace a drill next to the turret to supply it with mined copper.
tutorial.waves = The[LIGHT_GRAY] enemy[] approaches.\n\nDefend your core for 2 waves. Build more turrets.
tutorial.waves = The[lightgray] enemy[] approaches.\n\nDefend your core for 2 waves. Build more turrets.
tutorial.lead = More ores are available. Explore and mine[accent] lead[].\n\nDrag from your unit to the core to transfer resources.
tutorial.smelter = Copper and lead are weak metals.\nSuperior[accent] Dense Alloy[] can be created in a smelter.\n\nBuild one.
tutorial.densealloy = The smelter will now produce alloy.\nGet some.\nImprove the production if necessary.
@ -877,7 +880,7 @@ tutorial.silicon = Silicon is being produced. Get some.\n\nImproving the product
tutorial.daggerfactory = Construct a[accent] dagger mech factory.[]\n\nThis will be used to create attack mechs.
tutorial.router = Factories need resources to function.\nCreate a router to split conveyor resources.
tutorial.dagger = Link power nodes to the factory.\nOnce requirements are met, a mech will be created.\n\nCreate more drills, generators and conveyors as necessary.
tutorial.battle = The[LIGHT_GRAY] enemy[] has revealed their core.\nDestroy it with your unit and dagger mechs.
tutorial.battle = The[lightgray] enemy[] has revealed their core.\nDestroy it with your unit and dagger mechs.
block.copper-wall.description = A cheap defensive block.\nUseful for protecting the core and turrets in the first few waves.
block.copper-wall-large.description = A cheap defensive block.\nUseful for protecting the core and turrets in the first few waves.\nSpans multiple tiles.
block.thorium-wall.description = A strong defensive block.\nGood protection from enemies.
@ -934,8 +937,8 @@ block.solar-panel-large.description = Provides much better power supply than a s
block.thorium-reactor.description = Generates huge amounts of power from highly radioactive thorium. Requires constant cooling. Will explode violently if insufficient amounts of coolant are supplied. Power output depends on fullness, with base power generated at full capacity.
block.rtg-generator.description = A radioisotope thermoelectric generator which does not require cooling but provides less power than a thorium reactor.
block.unloader.description = Unloads items from a container, vault or core onto a conveyor or directly into an adjacent block. The type of item to be unloaded can be changed by tapping on the unloader.
block.container.description = Stores a small amount of items of each type. An[LIGHT_GRAY] unloader[] can be used to retrieve items from the container.
block.vault.description = Stores a large amount of items of each type. An[LIGHT_GRAY] unloader[] can be used to retrieve items from the vault.
block.container.description = Stores a small amount of items of each type. An[lightgray] unloader[] can be used to retrieve items from the container.
block.vault.description = Stores a large amount of items of each type. An[lightgray] unloader[] can be used to retrieve items from the vault.
block.mechanical-drill.description = A cheap drill. When placed on appropriate tiles, outputs items at a slow pace indefinitely.
block.pneumatic-drill.description = An improved drill which is faster and able to process harder materials by making use of air pressure.
block.laser-drill.description = Allows drilling even faster through laser technology, but requires power. Additionally, radioactive thorium can be retrieved with this drill.

View File

@ -13,7 +13,7 @@ public class Zones implements ContentList{
public static Zone
groundZero, desertWastes,
craters, frozenForest, ruinousShores, stainedMountains, tarFields,
saltFlats, overgrowth, infestedIslands,
saltFlats, overgrowth, impact0078,
desolateRift, nuclearComplex;
@Override
@ -162,6 +162,18 @@ public class Zones implements ContentList{
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium};
}};
/*
impact0078 = new Zone("impact0078", new MapGenerator("impact0078").dist(2f)){{
loadout = Loadouts.basicNucleus;
baseLaunchCost = ItemStack.with();
startingItems = ItemStack.list(Items.copper, 2000, Items.lead, 2000, Items.graphite, 500, Items.titanium, 500, Items.silicon, 500);
conditionWave = 3;
launchPeriod = 2;
zoneRequirements = ZoneRequirement.with(tarFields, 20);
blockRequirements = new Block[]{Blocks.thermalGenerator};
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium};
}};*/
nuclearComplex = new Zone("nuclearComplex", new MapGenerator("nuclearProductionComplex", 1)
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
loadout = Loadouts.basicNucleus;

View File

@ -12,7 +12,7 @@ import io.anuke.arc.scene.Element;
import io.anuke.arc.scene.event.*;
import io.anuke.arc.scene.ui.TextField;
import io.anuke.arc.scene.ui.layout.Unit;
import io.anuke.arc.util.Tmp;
import io.anuke.arc.util.*;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.input.Binding;
import io.anuke.mindustry.ui.GridImage;

View File

@ -20,6 +20,7 @@ import io.anuke.mindustry.content.Fx;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.entities.Effects;
import io.anuke.mindustry.entities.Units;
import io.anuke.mindustry.entities.traits.BuilderTrait.*;
import io.anuke.mindustry.entities.traits.TargetTrait;
import io.anuke.mindustry.entities.type.TileEntity;
import io.anuke.mindustry.entities.type.Unit;
@ -120,6 +121,19 @@ public class MobileInput extends InputHandler implements GestureListener{
return true;
}
}
for(BuildRequest req : player.buildQueue()){
Tile other = world.tile(req.x, req.y);
if(other == null || req.breaking) continue;
r1.setSize(req.block.size * tilesize);
r1.setCenter(other.worldx() + req.block.offset(), other.worldy() + req.block.offset());
if(r2.overlaps(r1)){
return true;
}
}
return false;
}

View File

@ -62,6 +62,10 @@ public class MapGenerator extends Generator{
decor(new Decoration(Blocks.snow, Blocks.snowrock, 0.01), new Decoration(Blocks.ignarock, Blocks.pebbles, 0.03f));
}
public Map getMap(){
return map;
}
@Override
public void init(Loadout loadout){
this.loadout = loadout;

View File

@ -1,21 +1,18 @@
package io.anuke.mindustry.type;
import io.anuke.arc.Core;
import io.anuke.arc.Events;
import io.anuke.arc.collection.Array;
import io.anuke.arc.function.Consumer;
import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.arc.util.Structs;
import io.anuke.mindustry.content.Loadouts;
import io.anuke.mindustry.game.EventType.ZoneConfigureCompleteEvent;
import io.anuke.mindustry.game.EventType.ZoneRequireCompleteEvent;
import io.anuke.mindustry.game.Rules;
import io.anuke.mindustry.game.UnlockableContent;
import io.anuke.mindustry.maps.generators.Generator;
import io.anuke.mindustry.world.Block;
import io.anuke.arc.*;
import io.anuke.arc.collection.*;
import io.anuke.arc.function.*;
import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.scene.ui.layout.*;
import io.anuke.arc.util.*;
import io.anuke.mindustry.content.*;
import io.anuke.mindustry.game.EventType.*;
import io.anuke.mindustry.game.*;
import io.anuke.mindustry.maps.generators.*;
import io.anuke.mindustry.world.*;
import java.util.Arrays;
import java.util.*;
import static io.anuke.mindustry.Vars.*;
@ -42,6 +39,16 @@ public class Zone extends UnlockableContent{
this.generator = generator;
}
public Rules getRules(){
if(generator instanceof MapGenerator){
return ((MapGenerator)generator).getMap().rules();
}else{
Rules rules = new Rules();
this.rules.accept(rules);
return rules;
}
}
public boolean isBossWave(int wave){
return wave % configureWave == 0 && wave > 0;
}

View File

@ -62,10 +62,7 @@ public class DeployDialog extends FloatingDialog{
stack.add(new Image(new Texture("sprites/backgrounds/stars.png"){{
setFilter(TextureFilter.Linear);
}}){{
//setColor(Color.fromGray(0.3f));
//setScale(3f);
}}.setScaling(Scaling.fill));
}}).setScaling(Scaling.fill));
stack.add(new Image(new Texture("sprites/backgrounds/planet-zero.png"){{
setFilter(TextureFilter.Linear);
@ -76,7 +73,7 @@ public class DeployDialog extends FloatingDialog{
update(() -> {
setOrigin(Align.center);
time[0] += Core.graphics.getDeltaTime() * 10f;
setTranslation(Mathf.sin(time[0], 60f, 70f), Mathf.cos(time[0], 140f, 80f));
setTranslation(Mathf.sin(time[0], 60f, 70f) + panX / 30f, Mathf.cos(time[0], 140f, 80f) + (panY + 200) / 30f);
});
}}.setScaling(Scaling.fit));

View File

@ -51,6 +51,7 @@ public class MapsDialog extends FloatingDialog{
buttons.addImageTextButton("$editor.newmap", "icon-add", iconsize, () -> {
ui.showTextInput("$editor.newmap", "$name", "", text -> {
ui.loadAnd(() -> {
hide();
ui.editor.show();
ui.editor.editor.getTags().put("name", text);
});

View File

@ -4,6 +4,7 @@ import io.anuke.arc.Core;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.scene.ui.Button;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.mindustry.game.*;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.type.*;
import io.anuke.mindustry.type.Zone.ZoneRequirement;
@ -101,32 +102,40 @@ public class ZoneInfoDialog extends FloatingDialog{
cont.row();
cont.addImage("whiteui").color(Pal.accent).height(3).pad(6).growX();
cont.row();
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave),
() -> loadout.show(
zone.loadout.core().itemCapacity,
() -> zone.getStartingItems(),
() -> zone.resetStartingItems(),
() -> zone.updateLaunchCost(),
rebuildItems,
item -> data.getItem(item) > 0 && item.type == ItemType.material
)
).fillX().pad(3).disabled(b -> !zone.canConfigure());
cont.row();
cont.table(res -> {
res.add("$zone.resources").padRight(6);
if(zone.resources.length > 0){
for(Item item : zone.resources){
res.addImage(item.icon(Item.Icon.medium)).size(8 * 3);
cont.table(desc -> {
desc.left().defaults().left().width(400f);
desc.add(zone.description).wrap().padBottom(8f);
desc.row();
desc.table(t -> {
t.left();
t.add("$zone.resources").padRight(6);
if(zone.resources.length > 0){
for(Item item : zone.resources){
t.addImage(item.icon(Item.Icon.medium)).size(8 * 3);
}
}else{
t.add("$none");
}
}else{
res.add("$none");
});
Rules rules = zone.getRules();
desc.row();
desc.add(Core.bundle.format("zone.objective", Core.bundle.get(!rules.attackMode ? "zone.objective.survival" : "zone.objective.attack")));
if(zone.bestWave() > 0){
desc.row();
desc.add(Core.bundle.format("bestwave", zone.bestWave()));
}
});
if(zone.bestWave() > 0){
cont.row();
cont.add(Core.bundle.format("bestwave", zone.bestWave()));
}
cont.row();
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave),
() -> loadout.show(zone.loadout.core().itemCapacity, zone::getStartingItems, zone::resetStartingItems, zone::updateLaunchCost, rebuildItems, item -> data.getItem(item) > 0 && item.type == ItemType.material)
).fillX().pad(3).disabled(b -> !zone.canConfigure());
}
});
cont.row();

View File

@ -10,8 +10,7 @@ import io.anuke.arc.scene.Group;
import io.anuke.arc.scene.actions.Actions;
import io.anuke.arc.scene.event.Touchable;
import io.anuke.arc.scene.ui.Button;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.arc.scene.ui.layout.Unit;
import io.anuke.arc.scene.ui.layout.*;
import io.anuke.arc.util.Align;
import io.anuke.mindustry.core.Platform;
import io.anuke.mindustry.game.EventType.DisposeEvent;
@ -39,6 +38,13 @@ public class MenuFragment extends Fragment{
public void build(Group parent){
renderer = new MenuRenderer();
Group group = new WidgetGroup();
group.setFillParent(true);
group.visible(() -> !ui.editor.isShown());
parent.addChild(group);
parent = group;
parent.fill((x, y, w, h) -> {
renderer.render();
});