Misc bugfixes / New zone

This commit is contained in:
Anuken
2019-02-02 10:14:16 -05:00
parent 59a68ee981
commit e21a3347ac
13 changed files with 1526 additions and 1490 deletions

View File

@@ -20,26 +20,10 @@
#} #}
-verbose -verbose
-verbose
-dontwarn android.support.** -ignorewarnings
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication -keep class io.anuke.mindustry.game.Rules
-dontwarn com.badlogic.gdx.utils.GdxBuild -keep class io.anuke.mindustry.desktop.DesktopLauncher
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild -keepclasseswithmembers public class * {
-dontwarn com.badlogic.gdx.jnigen.BuildTarget* public static void main(java.lang.String[]);
-dontwarn com.badlogic.gdx.graphics.g2d.freetype.FreetypeBuild
-keep class com.badlogic.gdx.controllers.android.AndroidControllers
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
}
-keepclassmembers class com.badlogic.gdx.physics.box2d.World {
boolean contactFilter(long, long);
void beginContact(long);
void endContact(long);
void preSolve(long, long);
void postSolve(long, long);
boolean reportFixture(long);
float reportRayFixture(long, float, float, float, float, float);
} }

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

After

Width:  |  Height:  |  Size: 507 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -277,18 +277,18 @@ public class Blocks implements ContentList{
}}; }};
ignarock = new Floor("ignarock"){{ ignarock = new Floor("ignarock"){{
blendGroup = sand;
}}; }};
hotrock = new Floor("hotrock"){{ hotrock = new Floor("hotrock"){{
heat = 0.5f; heat = 0.5f;
blendGroup = ignarock; blendGroup = sand;
}}; }};
magmarock = new Floor("magmarock"){{ magmarock = new Floor("magmarock"){{
heat = 0.75f; heat = 0.75f;
updateEffect = Fx.magmasmoke; updateEffect = Fx.magmasmoke;
blendGroup = ignarock; blendGroup = sand;
}}; }};
//endregion //endregion
@@ -457,6 +457,18 @@ public class Blocks implements ContentList{
consumes.liquid(Liquids.slag, 0.3f); consumes.liquid(Liquids.slag, 0.3f);
}}; }};
cultivator = new Cultivator("cultivator"){{
requirements(Category.crafting, ItemStack.with(Items.copper, 20, Items.lead, 50, Items.silicon, 20));
output = Items.biomatter;
craftTime = 200;
size = 2;
hasLiquids = true;
hasPower = true;
consumes.power(0.80f);
consumes.liquid(Liquids.water, 0.15f);
}};
biomatterCompressor = new Compressor("biomattercompressor"){{ biomatterCompressor = new Compressor("biomattercompressor"){{
requirements(Category.crafting, ItemStack.with(Items.lead, 70, Items.silicon, 60)); requirements(Category.crafting, ItemStack.with(Items.lead, 70, Items.silicon, 60));
liquidCapacity = 60f; liquidCapacity = 60f;
@@ -951,18 +963,6 @@ public class Blocks implements ContentList{
consumes.liquid(Liquids.water, 0.15f); consumes.liquid(Liquids.water, 0.15f);
}}; }};
cultivator = new Cultivator("cultivator"){{
requirements(Category.production, ItemStack.with(Items.copper, 20, Items.lead, 50, Items.silicon, 20));
output = Items.biomatter;
craftTime = 200;
size = 2;
hasLiquids = true;
hasPower = true;
consumes.power(0.80f);
consumes.liquid(Liquids.water, 0.15f);
}};
//endregion //endregion
//region storage //region storage

View File

@@ -387,16 +387,66 @@ public class Zones implements ContentList{
}}; }};
}}; }};
desolateRift = new Zone("desolateRift", new MapGenerator("desolateRift")){{ desolateRift = new Zone("desolateRift", new MapGenerator("desolateRift").dist(2f)){{
deployCost = ItemStack.with(Items.copper, 300); deployCost = ItemStack.with(Items.copper, 2000);
startingItems = ItemStack.with(Items.copper, 200); startingItems = ItemStack.with(Items.copper, 1500);
conditionWave = 15; itemRequirements = ItemStack.with(Items.copper, 8000, Items.metaglass, 2000, Items.graphite, 3000);
conditionWave = 10;
launchPeriod = 20;
zoneRequirements = new Zone[]{stainedMountains}; zoneRequirements = new Zone[]{stainedMountains};
blockRequirements = new Block[]{Blocks.copperWall}; blockRequirements = new Block[]{Blocks.thermalGenerator};
rules = () -> new Rules(){{ rules = () -> new Rules(){{
waves = true; waves = true;
waveTimer = true; waveTimer = true;
waveSpacing = 60 * 80; waveSpacing = 30 * 60;
spawns = Array.with(
new SpawnGroup(UnitTypes.crawler){{
unitScaling = 1;
spacing = 2;
end = 10;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 2;
spacing = 2;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 10;
unitScaling = 1f;
unitAmount = 3;
spacing = 3;
}},
new SpawnGroup(UnitTypes.fortress){{
begin = 5;
unitScaling = 1;
spacing = 5;
unitAmount = 1;
}},
new SpawnGroup(UnitTypes.fortress){{
begin = 13;
unitScaling = 1;
spacing = 4;
unitAmount = 1;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 11;
spacing = 2;
unitScaling = 2;
unitAmount = 2;
}},
new SpawnGroup(UnitTypes.crawler){{
unitScaling = 1;
spacing = 2;
unitAmount = 4;
begin = 13;
}}
);
}}; }};
}}; }};

View File

@@ -210,9 +210,7 @@ public class BlockRenderer{
}else if(req.layer == Layer.block){ }else if(req.layer == Layer.block){
block.draw(req.tile); block.draw(req.tile);
if(block.synthetic() && req.tile.getTeam() != players[0].getTeam()){ if(block.synthetic() && req.tile.getTeam() != players[0].getTeam()){
Draw.color(req.tile.getTeam().color); block.drawTeam(req.tile);
Draw.rect("block-border", req.tile.drawx() - block.size * tilesize/2f + 4, req.tile.drawy() - block.size * tilesize/2f + 4);
Draw.color();
} }
}else if(req.layer == block.layer){ }else if(req.layer == block.layer){
block.drawLayer(req.tile); block.drawLayer(req.tile);

View File

@@ -214,6 +214,12 @@ public class Block extends BlockStorage{
draw(tile); draw(tile);
} }
public void drawTeam(Tile tile){
Draw.color(tile.getTeam().color);
Draw.rect("block-border", tile.drawx() - size * tilesize/2f + 4, tile.drawy() - size * tilesize/2f + 4);
Draw.color();
}
/** Called after the block is placed by this client. */ /** Called after the block is placed by this client. */
public void playerPlaced(Tile tile){ public void playerPlaced(Tile tile){
} }

View File

@@ -150,7 +150,7 @@ public class Floor extends Block{
} }
protected boolean doEdge(Floor other){ protected boolean doEdge(Floor other){
return (other.blendGroup.id > id || edges() == null) && other.edgeOnto(this); return (other.blendGroup.id > blendGroup.id || edges() == null) && other.edgeOnto(this);
} }
protected boolean edgeOnto(Floor other){ protected boolean edgeOnto(Floor other){

View File

@@ -19,7 +19,7 @@ public class OreBlock extends Floor{
this.base = base; this.base = base;
this.variants = 3; this.variants = 3;
this.edge = base.name; this.edge = base.name;
this.blendGroup = base; this.blendGroup = base.blendGroup;
this.color.set(ore.color); this.color.set(ore.color);
oreBlockMap.getOr(ore, ObjectMap::new).put(base, this); oreBlockMap.getOr(ore, ObjectMap::new).put(base, this);

View File

@@ -37,6 +37,11 @@ public class ShockMine extends Block{
Draw.color(); Draw.color();
} }
@Override
public void drawTeam(Tile tile){
//no
}
@Override @Override
public void draw(Tile tile){ public void draw(Tile tile){
//nope //nope

View File

@@ -84,7 +84,7 @@ public class Cultivator extends GenericCrafter{
return new CultivatorEntity(); return new CultivatorEntity();
} }
public static class CultivatorEntity extends TileEntity{ public static class CultivatorEntity extends GenericCrafterEntity{
public float warmup; public float warmup;
@Override @Override