mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-24 09:56:32 +07:00
Added a 'tutorial' / Bugfixes
This commit is contained in:
parent
042c671bd4
commit
122fbbed22
@ -167,7 +167,7 @@ public class Logic extends Module{
|
||||
if(!state.isPaused()){
|
||||
Timers.update();
|
||||
|
||||
if(!state.mode.disableWaveTimer && !state.mode.disableWaves){
|
||||
if(!state.mode.disableWaveTimer && !state.mode.disableWaves && !state.gameOver){
|
||||
state.wavetime -= Timers.delta();
|
||||
}
|
||||
|
||||
|
@ -23,10 +23,10 @@ public class SectorPresets{
|
||||
|
||||
public SectorPresets(){
|
||||
|
||||
//base tutorial mission (disabled)
|
||||
/*add(new SectorPreset(0, 0,
|
||||
//base tutorial mission
|
||||
add(new SectorPreset(0, 0,
|
||||
TutorialSector.getMissions(),
|
||||
Array.with(Items.copper, Items.coal, Items.lead)));*/
|
||||
Array.with(Items.copper, Items.coal, Items.lead)));
|
||||
|
||||
//command center mission
|
||||
add(new SectorPreset(0, 1,
|
||||
|
@ -229,7 +229,7 @@ public class Sectors{
|
||||
private void generate(Sector sector){
|
||||
|
||||
//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)
|
||||
addRecipeMission(sector, 3);
|
||||
sector.missions.add(new WaveMission(sector.difficulty*5 + Mathf.randomSeed(sector.getSeed(), 1, 4)*5));
|
||||
|
@ -2,12 +2,15 @@ package io.anuke.mindustry.maps;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.UnitTypes;
|
||||
import io.anuke.mindustry.content.blocks.*;
|
||||
import io.anuke.mindustry.maps.generation.Generation;
|
||||
import io.anuke.mindustry.maps.missions.*;
|
||||
import io.anuke.mindustry.content.blocks.CraftingBlocks;
|
||||
import io.anuke.mindustry.content.blocks.ProductionBlocks;
|
||||
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
||||
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.ucore.util.Bundles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@ -16,7 +19,7 @@ public class TutorialSector{
|
||||
private static int droneIndex;
|
||||
|
||||
public static Array<Mission> getMissions(){
|
||||
|
||||
/*
|
||||
Array<Mission> missions = Array.with(
|
||||
new ItemMission(Items.copper, 60).setMessage("$tutorial.begin"),
|
||||
|
||||
@ -83,9 +86,21 @@ public class TutorialSector{
|
||||
droneIndex = i;
|
||||
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(){
|
||||
|
@ -133,8 +133,9 @@ public class Tile implements PosTrait, TargetTrait{
|
||||
return wall;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Team getTeam(){
|
||||
return Team.all[team];
|
||||
return Team.all[target().team];
|
||||
}
|
||||
|
||||
public void setTeam(Team team){
|
||||
|
Loading…
Reference in New Issue
Block a user