Final tutorial fixes
This commit is contained in:
@@ -63,6 +63,7 @@ text.mission.complete=Mission complete!
|
|||||||
text.mission.complete.body=Sector {0},{1} has been conquered.
|
text.mission.complete.body=Sector {0},{1} has been conquered.
|
||||||
text.mission.wave=Survive[accent] {0}/{1} []waves\nWave in {2}
|
text.mission.wave=Survive[accent] {0}/{1} []waves\nWave in {2}
|
||||||
text.mission.wave.enemies=Survive[accent] {0}/{1} []waves\n{2} Enemies
|
text.mission.wave.enemies=Survive[accent] {0}/{1} []waves\n{2} Enemies
|
||||||
|
text.mission.wave.enemy=Survive[accent] {0}/{1} []waves\n{2} Enemy
|
||||||
text.mission.wave.menu=Survive[accent] {0} []waves
|
text.mission.wave.menu=Survive[accent] {0} []waves
|
||||||
text.mission.battle=Destroy the enemy core
|
text.mission.battle=Destroy the enemy core
|
||||||
text.mission.resource.menu=Obtain {0} x{1}
|
text.mission.resource.menu=Obtain {0} x{1}
|
||||||
@@ -284,7 +285,7 @@ text.settings.clearall=Clear All
|
|||||||
text.paused=Paused
|
text.paused=Paused
|
||||||
text.yes=Yes
|
text.yes=Yes
|
||||||
text.no=No
|
text.no=No
|
||||||
text.info.title=[accent]Info
|
text.info.title=Info
|
||||||
text.error.title=[crimson]An error has occured
|
text.error.title=[crimson]An error has occured
|
||||||
text.error.crashtitle=An error has occured
|
text.error.crashtitle=An error has occured
|
||||||
text.blocks.blockinfo=Block Info
|
text.blocks.blockinfo=Block Info
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class Vars{
|
|||||||
//time between waves in frames (on normal mode)
|
//time between waves in frames (on normal mode)
|
||||||
public static final float wavespace = 60 * 60 * 1.5f;
|
public static final float wavespace = 60 * 60 * 1.5f;
|
||||||
|
|
||||||
public static final float mineTransferRange = 250f;
|
public static final float mineTransferRange = 220f;
|
||||||
//set ridiculously high for now
|
//set ridiculously high for now
|
||||||
public static final float coreBuildRange = 999999f;
|
public static final float coreBuildRange = 999999f;
|
||||||
//team of the player by default
|
//team of the player by default
|
||||||
|
|||||||
@@ -121,6 +121,10 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
|||||||
this.spawner = tile.packedPosition();
|
this.spawner = tile.packedPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setIntSpawner(int pos){
|
||||||
|
this.spawner = pos;
|
||||||
|
}
|
||||||
|
|
||||||
/**Sets this to a 'wave' unit, which means it has slightly different AI and will not run out of ammo.*/
|
/**Sets this to a 'wave' unit, which means it has slightly different AI and will not run out of ammo.*/
|
||||||
public void setWave(){
|
public void setWave(){
|
||||||
isWave = true;
|
isWave = true;
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ public class DesktopInput extends InputHandler{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Inputs.keyTap(section, "deselect")){
|
||||||
|
player.setMineTile(null);
|
||||||
|
}
|
||||||
|
|
||||||
if(!ui.hasMouse()){
|
if(!ui.hasMouse()){
|
||||||
if(Inputs.keyTap(section, "select")){
|
if(Inputs.keyTap(section, "select")){
|
||||||
if(isPlacing()){
|
if(isPlacing()){
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
|
|||||||
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.core.GameState.State;
|
import io.anuke.mindustry.core.GameState.State;
|
||||||
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.io.SaveIO;
|
import io.anuke.mindustry.io.SaveIO;
|
||||||
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
||||||
@@ -132,6 +133,13 @@ public class Sectors{
|
|||||||
for(EntityGroup<?> group : Entities.getAllGroups()){
|
for(EntityGroup<?> group : Entities.getAllGroups()){
|
||||||
for(Entity entity : group.all()){
|
for(Entity entity : group.all()){
|
||||||
entity.set(entity.getX() + shiftX * tilesize, entity.getY() + shiftY * tilesize);
|
entity.set(entity.getX() + shiftX * tilesize, entity.getY() + shiftY * tilesize);
|
||||||
|
|
||||||
|
if(entity instanceof BaseUnit){
|
||||||
|
Tile spawner = ((BaseUnit) entity).getSpawner();
|
||||||
|
if(spawner == null) continue;
|
||||||
|
int i = spawner.packedPosition();
|
||||||
|
((BaseUnit) entity).setIntSpawner(world.transform(i, world.width(), world.height(), sector.width*sectorSize, shiftX, shiftY));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.anuke.mindustry.content.Items;
|
|||||||
import io.anuke.mindustry.content.UnitTypes;
|
import io.anuke.mindustry.content.UnitTypes;
|
||||||
import io.anuke.mindustry.content.blocks.*;
|
import io.anuke.mindustry.content.blocks.*;
|
||||||
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
||||||
|
import io.anuke.mindustry.maps.generation.Generation;
|
||||||
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
||||||
import io.anuke.mindustry.maps.missions.*;
|
import io.anuke.mindustry.maps.missions.*;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
@@ -66,7 +67,7 @@ public class TutorialSector{
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new ItemMission(Items.lead, 90).setMessage("$tutorial.lead"),
|
new ItemMission(Items.lead, 150).setMessage("$tutorial.lead"),
|
||||||
new ItemMission(Items.copper, 250).setMessage("$tutorial.morecopper"),
|
new ItemMission(Items.copper, 250).setMessage("$tutorial.morecopper"),
|
||||||
|
|
||||||
new BlockLocMission(CraftingBlocks.smelter, 58, 69).setMessage("$tutorial.smelter"),
|
new BlockLocMission(CraftingBlocks.smelter, 58, 69).setMessage("$tutorial.smelter"),
|
||||||
@@ -129,7 +130,9 @@ public class TutorialSector{
|
|||||||
generateBase();
|
generateBase();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new BattleMission().setMessage("$tutorial.battle")
|
new BattleMission(){
|
||||||
|
public void generate(Generation gen){} //no
|
||||||
|
}.setMessage("$tutorial.battle")
|
||||||
);
|
);
|
||||||
|
|
||||||
//find drone marker mission
|
//find drone marker mission
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package io.anuke.mindustry.maps.missions;
|
package io.anuke.mindustry.maps.missions;
|
||||||
|
|
||||||
import io.anuke.mindustry.Vars;
|
|
||||||
import io.anuke.mindustry.game.GameMode;
|
|
||||||
import io.anuke.ucore.util.Bundles;
|
import io.anuke.ucore.util.Bundles;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.threads;
|
import static io.anuke.mindustry.Vars.threads;
|
||||||
@@ -31,9 +29,4 @@ public class ActionMission extends Mission{
|
|||||||
public String displayString(){
|
public String displayString(){
|
||||||
return Bundles.get("text.loading");
|
return Bundles.get("text.loading");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public GameMode getMode(){
|
|
||||||
return Vars.state.mode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package io.anuke.mindustry.maps.missions;
|
|||||||
|
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.game.GameMode;
|
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.util.Bundles;
|
import io.anuke.ucore.util.Bundles;
|
||||||
@@ -19,11 +18,6 @@ public class ItemMission extends Mission{
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public GameMode getMode(){
|
|
||||||
return GameMode.waves;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isComplete(){
|
public boolean isComplete(){
|
||||||
for(Tile tile : state.teams.get(Vars.defaultTeam).cores){
|
for(Tile tile : state.teams.get(Vars.defaultTeam).cores){
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.maps.missions;
|
|||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.entities.units.UnitType;
|
import io.anuke.mindustry.entities.units.UnitType;
|
||||||
import io.anuke.mindustry.game.GameMode;
|
|
||||||
import io.anuke.ucore.util.Bundles;
|
import io.anuke.ucore.util.Bundles;
|
||||||
|
|
||||||
public class UnitMission extends Mission{
|
public class UnitMission extends Mission{
|
||||||
@@ -27,9 +26,4 @@ public class UnitMission extends Mission{
|
|||||||
public String displayString(){
|
public String displayString(){
|
||||||
return Bundles.format("text.mission.unit", type.localizedName());
|
return Bundles.format("text.mission.unit", type.localizedName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public GameMode getMode(){
|
|
||||||
return GameMode.noWaves;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,10 @@ public class WaveMission extends Mission{
|
|||||||
@Override
|
@Override
|
||||||
public String displayString(){
|
public String displayString(){
|
||||||
return state.wave > target ?
|
return state.wave > target ?
|
||||||
Bundles.format("text.mission.wave.enemies", state.wave, target, Vars.unitGroups[Vars.waveTeam.ordinal()].size()) :
|
Bundles.format(
|
||||||
|
Vars.unitGroups[Vars.waveTeam.ordinal()].size() > 1 ?
|
||||||
|
"text.mission.wave.enemies" :
|
||||||
|
"text.mission.wave.enemy", target, target, Vars.unitGroups[Vars.waveTeam.ordinal()].size()) :
|
||||||
Bundles.format("text.mission.wave", state.wave, target, (int)(state.wavetime/60));
|
Bundles.format("text.mission.wave", state.wave, target, (int)(state.wavetime/60));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ public class MendProjector extends Block{
|
|||||||
protected float reload = 250f;
|
protected float reload = 250f;
|
||||||
protected float range = 50f;
|
protected float range = 50f;
|
||||||
protected float healPercent = 6f;
|
protected float healPercent = 6f;
|
||||||
protected float phaseBoost = 10f;
|
protected float phaseBoost = 12f;
|
||||||
|
protected float phaseRangeBoost = 40f;
|
||||||
protected float useTime = 300f;
|
protected float useTime = 300f;
|
||||||
|
|
||||||
public MendProjector(String name){
|
public MendProjector(String name){
|
||||||
@@ -65,7 +66,7 @@ public class MendProjector extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(entity.charge >= reload){
|
if(entity.charge >= reload){
|
||||||
float realRange = range + entity.phaseHeat * 20f;
|
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||||
|
|
||||||
Effects.effect(BlockFx.healWaveMend, Hue.mix(color, phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange);
|
Effects.effect(BlockFx.healWaveMend, Hue.mix(color, phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange);
|
||||||
entity.charge = 0f;
|
entity.charge = 0f;
|
||||||
|
|||||||
Reference in New Issue
Block a user