New requirements for zone unlock, currently broken
This commit is contained in:
@@ -287,7 +287,8 @@ donate = Donate
|
|||||||
abandon = Abandon
|
abandon = Abandon
|
||||||
abandon.text = This zone and all its resources will be lost to the enemy.
|
abandon.text = This zone and all its resources will be lost to the enemy.
|
||||||
locked = Locked
|
locked = Locked
|
||||||
complete = [LIGHT_GRAY]Complete:
|
complete = [LIGHT_GRAY]Reach:
|
||||||
|
zone.requirement = Wave {0} in zone {1}
|
||||||
resume = Resume Zone:\n[LIGHT_GRAY]{0}
|
resume = Resume Zone:\n[LIGHT_GRAY]{0}
|
||||||
bestwave = [LIGHT_GRAY]Best Wave: {0}
|
bestwave = [LIGHT_GRAY]Best Wave: {0}
|
||||||
launch = < LAUNCH >
|
launch = < LAUNCH >
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ void main() {
|
|||||||
float n2 = snoise((coords + vec2(632.0)) / 25.0 + vec2(0.0, -time) / 190.0);
|
float n2 = snoise((coords + vec2(632.0)) / 25.0 + vec2(0.0, -time) / 190.0);
|
||||||
|
|
||||||
float r = (n1 + n2) * 3.0;
|
float r = (n1 + n2) * 3.0;
|
||||||
|
float tester = mod(float(int(coords.x + coords.y*1.1 + sin(stime / 8.0 + coords.x/5.0 - coords.y/100.0)*2.0)) +
|
||||||
|
sin(stime / 20.0 + coords.y/3.0) * 1.0 +
|
||||||
|
sin(stime / 10.0 + coords.y/2.0) * 2.0 +
|
||||||
|
sin(stime / 7.0 + coords.y/1.0) * 0.5 +
|
||||||
|
sin(coords.x + coords.y) +
|
||||||
|
sin(stime / 20.0 + coords.x/4.0) * 1.0, mscl) + r;
|
||||||
|
|
||||||
if(mod(float(int(coords.x + coords.y*1.1 + sin(stime / 8.0 + coords.x/5.0 - coords.y/100.0)*2.0)) +
|
if(tester < mth){
|
||||||
sin(stime / 20.0 + coords.y/3.0) * 1.0 +
|
|
||||||
sin(stime / 10.0 + coords.y/2.0) * 2.0 +
|
|
||||||
sin(stime / 7.0 + coords.y/1.0) * 0.5 +
|
|
||||||
sin(coords.x + coords.y) +
|
|
||||||
sin(stime / 20.0 + coords.x/4.0) * 1.0, mscl) + r < mth){
|
|
||||||
|
|
||||||
color *= 1.2;
|
color *= 1.2;
|
||||||
color.a = 1.0;
|
color.a = 1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,6 +199,21 @@ public class Blocks implements ContentList{
|
|||||||
blendGroup = stone;
|
blendGroup = stone;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
ignarock = new Floor("ignarock"){{
|
||||||
|
|
||||||
|
}};
|
||||||
|
|
||||||
|
hotrock = new Floor("hotrock"){{
|
||||||
|
attributes.set(Attribute.heat, 0.5f);
|
||||||
|
blendGroup = ignarock;
|
||||||
|
}};
|
||||||
|
|
||||||
|
magmarock = new Floor("magmarock"){{
|
||||||
|
attributes.set(Attribute.heat, 0.75f);
|
||||||
|
updateEffect = Fx.magmasmoke;
|
||||||
|
blendGroup = ignarock;
|
||||||
|
}};
|
||||||
|
|
||||||
sand = new Floor("sand"){{
|
sand = new Floor("sand"){{
|
||||||
itemDrop = Items.sand;
|
itemDrop = Items.sand;
|
||||||
playerUnmineable = true;
|
playerUnmineable = true;
|
||||||
@@ -338,21 +353,6 @@ public class Blocks implements ContentList{
|
|||||||
variants = 0;
|
variants = 0;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ignarock = new Floor("ignarock"){{
|
|
||||||
blendGroup = darksand;
|
|
||||||
}};
|
|
||||||
|
|
||||||
hotrock = new Floor("hotrock"){{
|
|
||||||
attributes.set(Attribute.heat, 0.5f);
|
|
||||||
blendGroup = ignarock;
|
|
||||||
}};
|
|
||||||
|
|
||||||
magmarock = new Floor("magmarock"){{
|
|
||||||
attributes.set(Attribute.heat, 0.75f);
|
|
||||||
updateEffect = Fx.magmasmoke;
|
|
||||||
blendGroup = ignarock;
|
|
||||||
}};
|
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region ore
|
//region ore
|
||||||
|
|
||||||
@@ -1234,13 +1234,13 @@ public class Blocks implements ContentList{
|
|||||||
arc = new PowerTurret("arc"){{
|
arc = new PowerTurret("arc"){{
|
||||||
requirements(Category.turret, ItemStack.with(Items.copper, 70, Items.lead, 70));
|
requirements(Category.turret, ItemStack.with(Items.copper, 70, Items.lead, 70));
|
||||||
shootType = Bullets.arc;
|
shootType = Bullets.arc;
|
||||||
reload = 25f;
|
reload = 24f;
|
||||||
shootCone = 40f;
|
shootCone = 40f;
|
||||||
rotatespeed = 8f;
|
rotatespeed = 8f;
|
||||||
powerUsed = 1f / 2f;
|
powerUsed = 1f / 2f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
consumes.powerBuffered(80f);
|
consumes.powerBuffered(60f, 60f);
|
||||||
range = 80f;
|
range = 95f;
|
||||||
shootEffect = Fx.lightningShoot;
|
shootEffect = Fx.lightningShoot;
|
||||||
heatColor = Color.RED;
|
heatColor = Color.RED;
|
||||||
recoil = 1f;
|
recoil = 1f;
|
||||||
|
|||||||
@@ -664,7 +664,7 @@ public class Bullets implements ContentList{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
arc = new BulletType(0.001f, 21){{
|
arc = new BulletType(0.001f, 25){{
|
||||||
lifetime = 1;
|
lifetime = 1;
|
||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
hitEffect = Fx.hitLancer;
|
hitEffect = Fx.hitLancer;
|
||||||
@@ -675,7 +675,7 @@ public class Bullets implements ContentList{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Bullet b){
|
public void init(Bullet b){
|
||||||
Lightning.create(b.getTeam(), Pal.lancerLaser, damage, b.x, b.y, b.rot(), 15);
|
Lightning.create(b.getTeam(), Pal.lancerLaser, damage, b.x, b.y, b.rot(), 25);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ public class Zones implements ContentList{
|
|||||||
craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
||||||
startingItems = ItemStack.list(Items.copper, 200);
|
startingItems = ItemStack.list(Items.copper, 200);
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
itemRequirements = ItemStack.with(Items.copper, 2000);
|
zoneRequirements = ZoneRequirement.with(groundZero, 10);
|
||||||
zoneRequirements = new Zone[]{groundZero};
|
|
||||||
blockRequirements = new Block[]{Blocks.router};
|
blockRequirements = new Block[]{Blocks.router};
|
||||||
resources = new Item[]{Items.copper, Items.lead};
|
resources = new Item[]{Items.copper, Items.lead};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
@@ -50,8 +49,7 @@ public class Zones implements ContentList{
|
|||||||
baseLaunchCost = ItemStack.with();
|
baseLaunchCost = ItemStack.with();
|
||||||
startingItems = ItemStack.list(Items.copper, 400);
|
startingItems = ItemStack.list(Items.copper, 400);
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
zoneRequirements = new Zone[]{craters};
|
zoneRequirements = ZoneRequirement.with(craters, 10);
|
||||||
itemRequirements = ItemStack.with(Items.copper, 4000, Items.lead, 2000);
|
|
||||||
resources = new Item[]{Items.copper, Items.lead, Items.coal};
|
resources = new Item[]{Items.copper, Items.lead, Items.coal};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;
|
||||||
@@ -66,8 +64,7 @@ public class Zones implements ContentList{
|
|||||||
startingItems = ItemStack.list(Items.copper, 400);
|
startingItems = ItemStack.list(Items.copper, 400);
|
||||||
conditionWave = 20;
|
conditionWave = 20;
|
||||||
launchPeriod = 20;
|
launchPeriod = 20;
|
||||||
zoneRequirements = new Zone[]{frozenForest};
|
zoneRequirements = ZoneRequirement.with(frozenForest, 10, craters, 15);
|
||||||
itemRequirements = ItemStack.with(Items.lead, 6000, Items.graphite, 2000);
|
|
||||||
blockRequirements = new Block[]{Blocks.graphitePress, Blocks.combustionGenerator};
|
blockRequirements = new Block[]{Blocks.graphitePress, Blocks.combustionGenerator};
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
@@ -99,9 +96,8 @@ public class Zones implements ContentList{
|
|||||||
startingItems = ItemStack.list(Items.copper, 400, Items.lead, 100);
|
startingItems = ItemStack.list(Items.copper, 400, Items.lead, 100);
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
launchPeriod = 10;
|
launchPeriod = 10;
|
||||||
zoneRequirements = new Zone[]{frozenForest};
|
zoneRequirements = ZoneRequirement.with(frozenForest, 15);
|
||||||
blockRequirements = new Block[]{Blocks.pneumaticDrill};
|
blockRequirements = new Block[]{Blocks.pneumaticDrill};
|
||||||
itemRequirements = ItemStack.with(Items.copper, 8000, Items.silicon, 2000);
|
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;
|
||||||
@@ -114,10 +110,9 @@ public class Zones implements ContentList{
|
|||||||
loadout = Loadouts.basicNucleus;
|
loadout = Loadouts.basicNucleus;
|
||||||
baseLaunchCost = ItemStack.with();
|
baseLaunchCost = ItemStack.with();
|
||||||
startingItems = ItemStack.list(Items.copper, 1500);
|
startingItems = ItemStack.list(Items.copper, 1500);
|
||||||
itemRequirements = ItemStack.with(Items.copper, 8000, Items.metaglass, 2000, Items.graphite, 3000);
|
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
launchPeriod = 20;
|
launchPeriod = 20;
|
||||||
zoneRequirements = new Zone[]{ruinousShores};
|
zoneRequirements = ZoneRequirement.with(stainedMountains, 20);
|
||||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
@@ -133,10 +128,9 @@ public class Zones implements ContentList{
|
|||||||
loadout = Loadouts.basicNucleus;
|
loadout = Loadouts.basicNucleus;
|
||||||
baseLaunchCost = ItemStack.with();
|
baseLaunchCost = ItemStack.with();
|
||||||
startingItems = ItemStack.list(Items.copper, 2500, Items.lead, 3000, Items.silicon, 800, Items.metaglass, 400);
|
startingItems = ItemStack.list(Items.copper, 2500, Items.lead, 3000, Items.silicon, 800, Items.metaglass, 400);
|
||||||
itemRequirements = ItemStack.with(Items.copper, 10000, Items.titanium, 8000, Items.metaglass, 6000, Items.plastanium, 2000);
|
|
||||||
conditionWave = 30;
|
conditionWave = 30;
|
||||||
launchPeriod = 15;
|
launchPeriod = 15;
|
||||||
zoneRequirements = new Zone[]{desolateRift};
|
zoneRequirements = ZoneRequirement.with(desolateRift, 20);
|
||||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium, Items.sand};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium, Items.sand};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
blocks.processBlocks();
|
blocks.processBlocks();
|
||||||
|
|
||||||
blocks.drawShadows();
|
blocks.drawShadows();
|
||||||
|
Draw.color();
|
||||||
|
|
||||||
blocks.floor.beginDraw();
|
blocks.floor.beginDraw();
|
||||||
blocks.floor.drawLayer(CacheLayer.walls);
|
blocks.floor.drawLayer(CacheLayer.walls);
|
||||||
|
|||||||
@@ -491,6 +491,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
if(mode == placing && isPlacing()){
|
if(mode == placing && isPlacing()){
|
||||||
iterateLine(lineStartX, lineStartY, tileX, tileY, l -> {
|
iterateLine(lineStartX, lineStartY, tileX, tileY, l -> {
|
||||||
|
Tile tile = world.tile(l.x, l.y);
|
||||||
|
if(tile != null && hasRequest(tile)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PlaceRequest request = new PlaceRequest(l.x, l.y, block, l.rotation);
|
PlaceRequest request = new PlaceRequest(l.x, l.y, block, l.rotation);
|
||||||
request.scale = 1f;
|
request.scale = 1f;
|
||||||
selection.add(request);
|
selection.add(request);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import io.anuke.arc.graphics.g2d.TextureRegion;
|
|||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
import io.anuke.mindustry.content.Loadouts;
|
import io.anuke.mindustry.content.Loadouts;
|
||||||
import io.anuke.mindustry.game.EventType.ZoneCompleteEvent;
|
import io.anuke.mindustry.game.EventType.ZoneCompleteEvent;
|
||||||
import io.anuke.mindustry.game.EventType.ZoneConfigureCompleteEvent;
|
|
||||||
import io.anuke.mindustry.game.Rules;
|
import io.anuke.mindustry.game.Rules;
|
||||||
import io.anuke.mindustry.game.UnlockableContent;
|
import io.anuke.mindustry.game.UnlockableContent;
|
||||||
import io.anuke.mindustry.maps.generators.Generator;
|
import io.anuke.mindustry.maps.generators.Generator;
|
||||||
@@ -24,8 +23,8 @@ import static io.anuke.mindustry.Vars.state;
|
|||||||
public class Zone extends UnlockableContent{
|
public class Zone extends UnlockableContent{
|
||||||
public final Generator generator;
|
public final Generator generator;
|
||||||
public Block[] blockRequirements = {};
|
public Block[] blockRequirements = {};
|
||||||
public ItemStack[] itemRequirements = {};
|
public ZoneRequirement[] zoneRequirements = {};
|
||||||
public Zone[] zoneRequirements = {};
|
//TODO debug verify resources.
|
||||||
public Item[] resources = {};
|
public Item[] resources = {};
|
||||||
public Supplier<Rules> rules = Rules::new;
|
public Supplier<Rules> rules = Rules::new;
|
||||||
public boolean alwaysUnlocked;
|
public boolean alwaysUnlocked;
|
||||||
@@ -73,7 +72,7 @@ public class Zone extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(wave == configureWave + 1){
|
if(wave == configureWave + 1){
|
||||||
Events.fire(new ZoneConfigureCompleteEvent(this));
|
// Events.fire(new ZoneConfigureCompleteEvent(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,4 +158,22 @@ public class Zone extends UnlockableContent{
|
|||||||
return ContentType.zone;
|
return ContentType.zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class ZoneRequirement{
|
||||||
|
public final Zone zone;
|
||||||
|
public final int wave;
|
||||||
|
|
||||||
|
public ZoneRequirement(Zone zone, int wave){
|
||||||
|
this.zone = zone;
|
||||||
|
this.wave = wave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ZoneRequirement[] with(Object... objects){
|
||||||
|
ZoneRequirement[] out = new ZoneRequirement[objects.length/2];
|
||||||
|
for(int i = 0; i < objects.length; i+= 2){
|
||||||
|
out[i/2] = new ZoneRequirement((Zone)objects[i], (Integer)objects[i + 1]);
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import io.anuke.mindustry.game.Saves.SaveSlot;
|
|||||||
import io.anuke.mindustry.graphics.Pal;
|
import io.anuke.mindustry.graphics.Pal;
|
||||||
import io.anuke.mindustry.io.SaveIO.SaveException;
|
import io.anuke.mindustry.io.SaveIO.SaveException;
|
||||||
import io.anuke.mindustry.type.Zone;
|
import io.anuke.mindustry.type.Zone;
|
||||||
|
import io.anuke.mindustry.type.Zone.ZoneRequirement;
|
||||||
import io.anuke.mindustry.ui.ItemsDisplay;
|
import io.anuke.mindustry.ui.ItemsDisplay;
|
||||||
import io.anuke.mindustry.ui.TreeLayout;
|
import io.anuke.mindustry.ui.TreeLayout;
|
||||||
import io.anuke.mindustry.ui.TreeLayout.TreeNode;
|
import io.anuke.mindustry.ui.TreeLayout.TreeNode;
|
||||||
@@ -100,8 +101,8 @@ public class DeployDialog extends FloatingDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean hidden(Zone zone){
|
boolean hidden(Zone zone){
|
||||||
for(Zone other : zone.zoneRequirements){
|
for(ZoneRequirement other : zone.zoneRequirements){
|
||||||
if(!data.isUnlocked(other)){
|
if(!data.isUnlocked(other.zone)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,7 +178,7 @@ public class DeployDialog extends FloatingDialog{
|
|||||||
this.height /= 2f;
|
this.height /= 2f;
|
||||||
nodes.add(this);
|
nodes.add(this);
|
||||||
|
|
||||||
arr.selectFrom(content.zones(), other -> Structs.contains(other.zoneRequirements, zone));
|
arr.selectFrom(content.zones(), other -> Structs.find(other.zoneRequirements, f -> f.zone == zone) != null);
|
||||||
|
|
||||||
children = new ZoneNode[arr.size];
|
children = new ZoneNode[arr.size];
|
||||||
for(int i = 0; i < children.length; i++){
|
for(int i = 0; i < children.length; i++){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import io.anuke.mindustry.type.Item;
|
|||||||
import io.anuke.mindustry.type.ItemStack;
|
import io.anuke.mindustry.type.ItemStack;
|
||||||
import io.anuke.mindustry.type.ItemType;
|
import io.anuke.mindustry.type.ItemType;
|
||||||
import io.anuke.mindustry.type.Zone;
|
import io.anuke.mindustry.type.Zone;
|
||||||
|
import io.anuke.mindustry.type.Zone.ZoneRequirement;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.Block.Icon;
|
import io.anuke.mindustry.world.Block.Icon;
|
||||||
|
|
||||||
@@ -41,7 +42,10 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
Runnable rebuildItems = () -> {
|
Runnable rebuildItems = () -> {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
iteminfo.clear();
|
iteminfo.clear();
|
||||||
ItemStack[] stacks = zone.unlocked() ? zone.getLaunchCost() : zone.itemRequirements;
|
|
||||||
|
if(!zone.unlocked()) return;
|
||||||
|
|
||||||
|
ItemStack[] stacks = zone.getLaunchCost();
|
||||||
for(ItemStack stack : stacks){
|
for(ItemStack stack : stacks){
|
||||||
if(stack.amount == 0) continue;
|
if(stack.amount == 0) continue;
|
||||||
|
|
||||||
@@ -69,11 +73,11 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
req.table(r -> {
|
req.table(r -> {
|
||||||
r.add("$complete").colspan(2).left();
|
r.add("$complete").colspan(2).left();
|
||||||
r.row();
|
r.row();
|
||||||
for(Zone other : zone.zoneRequirements){
|
for(ZoneRequirement other : zone.zoneRequirements){
|
||||||
r.addImage("icon-zone").padRight(4);
|
r.addImage("icon-zone").padRight(4);
|
||||||
r.add(other.localizedName()).color(Color.LIGHT_GRAY);
|
r.add(Core.bundle.format("zone.requirement", other.wave, other.zone.localizedName())).color(Color.LIGHT_GRAY);
|
||||||
r.addImage(other.isCompleted() ? "icon-check-2" : "icon-cancel-2")
|
r.addImage(other.zone.bestWave() >= other.wave ? "icon-check-2" : "icon-cancel-2")
|
||||||
.color(other.isCompleted() ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3);
|
.color(other.zone.bestWave() >= other.wave ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3);
|
||||||
r.row();
|
r.row();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -190,7 +194,6 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
|
|
||||||
Button button = cont.addButton(zone.locked() ? "$uncover" : "$launch", () -> {
|
Button button = cont.addButton(zone.locked() ? "$uncover" : "$launch", () -> {
|
||||||
if(!data.isUnlocked(zone)){
|
if(!data.isUnlocked(zone)){
|
||||||
data.removeItems(zone.itemRequirements);
|
|
||||||
data.unlockContent(zone);
|
data.unlockContent(zone);
|
||||||
ui.deploy.setup();
|
ui.deploy.setup();
|
||||||
setup(zone);
|
setup(zone);
|
||||||
@@ -211,8 +214,8 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Zone other : zone.zoneRequirements){
|
for(ZoneRequirement other : zone.zoneRequirements){
|
||||||
if(!other.isCompleted()){
|
if(other.zone.bestWave() < other.wave){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,6 +226,6 @@ public class ZoneInfoDialog extends FloatingDialog{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return data.hasItems(zone.itemRequirements);
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user