Added a 'tutorial' / Bugfixes

This commit is contained in:
Anuken 2018-11-07 19:23:40 -05:00
parent 042c671bd4
commit 122fbbed22
5 changed files with 30 additions and 14 deletions

View File

@ -167,7 +167,7 @@ public class Logic extends Module{
if(!state.isPaused()){ if(!state.isPaused()){
Timers.update(); Timers.update();
if(!state.mode.disableWaveTimer && !state.mode.disableWaves){ if(!state.mode.disableWaveTimer && !state.mode.disableWaves && !state.gameOver){
state.wavetime -= Timers.delta(); state.wavetime -= Timers.delta();
} }

View File

@ -23,10 +23,10 @@ public class SectorPresets{
public SectorPresets(){ public SectorPresets(){
//base tutorial mission (disabled) //base tutorial mission
/*add(new SectorPreset(0, 0, add(new SectorPreset(0, 0,
TutorialSector.getMissions(), TutorialSector.getMissions(),
Array.with(Items.copper, Items.coal, Items.lead)));*/ Array.with(Items.copper, Items.coal, Items.lead)));
//command center mission //command center mission
add(new SectorPreset(0, 1, add(new SectorPreset(0, 1,

View File

@ -229,7 +229,7 @@ public class Sectors{
private void generate(Sector sector){ private void generate(Sector sector){
//50% chance to get a wave mission //50% chance to get a wave mission
if(Mathf.randomSeed(sector.getSeed() + 6) < 0.5){ if(Mathf.randomSeed(sector.getSeed() + 7) < 0.5){
//recipe mission (maybe) //recipe mission (maybe)
addRecipeMission(sector, 3); addRecipeMission(sector, 3);
sector.missions.add(new WaveMission(sector.difficulty*5 + Mathf.randomSeed(sector.getSeed(), 1, 4)*5)); sector.missions.add(new WaveMission(sector.difficulty*5 + Mathf.randomSeed(sector.getSeed(), 1, 4)*5));

View File

@ -2,12 +2,15 @@ package io.anuke.mindustry.maps;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.content.UnitTypes; import io.anuke.mindustry.content.blocks.CraftingBlocks;
import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.content.blocks.ProductionBlocks;
import io.anuke.mindustry.maps.generation.Generation; import io.anuke.mindustry.content.blocks.StorageBlocks;
import io.anuke.mindustry.maps.missions.*; import io.anuke.mindustry.content.blocks.UnitBlocks;
import io.anuke.mindustry.maps.missions.BlockMission;
import io.anuke.mindustry.maps.missions.ItemMission;
import io.anuke.mindustry.maps.missions.Mission;
import io.anuke.mindustry.maps.missions.WaveMission;
import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Block;
import io.anuke.ucore.util.Bundles;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
@ -16,7 +19,7 @@ public class TutorialSector{
private static int droneIndex; private static int droneIndex;
public static Array<Mission> getMissions(){ public static Array<Mission> getMissions(){
/*
Array<Mission> missions = Array.with( Array<Mission> missions = Array.with(
new ItemMission(Items.copper, 60).setMessage("$tutorial.begin"), new ItemMission(Items.copper, 60).setMessage("$tutorial.begin"),
@ -83,9 +86,21 @@ public class TutorialSector{
droneIndex = i; droneIndex = i;
break; break;
} }
} }*/
return missions; return Array.with(
//intentionally unlocalized
new ItemMission(Items.copper, 10).setMessage("An updated tutorial will return next build.\nFor now, you'll have to deal with... this."),
new BlockMission(ProductionBlocks.mechanicalDrill),
new ItemMission(Items.copper, 100),
new ItemMission(Items.lead, 50),
new BlockMission(CraftingBlocks.smelter),
new ItemMission(Items.densealloy, 10),
new WaveMission(5)
);
} }
public static boolean supressDrone(){ public static boolean supressDrone(){

View File

@ -133,8 +133,9 @@ public class Tile implements PosTrait, TargetTrait{
return wall; return wall;
} }
@Override
public Team getTeam(){ public Team getTeam(){
return Team.all[team]; return Team.all[target().team];
} }
public void setTeam(Team team){ public void setTeam(Team team){