Begin work on 6.0
BIN
core/assets-raw/sprites/blocks/environment/slag.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
86
core/assets/shaders/slag.fragment.glsl
Executable file
@@ -0,0 +1,86 @@
|
|||||||
|
#ifdef GL_ES
|
||||||
|
precision highp float;
|
||||||
|
precision mediump int;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//shade 1 + 2
|
||||||
|
#define s2 vec3(100.0, 93.0, 49.0) / 100.0
|
||||||
|
#define s1 vec3(100.0, 60.0, 25.0) / 100.0
|
||||||
|
|
||||||
|
uniform sampler2D u_texture;
|
||||||
|
|
||||||
|
uniform vec2 camerapos;
|
||||||
|
uniform vec2 screensize;
|
||||||
|
uniform float time;
|
||||||
|
|
||||||
|
varying vec4 v_color;
|
||||||
|
varying vec2 v_texCoord;
|
||||||
|
|
||||||
|
vec3 permute(vec3 x) { return mod(((x*34.0)+1.0)*x, 289.0); }
|
||||||
|
|
||||||
|
float snoise(vec2 v){
|
||||||
|
const vec4 C = vec4(0.211324865405187, 0.366025403784439,
|
||||||
|
-0.577350269189626, 0.024390243902439);
|
||||||
|
vec2 i = floor(v + dot(v, C.yy) );
|
||||||
|
vec2 x0 = v - i + dot(i, C.xx);
|
||||||
|
vec2 i1;
|
||||||
|
i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
|
||||||
|
vec4 x12 = x0.xyxy + C.xxzz;
|
||||||
|
x12.xy -= i1;
|
||||||
|
i = mod(i, 289.0);
|
||||||
|
vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
|
||||||
|
+ i.x + vec3(0.0, i1.x, 1.0 ));
|
||||||
|
vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy),
|
||||||
|
dot(x12.zw,x12.zw)), 0.0);
|
||||||
|
m = m*m ;
|
||||||
|
m = m*m ;
|
||||||
|
vec3 x = 2.0 * fract(p * C.www) - 1.0;
|
||||||
|
vec3 h = abs(x) - 0.5;
|
||||||
|
vec3 ox = floor(x + 0.5);
|
||||||
|
vec3 a0 = x - ox;
|
||||||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
|
||||||
|
vec3 g;
|
||||||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||||||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||||||
|
return 130.0 * dot(m, g);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main(){
|
||||||
|
|
||||||
|
vec2 c = v_texCoord.xy;
|
||||||
|
vec4 color = texture2D(u_texture, c);
|
||||||
|
|
||||||
|
vec2 v = vec2(1.0/screensize.x, 1.0/screensize.y);
|
||||||
|
vec2 coords = c / v + camerapos;
|
||||||
|
|
||||||
|
float stime = time / 5.0;
|
||||||
|
|
||||||
|
float mscl = 30.0;
|
||||||
|
float mth = 5.0;
|
||||||
|
|
||||||
|
//if there's something actually there
|
||||||
|
if(color.r > 0.01){
|
||||||
|
vec4 old = color;
|
||||||
|
color = texture2D(u_texture, c + vec2(sin(stime/3.0 + coords.y/0.75) * v.x, 0.0)) * vec4(0.9, 0.9, 1, 1.0);
|
||||||
|
|
||||||
|
if(color.r < 0.01){
|
||||||
|
color = old;
|
||||||
|
}
|
||||||
|
|
||||||
|
const float bs = 1.1;
|
||||||
|
|
||||||
|
float n1 = snoise(coords / (30.0 * bs) + vec2(time) / 280.0);
|
||||||
|
float n2 = snoise((coords + vec2(632.0)) / (14.0 * bs) + vec2(0.0, -time) / 290.0);
|
||||||
|
float n3 = snoise((coords + vec2(2233.0)) / (25.0 * bs) + vec2(time, 0.0) / 380.0);
|
||||||
|
|
||||||
|
float r = (n1 + n2 + n3) / 3.0;
|
||||||
|
|
||||||
|
if(r < -0.5){
|
||||||
|
color = vec4(s2, color.a);
|
||||||
|
}else if(r < -0.2){
|
||||||
|
color = vec4(s1, color.a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gl_FragColor = color;
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 740 B |
|
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 259 KiB |
|
Before Width: | Height: | Size: 891 KiB After Width: | Height: | Size: 884 KiB |
@@ -20,12 +20,13 @@ import io.anuke.mindustry.input.*;
|
|||||||
import io.anuke.mindustry.maps.*;
|
import io.anuke.mindustry.maps.*;
|
||||||
import io.anuke.mindustry.mod.*;
|
import io.anuke.mindustry.mod.*;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
|
import io.anuke.mindustry.type.Weather.*;
|
||||||
import io.anuke.mindustry.world.blocks.defense.ForceProjector.*;
|
import io.anuke.mindustry.world.blocks.defense.ForceProjector.*;
|
||||||
|
|
||||||
import java.nio.charset.*;
|
import java.nio.charset.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static io.anuke.arc.Core.*;
|
import static io.anuke.arc.Core.settings;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class Vars implements Loadable{
|
public class Vars implements Loadable{
|
||||||
@@ -178,6 +179,7 @@ public class Vars implements Loadable{
|
|||||||
public static EntityGroup<ShieldEntity> shieldGroup;
|
public static EntityGroup<ShieldEntity> shieldGroup;
|
||||||
public static EntityGroup<Puddle> puddleGroup;
|
public static EntityGroup<Puddle> puddleGroup;
|
||||||
public static EntityGroup<Fire> fireGroup;
|
public static EntityGroup<Fire> fireGroup;
|
||||||
|
public static EntityGroup<WeatherEntity> weatherGroup;
|
||||||
public static EntityGroup<BaseUnit>[] unitGroups;
|
public static EntityGroup<BaseUnit>[] unitGroups;
|
||||||
|
|
||||||
public static Player player;
|
public static Player player;
|
||||||
@@ -232,6 +234,7 @@ public class Vars implements Loadable{
|
|||||||
puddleGroup = entities.add(Puddle.class).enableMapping();
|
puddleGroup = entities.add(Puddle.class).enableMapping();
|
||||||
shieldGroup = entities.add(ShieldEntity.class, false);
|
shieldGroup = entities.add(ShieldEntity.class, false);
|
||||||
fireGroup = entities.add(Fire.class).enableMapping();
|
fireGroup = entities.add(Fire.class).enableMapping();
|
||||||
|
weatherGroup = entities.add(WeatherEntity.class);
|
||||||
unitGroups = new EntityGroup[Team.all.length];
|
unitGroups = new EntityGroup[Team.all.length];
|
||||||
|
|
||||||
for(Team team : Team.all){
|
for(Team team : Team.all){
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class Blocks implements ContentList{
|
|||||||
public static Block
|
public static Block
|
||||||
|
|
||||||
//environment
|
//environment
|
||||||
air, spawn, deepwater, water, taintedWater, tar, stone, craters, charr, sand, darksand, ice, snow, darksandTaintedWater,
|
air, spawn, deepwater, water, taintedWater, tar, slag, stone, craters, charr, sand, darksand, ice, snow, darksandTaintedWater,
|
||||||
holostone, rocks, sporerocks, icerocks, cliffs, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
holostone, rocks, sporerocks, icerocks, cliffs, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||||
iceSnow, sandWater, darksandWater, duneRocks, sandRocks, moss, sporeMoss, shale, shaleRocks, shaleBoulder, sandBoulder, grass, salt,
|
iceSnow, sandWater, darksandWater, duneRocks, sandRocks, moss, sporeMoss, shale, shaleRocks, shaleBoulder, sandBoulder, grass, salt,
|
||||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks, rock, snowrock, saltRocks,
|
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks, rock, snowrock, saltRocks,
|
||||||
@@ -202,6 +202,17 @@ public class Blocks implements ContentList{
|
|||||||
cacheLayer = CacheLayer.tar;
|
cacheLayer = CacheLayer.tar;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
slag = new Floor("slag"){{
|
||||||
|
drownTime = 150f;
|
||||||
|
status = StatusEffects.melting;
|
||||||
|
statusDuration = 240f;
|
||||||
|
speedMultiplier = 0.19f;
|
||||||
|
variants = 0;
|
||||||
|
liquidDrop = Liquids.slag;
|
||||||
|
isLiquid = true;
|
||||||
|
cacheLayer = CacheLayer.slag;
|
||||||
|
}};
|
||||||
|
|
||||||
stone = new Floor("stone"){{
|
stone = new Floor("stone"){{
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|||||||
14
core/src/io/anuke/mindustry/content/Planets.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package io.anuke.mindustry.content;
|
||||||
|
|
||||||
|
import io.anuke.mindustry.ctype.*;
|
||||||
|
import io.anuke.mindustry.type.*;
|
||||||
|
|
||||||
|
public class Planets implements ContentList{
|
||||||
|
//TODO make all names
|
||||||
|
public static Planet starter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
draug = new UnitType("draug", Draug::new){{
|
draug = new UnitType("draug", MinerDrone::new){{
|
||||||
flying = true;
|
flying = true;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
speed = 0.3f;
|
speed = 0.3f;
|
||||||
@@ -32,7 +32,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
spirit = new UnitType("spirit", Spirit::new){{
|
spirit = new UnitType("spirit", RepairDrone::new){{
|
||||||
flying = true;
|
flying = true;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
speed = 0.42f;
|
speed = 0.42f;
|
||||||
@@ -53,7 +53,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
phantom = new UnitType("phantom", Phantom::new){{
|
phantom = new UnitType("phantom", BuilderDrone::new){{
|
||||||
flying = true;
|
flying = true;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
mass = 2f;
|
mass = 2f;
|
||||||
@@ -76,7 +76,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
dagger = new UnitType("dagger", Dagger::new){{
|
dagger = new UnitType("dagger", GroundUnit::new){{
|
||||||
maxVelocity = 1.1f;
|
maxVelocity = 1.1f;
|
||||||
speed = 0.2f;
|
speed = 0.2f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -92,7 +92,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
crawler = new UnitType("crawler", Crawler::new){{
|
crawler = new UnitType("crawler", GroundUnit::new){{
|
||||||
maxVelocity = 1.27f;
|
maxVelocity = 1.27f;
|
||||||
speed = 0.285f;
|
speed = 0.285f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -123,7 +123,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
titan = new UnitType("titan", Titan::new){{
|
titan = new UnitType("titan", GroundUnit::new){{
|
||||||
maxVelocity = 0.8f;
|
maxVelocity = 0.8f;
|
||||||
speed = 0.22f;
|
speed = 0.22f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -145,7 +145,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
fortress = new UnitType("fortress", Fortress::new){{
|
fortress = new UnitType("fortress", GroundUnit::new){{
|
||||||
maxVelocity = 0.78f;
|
maxVelocity = 0.78f;
|
||||||
speed = 0.15f;
|
speed = 0.15f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -167,7 +167,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
eruptor = new UnitType("eruptor", Eruptor::new){{
|
eruptor = new UnitType("eruptor", GroundUnit::new){{
|
||||||
maxVelocity = 0.81f;
|
maxVelocity = 0.81f;
|
||||||
speed = 0.16f;
|
speed = 0.16f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -189,7 +189,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
chaosArray = new UnitType("chaos-array", Dagger::new){{
|
chaosArray = new UnitType("chaos-array", GroundUnit::new){{
|
||||||
maxVelocity = 0.68f;
|
maxVelocity = 0.68f;
|
||||||
speed = 0.12f;
|
speed = 0.12f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -213,7 +213,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
eradicator = new UnitType("eradicator", Dagger::new){{
|
eradicator = new UnitType("eradicator", GroundUnit::new){{
|
||||||
maxVelocity = 0.68f;
|
maxVelocity = 0.68f;
|
||||||
speed = 0.12f;
|
speed = 0.12f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
@@ -238,7 +238,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
wraith = new UnitType("wraith", Wraith::new){{
|
wraith = new UnitType("wraith", FlyingUnit::new){{
|
||||||
speed = 0.3f;
|
speed = 0.3f;
|
||||||
maxVelocity = 1.9f;
|
maxVelocity = 1.9f;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
@@ -257,7 +257,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ghoul = new UnitType("ghoul", Ghoul::new){{
|
ghoul = new UnitType("ghoul", FlyingUnit::new){{
|
||||||
health = 220;
|
health = 220;
|
||||||
speed = 0.2f;
|
speed = 0.2f;
|
||||||
maxVelocity = 1.4f;
|
maxVelocity = 1.4f;
|
||||||
@@ -281,7 +281,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
revenant = new UnitType("revenant", Revenant::new){{
|
revenant = new UnitType("revenant", HoverUnit::new){{
|
||||||
health = 1000;
|
health = 1000;
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
hitsize = 20f;
|
hitsize = 20f;
|
||||||
@@ -312,7 +312,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
lich = new UnitType("lich", Revenant::new){{
|
lich = new UnitType("lich", HoverUnit::new){{
|
||||||
health = 6000;
|
health = 6000;
|
||||||
mass = 20f;
|
mass = 20f;
|
||||||
hitsize = 40f;
|
hitsize = 40f;
|
||||||
@@ -345,7 +345,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
reaper = new UnitType("reaper", Revenant::new){{
|
reaper = new UnitType("reaper", HoverUnit::new){{
|
||||||
health = 11000;
|
health = 11000;
|
||||||
mass = 30f;
|
mass = 30f;
|
||||||
hitsize = 56f;
|
hitsize = 56f;
|
||||||
|
|||||||
15
core/src/io/anuke/mindustry/content/Weathers.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package io.anuke.mindustry.content;
|
||||||
|
|
||||||
|
import io.anuke.mindustry.ctype.*;
|
||||||
|
import io.anuke.mindustry.type.*;
|
||||||
|
|
||||||
|
public class Weathers implements ContentList{
|
||||||
|
public static Weather
|
||||||
|
rain,
|
||||||
|
snow;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import io.anuke.mindustry.type.*;
|
|||||||
|
|
||||||
import static io.anuke.arc.collection.Array.with;
|
import static io.anuke.arc.collection.Array.with;
|
||||||
import static io.anuke.mindustry.content.Items.*;
|
import static io.anuke.mindustry.content.Items.*;
|
||||||
|
import static io.anuke.mindustry.content.Planets.starter;
|
||||||
import static io.anuke.mindustry.type.ItemStack.list;
|
import static io.anuke.mindustry.type.ItemStack.list;
|
||||||
|
|
||||||
public class Zones implements ContentList{
|
public class Zones implements ContentList{
|
||||||
@@ -22,7 +23,7 @@ public class Zones implements ContentList{
|
|||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
|
|
||||||
groundZero = new Zone("groundZero", new MapGenerator("groundZero", 1)){{
|
groundZero = new Zone("groundZero", starter, new MapGenerator("groundZero", 1)){{
|
||||||
baseLaunchCost = list(copper, -60);
|
baseLaunchCost = list(copper, -60);
|
||||||
startingItems = list(copper, 60);
|
startingItems = list(copper, 60);
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
@@ -31,7 +32,7 @@ public class Zones implements ContentList{
|
|||||||
resources = with(copper, scrap, lead);
|
resources = with(copper, scrap, lead);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
desertWastes = new Zone("desertWastes", new DesertWastesGenerator(260, 260)){{
|
desertWastes = new Zone("desertWastes", starter, new DesertWastesGenerator(260, 260)){{
|
||||||
startingItems = list(copper, 120);
|
startingItems = list(copper, 120);
|
||||||
conditionWave = 20;
|
conditionWave = 20;
|
||||||
launchPeriod = 10;
|
launchPeriod = 10;
|
||||||
@@ -82,7 +83,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
saltFlats = new Zone("saltFlats", new MapGenerator("saltFlats")){{
|
saltFlats = new Zone("saltFlats", starter, new MapGenerator("saltFlats")){{
|
||||||
startingItems = list(copper, 200, Items.silicon, 200, lead, 200);
|
startingItems = list(copper, 200, Items.silicon, 200, lead, 200);
|
||||||
loadout = Loadouts.basicFoundation;
|
loadout = Loadouts.basicFoundation;
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
@@ -98,7 +99,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest", 1)
|
frozenForest = new Zone("frozenForest", starter, 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;
|
||||||
startingItems = list(copper, 250);
|
startingItems = list(copper, 250);
|
||||||
@@ -111,7 +112,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
craters = new Zone("craters", new MapGenerator("craters", 1).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.004))){{
|
craters = new Zone("craters", starter, new MapGenerator("craters", 1).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.004))){{
|
||||||
startingItems = list(copper, 100);
|
startingItems = list(copper, 100);
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
resources = with(copper, lead, coal, sand, scrap);
|
resources = with(copper, lead, coal, sand, scrap);
|
||||||
@@ -122,7 +123,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1)){{
|
ruinousShores = new Zone("ruinousShores", starter, new MapGenerator("ruinousShores", 1)){{
|
||||||
loadout = Loadouts.basicFoundation;
|
loadout = Loadouts.basicFoundation;
|
||||||
startingItems = list(copper, 140, lead, 50);
|
startingItems = list(copper, 140, lead, 50);
|
||||||
conditionWave = 20;
|
conditionWave = 20;
|
||||||
@@ -138,7 +139,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
stainedMountains = new Zone("stainedMountains", new MapGenerator("stainedMountains", 2)
|
stainedMountains = new Zone("stainedMountains", starter, new MapGenerator("stainedMountains", 2)
|
||||||
.decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{
|
.decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{
|
||||||
loadout = Loadouts.basicFoundation;
|
loadout = Loadouts.basicFoundation;
|
||||||
startingItems = list(copper, 200, lead, 50);
|
startingItems = list(copper, 200, lead, 50);
|
||||||
@@ -153,7 +154,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
fungalPass = new Zone("fungalPass", new MapGenerator("fungalPass")){{
|
fungalPass = new Zone("fungalPass", starter, new MapGenerator("fungalPass")){{
|
||||||
startingItems = list(copper, 250, lead, 250, Items.metaglass, 100, Items.graphite, 100);
|
startingItems = list(copper, 250, lead, 250, Items.metaglass, 100, Items.graphite, 100);
|
||||||
resources = with(copper, lead, coal, titanium, sand);
|
resources = with(copper, lead, coal, titanium, sand);
|
||||||
configureObjective = new Launched(this);
|
configureObjective = new Launched(this);
|
||||||
@@ -166,7 +167,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
overgrowth = new Zone("overgrowth", new MapGenerator("overgrowth")){{
|
overgrowth = new Zone("overgrowth", starter, new MapGenerator("overgrowth")){{
|
||||||
startingItems = list(copper, 1500, lead, 1000, Items.silicon, 500, Items.metaglass, 250);
|
startingItems = list(copper, 1500, lead, 1000, Items.silicon, 500, Items.metaglass, 250);
|
||||||
conditionWave = 12;
|
conditionWave = 12;
|
||||||
launchPeriod = 4;
|
launchPeriod = 4;
|
||||||
@@ -183,7 +184,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
tarFields = new Zone("tarFields", new MapGenerator("tarFields")
|
tarFields = new Zone("tarFields", starter, new MapGenerator("tarFields")
|
||||||
.decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{
|
.decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{
|
||||||
loadout = Loadouts.basicFoundation;
|
loadout = Loadouts.basicFoundation;
|
||||||
startingItems = list(copper, 250, lead, 100);
|
startingItems = list(copper, 250, lead, 100);
|
||||||
@@ -199,7 +200,7 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
desolateRift = new Zone("desolateRift", new MapGenerator("desolateRift")){{
|
desolateRift = new Zone("desolateRift", starter, new MapGenerator("desolateRift")){{
|
||||||
loadout = Loadouts.basicNucleus;
|
loadout = Loadouts.basicNucleus;
|
||||||
startingItems = list(copper, 1000, lead, 1000, Items.graphite, 250, titanium, 250, Items.silicon, 250);
|
startingItems = list(copper, 1000, lead, 1000, Items.graphite, 250, titanium, 250, Items.silicon, 250);
|
||||||
conditionWave = 3;
|
conditionWave = 3;
|
||||||
@@ -224,7 +225,7 @@ public class Zones implements ContentList{
|
|||||||
resources = Array.with(Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
resources = Array.with(Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||||
}};*/
|
}};*/
|
||||||
|
|
||||||
nuclearComplex = new Zone("nuclearComplex", new MapGenerator("nuclearProductionComplex", 1)
|
nuclearComplex = new Zone("nuclearComplex", starter, new MapGenerator("nuclearProductionComplex", 1)
|
||||||
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
||||||
loadout = Loadouts.basicNucleus;
|
loadout = Loadouts.basicNucleus;
|
||||||
startingItems = list(copper, 1250, lead, 1500, Items.silicon, 400, Items.metaglass, 250);
|
startingItems = list(copper, 1250, lead, 1500, Items.silicon, 400, Items.metaglass, 250);
|
||||||
|
|||||||
@@ -240,6 +240,7 @@ public class Logic implements ApplicationListener{
|
|||||||
bulletGroup.update();
|
bulletGroup.update();
|
||||||
tileGroup.update();
|
tileGroup.update();
|
||||||
fireGroup.update();
|
fireGroup.update();
|
||||||
|
weatherGroup.update();
|
||||||
}else{
|
}else{
|
||||||
for(EntityGroup<?> group : unitGroups){
|
for(EntityGroup<?> group : unitGroups){
|
||||||
group.updateEvents();
|
group.updateEvents();
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ public abstract class UnlockableContent extends MappableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the localized name of this content. */
|
/** Returns the localized name of this content. */
|
||||||
public abstract String localizedName();
|
public String localizedName(){
|
||||||
|
return localizedName;
|
||||||
|
}
|
||||||
|
|
||||||
//public abstract TextureRegion getContentIcon();
|
//public abstract TextureRegion getContentIcon();
|
||||||
|
|
||||||
@@ -53,7 +55,7 @@ public abstract class UnlockableContent extends MappableContent{
|
|||||||
public void onUnlock(){
|
public void onUnlock(){
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Whether this content is always hidden in the content info dialog. */
|
/** Whether this content is always hidden in the content database dialog. */
|
||||||
public boolean isHidden(){
|
public boolean isHidden(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package io.anuke.mindustry.entities.traits;
|
package io.anuke.mindustry.entities.traits;
|
||||||
|
|
||||||
/**
|
/** Marks an entity as serializable. */
|
||||||
* Marks an entity as serializable.
|
|
||||||
*/
|
|
||||||
public interface SaveTrait extends Entity, TypeTrait, Saveable{
|
public interface SaveTrait extends Entity, TypeTrait, Saveable{
|
||||||
byte version();
|
|
||||||
|
default byte version(){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.entities.traits;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
/** Marks something as saveable; not necessarily used for entities. */
|
||||||
public interface Saveable{
|
public interface Saveable{
|
||||||
void writeSave(DataOutput stream) throws IOException;
|
void writeSave(DataOutput stream) throws IOException;
|
||||||
void readSave(DataInput stream, byte version) throws IOException;
|
void readSave(DataInput stream, byte version) throws IOException;
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Crawler extends GroundUnit{
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Dagger extends GroundUnit{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Draug extends MinerDrone{
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Eruptor extends GroundUnit{
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Fortress extends GroundUnit{
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Ghoul extends FlyingUnit{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import io.anuke.arc.math.Angles;
|
|||||||
import io.anuke.arc.math.Mathf;
|
import io.anuke.arc.math.Mathf;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
|
|
||||||
public class Revenant extends FlyingUnit{
|
public class HoverUnit extends FlyingUnit{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawWeapons(){
|
public void drawWeapons(){
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Phantom extends BuilderDrone{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Spirit extends RepairDrone{
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Titan extends GroundUnit{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.entities.type.base;
|
|
||||||
|
|
||||||
public class Wraith extends FlyingUnit{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -31,6 +31,17 @@ public enum CacheLayer{
|
|||||||
endShader(Shaders.tar);
|
endShader(Shaders.tar);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
slag{
|
||||||
|
@Override
|
||||||
|
public void begin(){
|
||||||
|
beginShader();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void end(){
|
||||||
|
endShader(Shaders.slag);
|
||||||
|
}
|
||||||
|
},
|
||||||
normal,
|
normal,
|
||||||
walls;
|
walls;
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,11 @@ import io.anuke.arc.util.Time;
|
|||||||
public class Shaders{
|
public class Shaders{
|
||||||
public static Shadow shadow;
|
public static Shadow shadow;
|
||||||
public static BlockBuild blockbuild;
|
public static BlockBuild blockbuild;
|
||||||
public static @Nullable
|
public static @Nullable Shield shield;
|
||||||
Shield shield;
|
|
||||||
public static UnitBuild build;
|
public static UnitBuild build;
|
||||||
public static FogShader fog;
|
public static FogShader fog;
|
||||||
public static MenuShader menu;
|
public static MenuShader menu;
|
||||||
public static SurfaceShader water, tar;
|
public static SurfaceShader water, tar, slag;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
shadow = new Shadow();
|
shadow = new Shadow();
|
||||||
@@ -33,6 +32,7 @@ public class Shaders{
|
|||||||
menu = new MenuShader();
|
menu = new MenuShader();
|
||||||
water = new SurfaceShader("water");
|
water = new SurfaceShader("water");
|
||||||
tar = new SurfaceShader("tar");
|
tar = new SurfaceShader("tar");
|
||||||
|
slag = new SurfaceShader("slag");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MenuShader extends LoadShader{
|
public static class MenuShader extends LoadShader{
|
||||||
|
|||||||
@@ -66,54 +66,54 @@ public class LegacyTypeTable{
|
|||||||
Player::new,
|
Player::new,
|
||||||
Fire::new,
|
Fire::new,
|
||||||
Puddle::new,
|
Puddle::new,
|
||||||
Draug::new,
|
MinerDrone::new,
|
||||||
Spirit::new,
|
RepairDrone::new,
|
||||||
Phantom::new,
|
BuilderDrone::new,
|
||||||
Dagger::new,
|
GroundUnit::new,
|
||||||
Crawler::new,
|
GroundUnit::new,
|
||||||
Titan::new,
|
GroundUnit::new,
|
||||||
Fortress::new,
|
GroundUnit::new,
|
||||||
Eruptor::new,
|
GroundUnit::new,
|
||||||
Wraith::new,
|
FlyingUnit::new,
|
||||||
Ghoul::new,
|
FlyingUnit::new,
|
||||||
Revenant::new
|
HoverUnit::new
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Prov[] build80Table = {
|
private static final Prov[] build80Table = {
|
||||||
Player::new,
|
Player::new,
|
||||||
Fire::new,
|
Fire::new,
|
||||||
Puddle::new,
|
Puddle::new,
|
||||||
Bullet::new, //TODO reading these may crash
|
Bullet::new,
|
||||||
Lightning::new,
|
Lightning::new,
|
||||||
Draug::new,
|
MinerDrone::new,
|
||||||
Spirit::new,
|
RepairDrone::new,
|
||||||
Phantom::new,
|
BuilderDrone::new,
|
||||||
Dagger::new,
|
GroundUnit::new,
|
||||||
Crawler::new,
|
GroundUnit::new,
|
||||||
Titan::new,
|
GroundUnit::new,
|
||||||
Fortress::new,
|
GroundUnit::new,
|
||||||
Eruptor::new,
|
GroundUnit::new,
|
||||||
Wraith::new,
|
FlyingUnit::new,
|
||||||
Ghoul::new,
|
FlyingUnit::new,
|
||||||
Revenant::new
|
HoverUnit::new
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Prov[] build79Table = {
|
private static final Prov[] build79Table = {
|
||||||
Player::new,
|
Player::new,
|
||||||
Fire::new,
|
Fire::new,
|
||||||
Puddle::new,
|
Puddle::new,
|
||||||
Bullet::new, //TODO reading these may crash
|
Bullet::new,
|
||||||
Lightning::new,
|
Lightning::new,
|
||||||
Spirit::new,
|
RepairDrone::new,
|
||||||
Dagger::new,
|
GroundUnit::new,
|
||||||
Crawler::new,
|
GroundUnit::new,
|
||||||
Titan::new,
|
GroundUnit::new,
|
||||||
Fortress::new,
|
GroundUnit::new,
|
||||||
Eruptor::new,
|
GroundUnit::new,
|
||||||
Wraith::new,
|
FlyingUnit::new,
|
||||||
Ghoul::new,
|
FlyingUnit::new,
|
||||||
Phantom::new,
|
BuilderDrone::new,
|
||||||
Revenant::new
|
HoverUnit::new
|
||||||
};
|
};
|
||||||
|
|
||||||
public static Prov[] getTable(int build){
|
public static Prov[] getTable(int build){
|
||||||
|
|||||||
@@ -15,39 +15,22 @@ import io.anuke.mindustry.world.blocks.storage.*;
|
|||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
|
//TODO:
|
||||||
|
//- limited # of enemy spawns as filter
|
||||||
|
//- spawn loadout selection as filter
|
||||||
|
//- configure map loadout, make 1 core the default
|
||||||
public class MapGenerator extends Generator{
|
public class MapGenerator extends Generator{
|
||||||
private Map map;
|
private Map map;
|
||||||
private String mapName;
|
private String mapName;
|
||||||
private Array<Decoration> decorations = Array.with(new Decoration(Blocks.stone, Blocks.rock, 0.003f));
|
|
||||||
/**
|
|
||||||
* The amount of final enemy spawns used. -1 to use everything in the map.
|
|
||||||
* This amount of enemy spawns is selected randomly from the map.
|
|
||||||
*/
|
|
||||||
public int enemySpawns = -1;
|
|
||||||
/** Whether floor is distorted along with blocks. */
|
|
||||||
public boolean distortFloor = false;
|
|
||||||
|
|
||||||
public MapGenerator(String mapName){
|
public MapGenerator(String mapName){
|
||||||
this.mapName = mapName;
|
this.mapName = mapName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapGenerator(String mapName, int enemySpawns){
|
|
||||||
this.mapName = mapName;
|
|
||||||
this.enemySpawns = enemySpawns;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MapGenerator decor(Decoration... decor){
|
|
||||||
this.decorations.addAll(decor);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
public void removePrefix(String name){
|
public void removePrefix(String name){
|
||||||
this.mapName = this.mapName.substring(name.length() + 1);
|
this.mapName = this.mapName.substring(name.length() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
decor(new Decoration(Blocks.snow, Blocks.snowrock, 0.01), new Decoration(Blocks.ignarock, Blocks.pebbles, 0.03f));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map getMap(){
|
public Map getMap(){
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@@ -155,16 +138,4 @@ public class MapGenerator extends Generator{
|
|||||||
world.prepareTiles(tiles);
|
world.prepareTiles(tiles);
|
||||||
world.setMap(map);
|
world.setMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Decoration{
|
|
||||||
public final Block floor;
|
|
||||||
public final Block wall;
|
|
||||||
public final double chance;
|
|
||||||
|
|
||||||
public Decoration(Block floor, Block wall, double chance){
|
|
||||||
this.floor = floor;
|
|
||||||
this.wall = wall;
|
|
||||||
this.chance = chance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ public enum ContentType{
|
|||||||
effect,
|
effect,
|
||||||
zone,
|
zone,
|
||||||
loadout,
|
loadout,
|
||||||
typeid;
|
typeid,
|
||||||
|
planet;
|
||||||
|
|
||||||
public static final ContentType[] all = values();
|
public static final ContentType[] all = values();
|
||||||
}
|
}
|
||||||
|
|||||||
28
core/src/io/anuke/mindustry/type/Planet.java
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
package io.anuke.mindustry.type;
|
||||||
|
|
||||||
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
|
import io.anuke.mindustry.ctype.*;
|
||||||
|
|
||||||
|
//TODO add full icon for this planet
|
||||||
|
public class Planet extends UnlockableContent{
|
||||||
|
|
||||||
|
public Planet(String name){
|
||||||
|
super(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Planets cannot be viewed in the database dialog. */
|
||||||
|
@Override
|
||||||
|
public boolean isHidden(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void displayInfo(Table table){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContentType getContentType(){
|
||||||
|
return ContentType.planet;
|
||||||
|
}
|
||||||
|
}
|
||||||
80
core/src/io/anuke/mindustry/type/Weather.java
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
package io.anuke.mindustry.type;
|
||||||
|
|
||||||
|
import io.anuke.annotations.Annotations.*;
|
||||||
|
import io.anuke.arc.util.ArcAnnotate.*;
|
||||||
|
import io.anuke.mindustry.ctype.*;
|
||||||
|
import io.anuke.mindustry.entities.*;
|
||||||
|
import io.anuke.mindustry.entities.traits.*;
|
||||||
|
import io.anuke.mindustry.entities.type.*;
|
||||||
|
import io.anuke.mindustry.type.Weather.*;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
|
public abstract class Weather<T extends WeatherEntity> extends MappableContent{
|
||||||
|
protected float duration = 100f;
|
||||||
|
|
||||||
|
public Weather(String name){
|
||||||
|
super(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void update(T entity);
|
||||||
|
|
||||||
|
public abstract void draw(T entity);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContentType getContentType(){
|
||||||
|
return ContentType.weather;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Represents the in-game state of a weather event. */
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static class WeatherEntity extends BaseEntity implements SaveTrait, DrawTrait{
|
||||||
|
/** How long this event has been occuring in ticks. */
|
||||||
|
protected float life;
|
||||||
|
/** Type of weather that is being simulated. */
|
||||||
|
protected @NonNull Weather weather;
|
||||||
|
|
||||||
|
public WeatherEntity(Weather weather){
|
||||||
|
this.weather = weather;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(){
|
||||||
|
weather.update(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(){
|
||||||
|
weather.draw(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@CallSuper
|
||||||
|
@Override
|
||||||
|
public void writeSave(DataOutput stream) throws IOException{
|
||||||
|
stream.writeShort(weather.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@CallSuper
|
||||||
|
@Override
|
||||||
|
public void readSave(DataInput stream, byte version) throws IOException{
|
||||||
|
weather = content.getByID(ContentType.weather, stream.readShort());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte version(){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeID getTypeID(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityGroup targetGroup(){
|
||||||
|
return weatherGroup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package io.anuke.mindustry.type;
|
|
||||||
|
|
||||||
import io.anuke.mindustry.ctype.Content;
|
|
||||||
|
|
||||||
//currently unimplemented, see trello for implementation plans
|
|
||||||
public class WeatherEvent extends Content{
|
|
||||||
public final String name;
|
|
||||||
|
|
||||||
public WeatherEvent(String name){
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContentType getContentType(){
|
|
||||||
return ContentType.weather;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,6 +18,7 @@ import static io.anuke.mindustry.Vars.*;
|
|||||||
public class Zone extends UnlockableContent{
|
public class Zone extends UnlockableContent{
|
||||||
public @NonNull Generator generator;
|
public @NonNull Generator generator;
|
||||||
public @NonNull Objective configureObjective = new ZoneWave(this, 15);
|
public @NonNull Objective configureObjective = new ZoneWave(this, 15);
|
||||||
|
public @NonNull Planet planet;
|
||||||
public Array<Objective> requirements = new Array<>();
|
public Array<Objective> requirements = new Array<>();
|
||||||
//TODO autogenerate
|
//TODO autogenerate
|
||||||
public Array<Item> resources = new Array<>();
|
public Array<Item> resources = new Array<>();
|
||||||
@@ -35,13 +36,14 @@ public class Zone extends UnlockableContent{
|
|||||||
|
|
||||||
private Array<ItemStack> defaultStartingItems = new Array<>();
|
private Array<ItemStack> defaultStartingItems = new Array<>();
|
||||||
|
|
||||||
public Zone(String name, Generator generator){
|
public Zone(String name, Planet planet, Generator generator){
|
||||||
super(name);
|
super(name);
|
||||||
this.generator = generator;
|
this.generator = generator;
|
||||||
|
this.planet = planet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Zone(String name){
|
public Zone(String name){
|
||||||
this(name, new MapGenerator(name));
|
this(name, Planets.starter, new MapGenerator(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -200,7 +200,6 @@ public class FileChooser extends FloatingDialog{
|
|||||||
files.add(upbutton).align(Align.topLeft).fillX().expandX().height(50).pad(2).colspan(2);
|
files.add(upbutton).align(Align.topLeft).fillX().expandX().height(50).pad(2).colspan(2);
|
||||||
files.row();
|
files.row();
|
||||||
|
|
||||||
|
|
||||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||||
group.setMinCheckCount(0);
|
group.setMinCheckCount(0);
|
||||||
|
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ public class ApplicationTests{
|
|||||||
void buildingOverlap(){
|
void buildingOverlap(){
|
||||||
initBuilding();
|
initBuilding();
|
||||||
|
|
||||||
Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.sharded);
|
BuilderDrone d1 = (BuilderDrone)UnitTypes.phantom.create(Team.sharded);
|
||||||
Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.sharded);
|
BuilderDrone d2 = (BuilderDrone)UnitTypes.phantom.create(Team.sharded);
|
||||||
|
|
||||||
d1.set(10f, 20f);
|
d1.set(10f, 20f);
|
||||||
d2.set(10f, 20f);
|
d2.set(10f, 20f);
|
||||||
@@ -301,8 +301,8 @@ public class ApplicationTests{
|
|||||||
void buildingDestruction(){
|
void buildingDestruction(){
|
||||||
initBuilding();
|
initBuilding();
|
||||||
|
|
||||||
Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.sharded);
|
BuilderDrone d1 = (BuilderDrone)UnitTypes.phantom.create(Team.sharded);
|
||||||
Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.sharded);
|
BuilderDrone d2 = (BuilderDrone)UnitTypes.phantom.create(Team.sharded);
|
||||||
|
|
||||||
d1.set(10f, 20f);
|
d1.set(10f, 20f);
|
||||||
d2.set(10f, 20f);
|
d2.set(10f, 20f);
|
||||||
|
|||||||