Added monsoon pad / Renamed factories to pads

This commit is contained in:
Anuken 2018-08-01 16:18:13 -04:00
parent c1de67032c
commit ae90db50fe
23 changed files with 966 additions and 878 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

View File

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

View File

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 384 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 443 B

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -131,9 +131,10 @@ public class Recipes implements ContentList{
//new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
//actual unit related stuff
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 130));
new Recipe(units, UnitBlocks.fabricatorFactory, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.interceptorFactory, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 130));
new Recipe(units, UnitBlocks.fabricatorPad, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.interceptorPad, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.monsoonPad, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
@ -257,7 +258,7 @@ public class Recipes implements ContentList{
new Recipe(units, UnitBlocks.dropPoint, new ItemStack(Items.carbide, 10));
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.carbide, 10));
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 50));
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.tungsten, 50));
new Recipe(units, UnitBlocks.reconstructor, new ItemStack(Items.tungsten, 1));
new Recipe(units, UnitBlocks.overdriveProjector, new ItemStack(Items.tungsten, 1));

View File

@ -8,12 +8,13 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.units.*;
public class UnitBlocks extends BlockList implements ContentList{
public static Block resupplyPoint, repairPoint, droneFactory, fabricatorFactory, interceptorFactory, dropPoint,
reconstructor, overdriveProjector, shieldProjector, commandCenter;
public static Block resupplyPoint, repairPoint, dronePad,
fabricatorPad, interceptorPad, monsoonPad, scoutPad, titanPad,
dropPoint, reconstructor, overdriveProjector, shieldProjector, commandCenter;
@Override
public void load(){
droneFactory = new UnitFactory("drone-factory"){{
dronePad = new UnitFactory("drone-pad"){{
type = UnitTypes.drone;
produceTime = 800;
size = 2;
@ -21,7 +22,7 @@ public class UnitBlocks extends BlockList implements ContentList{
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)});
}};
fabricatorFactory = new UnitFactory("fabricator-factory"){{
fabricatorPad = new UnitFactory("fabricator-pad"){{
type = UnitTypes.fabricator;
produceTime = 1600;
size = 2;
@ -29,7 +30,7 @@ public class UnitBlocks extends BlockList implements ContentList{
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)});
}};
interceptorFactory = new UnitFactory("interceptor-factory"){{
interceptorPad = new UnitFactory("interceptor-pad"){{
type = UnitTypes.interceptor;
produceTime = 1300;
size = 2;
@ -37,6 +38,15 @@ public class UnitBlocks extends BlockList implements ContentList{
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 40)});
}};
monsoonPad = new UnitFactory("monsoon-pad"){{
type = UnitTypes.monsoon;
produceTime = 1400;
size = 3;
consumes.power(0.14f);
shadow = "shadow-round-3";
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 50), new ItemStack(Items.plastanium, 50)});
}};
resupplyPoint = new ResupplyPoint("resupply-point"){{
shadow = "shadow-round-1";
itemCapacity = 30;

View File

@ -372,7 +372,7 @@ public class Control extends Module{
if(!headless){
ui.showInfoFade("$text.sector.unlocked");
}
}else if(world.getSector().missions.get(world.getSector().completedMissions).isComplete()){
}else if(world.getSector().currentMission().isComplete()){
//increment completed missions, check next index next frame
world.getSector().completedMissions ++;
}

View File

@ -32,6 +32,10 @@ public class Sector{
/**Difficulty of the sector, measured by calculating distance from origin and applying scaling.*/
public transient int difficulty;
public Mission currentMission(){
return missions.get(completedMissions);
}
public int getSeed(){
return Bits.packInt(x, y);
}

View File

@ -6,6 +6,7 @@ import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.maps.Sector;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Bundles;
public class BattleMission implements Mission{
@ -15,6 +16,11 @@ public class BattleMission implements Mission{
this.difficulty = difficulty;
}
@Override
public void display(Table table){
table.add("$text.mission.battle");
}
@Override
public GameMode getMode(){
return GameMode.noWaves;

View File

@ -3,11 +3,13 @@ package io.anuke.mindustry.maps.missions;
import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.maps.Sector;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.scene.ui.layout.Table;
public interface Mission{
boolean isComplete();
String displayString();
GameMode getMode();
void display(Table table);
default void generate(Tile[][] tiles, Sector sector){}
}

View File

@ -3,6 +3,7 @@ package io.anuke.mindustry.maps.missions;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.type.Item;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Bundles;
public class ResourceMission implements Mission{
@ -14,6 +15,11 @@ public class ResourceMission implements Mission{
this.amount = amount;
}
@Override
public void display(Table table){
}
@Override
public GameMode getMode(){
return GameMode.waves;

View File

@ -1,6 +1,7 @@
package io.anuke.mindustry.maps.missions;
import io.anuke.mindustry.game.GameMode;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Bundles;
import static io.anuke.mindustry.Vars.state;
@ -12,6 +13,11 @@ public class WaveMission implements Mission{
this.target = target;
}
@Override
public void display(Table table){
}
@Override
public GameMode getMode(){
return GameMode.waves;

View File

@ -2,6 +2,7 @@ package io.anuke.mindustry.ui.dialogs;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.net.Net;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Bundles;
import static io.anuke.mindustry.Vars.*;
@ -10,10 +11,24 @@ public class PausedDialog extends FloatingDialog{
public boolean wasPaused = false;
private SaveDialog save = new SaveDialog();
private LoadDialog load = new LoadDialog();
private Table missionTable;
public PausedDialog(){
super("$text.menu");
setup();
shown(this::rebuild);
}
void rebuild(){
missionTable.clear();
if(world.getSector() != null){
missionTable.add("[LIGHT_GRAY]" + Bundles.format("text.mission", ""));
missionTable.row();
missionTable.table(t -> {
world.getSector().currentMission().display(t);
});
}
}
void setup(){
@ -28,6 +43,9 @@ public class PausedDialog extends FloatingDialog{
if(!Net.active()) state.set(State.paused);
});
content().table(t -> missionTable = t);
content().row();
if(!mobile){
content().defaults().width(220).height(50);