Removed onFirstBegin()
This commit is contained in:
@@ -112,7 +112,6 @@ public class Logic extends Module{
|
|||||||
world.getSector().completedMissions ++;
|
world.getSector().completedMissions ++;
|
||||||
|
|
||||||
state.mode = world.getSector().currentMission().getMode();
|
state.mode = world.getSector().currentMission().getMode();
|
||||||
world.getSector().currentMission().onFirstBegin();
|
|
||||||
world.getSector().currentMission().onBegin();
|
world.getSector().currentMission().onBegin();
|
||||||
world.sectors.save();
|
world.sectors.save();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import io.anuke.ucore.util.Bits;
|
|||||||
import io.anuke.ucore.util.Mathf;
|
import io.anuke.ucore.util.Mathf;
|
||||||
import static io.anuke.mindustry.Vars.content;
|
import static io.anuke.mindustry.Vars.content;
|
||||||
public class MapEditor{
|
public class MapEditor{
|
||||||
public static final int minMapSize = 128, maxMapSize = 512;
|
|
||||||
public static final int[] brushSizes = {1, 2, 3, 4, 5, 9, 15};
|
public static final int[] brushSizes = {1, 2, 3, 4, 5, 9, 15};
|
||||||
|
|
||||||
private MapTileData map;
|
private MapTileData map;
|
||||||
@@ -28,10 +27,6 @@ public class MapEditor{
|
|||||||
private Block drawBlock = Blocks.stone;
|
private Block drawBlock = Blocks.stone;
|
||||||
private Team drawTeam = Team.blue;
|
private Team drawTeam = Team.blue;
|
||||||
|
|
||||||
public MapEditor(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public MapTileData getMap(){
|
public MapTileData getMap(){
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ public class TutorialSector{
|
|||||||
new ActionMission(TutorialSector::generateBase),
|
new ActionMission(TutorialSector::generateBase),
|
||||||
new BattleMission(){
|
new BattleMission(){
|
||||||
public void generate(Generation gen){} //no
|
public void generate(Generation gen){} //no
|
||||||
public void onFirstBegin(){} //also no
|
|
||||||
}.setMessage("$tutorial.battle")
|
}.setMessage("$tutorial.battle")
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -113,7 +112,7 @@ public class TutorialSector{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void generateBase(){
|
private static void generateBase(){
|
||||||
int x = sectorSize/2 + sectorSize, y = sectorSize/2;
|
int x = sectorSize - 50, y = sectorSize - 50;
|
||||||
world.setBlock(world.tile(x, y), StorageBlocks.core, waveTeam);
|
world.setBlock(world.tile(x, y), StorageBlocks.core, waveTeam);
|
||||||
world.setBlock(world.tile(x - 1, y + 2), UnitBlocks.daggerFactory, waveTeam);
|
world.setBlock(world.tile(x - 1, y + 2), UnitBlocks.daggerFactory, waveTeam);
|
||||||
world.setBlock(world.tile(x - 1, y - 3), UnitBlocks.daggerFactory, waveTeam);
|
world.setBlock(world.tile(x - 1, y - 3), UnitBlocks.daggerFactory, waveTeam);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import io.anuke.mindustry.maps.generation.FortressGenerator;
|
|||||||
import io.anuke.mindustry.maps.generation.Generation;
|
import io.anuke.mindustry.maps.generation.Generation;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.util.Bundles;
|
import io.anuke.ucore.util.Bundles;
|
||||||
import io.anuke.ucore.util.SeedRandom;
|
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -25,12 +24,11 @@ public class BattleMission extends Mission{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFirstBegin(){
|
public void generate(Generation gen){
|
||||||
if(state.teams.get(defaultTeam).cores.size == 0){
|
if(state.teams.get(defaultTeam).cores.size == 0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Tile core = state.teams.get(defaultTeam).cores.first();
|
Tile core = state.teams.get(defaultTeam).cores.first();
|
||||||
Generation gen = new Generation(world.getSector(), world.getTiles(), world.width(), world.height(), new SeedRandom(world.getSector().getSeed()-1));
|
|
||||||
int enx = world.width() - 1 - spacing;
|
int enx = world.width() - 1 - spacing;
|
||||||
int eny = world.height() - 1 - spacing;
|
int eny = world.height() - 1 - spacing;
|
||||||
new FortressGenerator().generate(gen, Team.red, core.x, core.y, enx, eny);
|
new FortressGenerator().generate(gen, Team.red, core.x, core.y, enx, eny);
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ public abstract class Mission{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFirstBegin(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**Shows the unique sector message.*/
|
/**Shows the unique sector message.*/
|
||||||
public void showMessage(){
|
public void showMessage(){
|
||||||
if(!headless && extraMessage != null){
|
if(!headless && extraMessage != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user