Zone changes
This commit is contained in:
@@ -734,29 +734,35 @@ public class Blocks implements ContentList{
|
||||
int wallHealthMultiplier = 4;
|
||||
|
||||
scrapWall = new Wall("scrap-wall"){{
|
||||
requirements(Category.defense, () -> state.rules.infiniteResources, ItemStack.with());
|
||||
health = 60 * wallHealthMultiplier;
|
||||
variants = 5;
|
||||
}};
|
||||
|
||||
scrapWallLarge = new Wall("scrap-wall-large"){{
|
||||
requirements(Category.defense, () -> state.rules.infiniteResources, ItemStack.with());
|
||||
health = 60 * 4 * wallHealthMultiplier;
|
||||
size = 2;
|
||||
variants = 4;
|
||||
}};
|
||||
|
||||
scrapWallHuge = new Wall("scrap-wall-huge"){{
|
||||
requirements(Category.defense, () -> state.rules.infiniteResources, ItemStack.with());
|
||||
health = 60 * 9 * wallHealthMultiplier;
|
||||
size = 3;
|
||||
variants = 3;
|
||||
}};
|
||||
|
||||
scrapWallGigantic = new Wall("scrap-wall-gigantic"){{
|
||||
requirements(Category.defense, () -> state.rules.infiniteResources, ItemStack.with());
|
||||
health = 60 * 16 * wallHealthMultiplier;
|
||||
size = 4;
|
||||
}};
|
||||
|
||||
thruster = new Wall("thruster"){{
|
||||
requirements(Category.defense, () -> state.rules.infiniteResources, ItemStack.with());
|
||||
health = 55 * 16 * wallHealthMultiplier;
|
||||
rotate = true;
|
||||
size = 4;
|
||||
}};
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ public class Fx implements ContentList{
|
||||
@Override
|
||||
public void load(){
|
||||
|
||||
none = new Effect(0, 0f, e -> {
|
||||
});
|
||||
none = new Effect(0, 0f, e -> {});
|
||||
|
||||
unitSpawn = new Effect(30f, e -> {
|
||||
if(!(e.data instanceof BaseUnit)) return;
|
||||
|
||||
@@ -88,30 +88,30 @@ public class Zones implements ContentList{
|
||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||
}};
|
||||
|
||||
craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.004))){{
|
||||
startingItems = ItemStack.list(Items.copper, 200);
|
||||
conditionWave = 10;
|
||||
zoneRequirements = ZoneRequirement.with(groundZero, 10);
|
||||
blockRequirements = new Block[]{Blocks.router};
|
||||
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand, Items.scrap};
|
||||
}};
|
||||
|
||||
frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest", 1)
|
||||
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.02))){{
|
||||
loadout = Loadouts.basicFoundation;
|
||||
baseLaunchCost = ItemStack.with();
|
||||
startingItems = ItemStack.list(Items.copper, 400);
|
||||
conditionWave = 10;
|
||||
zoneRequirements = ZoneRequirement.with(craters, 10);
|
||||
zoneRequirements = ZoneRequirement.with(groundZero, 10);
|
||||
resources = new Item[]{Items.copper, Items.lead, Items.coal};
|
||||
}};
|
||||
|
||||
craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.004))){{
|
||||
startingItems = ItemStack.list(Items.copper, 200);
|
||||
conditionWave = 10;
|
||||
zoneRequirements = ZoneRequirement.with(frozenForest, 10);
|
||||
blockRequirements = new Block[]{Blocks.router};
|
||||
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand, Items.scrap};
|
||||
}};
|
||||
|
||||
overgrowth = new Zone("overgrowth", new MapGenerator("overgrowth")){{
|
||||
startingItems = ItemStack.list(Items.copper, 3000, Items.lead, 2000, Items.silicon, 1000, Items.metaglass, 500);
|
||||
conditionWave = 12;
|
||||
launchPeriod = 4;
|
||||
loadout = Loadouts.basicNucleus;
|
||||
zoneRequirements = ZoneRequirement.with(frozenForest, 40);
|
||||
zoneRequirements = ZoneRequirement.with(craters, 40);
|
||||
blockRequirements = new Block[]{Blocks.router};
|
||||
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium, Items.scrap};
|
||||
}};
|
||||
@@ -162,17 +162,6 @@ 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(nuclearComplex, 40);
|
||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium};
|
||||
}};
|
||||
|
||||
crags = new Zone("crags", new MapGenerator("crags").dist(2f)){{
|
||||
loadout = Loadouts.basicFoundation;
|
||||
baseLaunchCost = ItemStack.with();
|
||||
@@ -195,5 +184,16 @@ public class Zones implements ContentList{
|
||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium, Items.sand};
|
||||
}};
|
||||
|
||||
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(nuclearComplex, 40);
|
||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium};
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
texture = new Texture(pixmap);
|
||||
|
||||
cont.clear();
|
||||
cont.table("flat", t -> {
|
||||
cont.table(t -> {
|
||||
t.margin(8f);
|
||||
t.stack(new BorderImage(texture){{
|
||||
setScaling(Scaling.fit);
|
||||
|
||||
@@ -118,10 +118,12 @@ public class MapRenderer implements Disposable{
|
||||
wx * tilesize + wall.offset(), wy * tilesize + wall.offset(),
|
||||
region.getWidth() * Draw.scl, region.getHeight() * Draw.scl, tile.rotation() * 90 - 90);
|
||||
}else{
|
||||
float width = region.getWidth() * Draw.scl, height = region.getHeight() * Draw.scl;
|
||||
|
||||
mesh.draw(idxWall, region,
|
||||
wx * tilesize + wall.offset() + (tilesize - region.getWidth() * Draw.scl) / 2f,
|
||||
wy * tilesize + wall.offset() + (tilesize - region.getHeight() * Draw.scl) / 2f,
|
||||
region.getWidth() * Draw.scl, region.getHeight() * Draw.scl);
|
||||
wx * tilesize + wall.offset() + (tilesize - width) / 2f,
|
||||
wy * tilesize + wall.offset() + (tilesize - height) / 2f,
|
||||
width, height);
|
||||
}
|
||||
}else{
|
||||
region = floor.editorVariantRegions()[Mathf.randomSeed(idxWall, 0, floor.editorVariantRegions().length - 1)];
|
||||
@@ -144,9 +146,15 @@ public class MapRenderer implements Disposable{
|
||||
region = Core.atlas.find("clear-editor");
|
||||
}
|
||||
|
||||
mesh.draw(idxDecal, region,
|
||||
wx * tilesize + offsetX, wy * tilesize + offsetY,
|
||||
region.getWidth() * Draw.scl, region.getHeight() * Draw.scl);
|
||||
float width = region.getWidth() * Draw.scl, height = region.getHeight() * Draw.scl;
|
||||
if(!wall.synthetic() && wall != Blocks.air && !wall.isMultiblock()){
|
||||
offsetX = 0;
|
||||
offsetY = 0;
|
||||
width = tilesize;
|
||||
height = tilesize;
|
||||
}
|
||||
|
||||
mesh.draw(idxDecal, region, wx * tilesize + offsetX, wy * tilesize + offsetY, width, height);
|
||||
mesh.setColor(Color.WHITE);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
|
||||
cont.clear();
|
||||
cont.stack(new Table("clear", main -> {
|
||||
main.pane(t -> table = t).growX().growY().get().setScrollingDisabled(true, false);
|
||||
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
||||
main.row();
|
||||
main.addButton("$add", () -> {
|
||||
if(groups == null) groups = new Array<>();
|
||||
@@ -109,7 +109,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
}
|
||||
}).growX().height(70f);
|
||||
m.row();
|
||||
m.pane(t -> preview = t).grow().get().setScrollingDisabled(true, false);
|
||||
m.pane(t -> preview = t).grow().get().setScrollingDisabled(true, true);
|
||||
m.row();
|
||||
m.addButton("+", () -> {
|
||||
}).update(t -> {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Rules{
|
||||
/** Whether the game objective is PvP. Note that this enables automatic hosting. */
|
||||
public boolean pvp;
|
||||
/** Whether enemy units drop random items on death. */
|
||||
public boolean unitDrops;
|
||||
public boolean unitDrops = true;
|
||||
/** How fast unit pads build units. */
|
||||
public float unitBuildSpeedMultiplier = 1f;
|
||||
/** How much health units start with. */
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
package io.anuke.mindustry.graphics;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.Events;
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.graphics.*;
|
||||
import io.anuke.arc.graphics.Pixmap.Format;
|
||||
import io.anuke.arc.graphics.Pixmap.*;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.math.geom.Rectangle;
|
||||
import io.anuke.arc.util.Disposable;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.type.Unit;
|
||||
import io.anuke.mindustry.game.EventType.TileChangeEvent;
|
||||
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
||||
import io.anuke.mindustry.io.MapIO;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.arc.math.*;
|
||||
import io.anuke.arc.math.geom.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.entities.*;
|
||||
import io.anuke.mindustry.entities.type.*;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.io.*;
|
||||
import io.anuke.mindustry.world.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.tilesize;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class MinimapRenderer implements Disposable{
|
||||
private static final float baseSize = 16f;
|
||||
@@ -131,7 +128,7 @@ public class MinimapRenderer implements Disposable{
|
||||
private int colorFor(Tile tile){
|
||||
if(tile == null) return 0;
|
||||
tile = tile.link();
|
||||
return MapIO.colorFor(tile.floor(), tile.block(), tile.overlay(), tile.getTeam());
|
||||
return Tmp.c1.set(MapIO.colorFor(tile.floor(), tile.block(), tile.overlay(), tile.getTeam())).mul(tile.block().cacheLayer == CacheLayer.walls ? 1f - tile.rotation() / 4f : 1f).rgba();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.util.Scaling;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.io.MapIO;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
import io.anuke.mindustry.ui.BorderImage;
|
||||
@@ -122,7 +123,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
button.margin(9);
|
||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
button.row();
|
||||
button.addImage("whiteui").growX().pad(4).color(Color.GRAY);
|
||||
button.addImage("whiteui").growX().pad(4).color(Pal.gray);
|
||||
button.row();
|
||||
button.stack(new Image(map.texture).setScaling(Scaling.fit), new BorderImage(map.texture).setScaling(Scaling.fit)).size(mapsize - 20f);
|
||||
button.row();
|
||||
|
||||
Reference in New Issue
Block a user