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