Fixes to tutorial and typos

This commit is contained in:
Anuken
2018-01-15 18:43:19 -05:00
parent cc45e5afca
commit c9a8d10898
6 changed files with 20 additions and 19 deletions

View File

@@ -181,7 +181,7 @@ text.blocks.maxpowertransfersecond=Max power transfer/second
text.blocks.explosive=Highly explosive!
text.blocks.repairssecond=Repairs/second
text.blocks.health=Health
text.blocks.inaccuracy=Health
text.blocks.inaccuracy=Inaccuracy
text.blocks.shots=Shots
text.blocks.shotssecond=Shots/second
text.blocks.fuel=Fuel
@@ -248,11 +248,11 @@ tutorial.deleteBlock.text=You can delete blocks by clicking the [orange]right m
tutorial.deleteBlockAndroid.text=You can delete blocks by [orange]selecting the crosshair[] in the [orange]break mode menu[] in the bottom left and tapping a block. Try deleting this conveyor.
tutorial.placeTurret.text=Now, select and place a [yellow]turret[] at the [yellow]marked location[].
tutorial.placedTurretAmmo.text=This turret will now accept [yellow]ammo[] from the conveyor. You can see how much ammo it has by hovering over it and checking the [green]green bar[].
tutorial.turretExplanation.text=Turrets will automatically shootInternal at the nearest enemy in range, as long as they have enough ammo.
tutorial.turretExplanation.text=Turrets will automatically shoot at the nearest enemy in range, as long as they have enough ammo.
tutorial.waves.text=Every [yellow]60[] seconds, a wave of [coral]enemies[] will spawn in specific locations and attempt to destroy the core.
tutorial.coreDestruction.text=Your objective is to [yellow]defend the core[]. If the core is destroyed, you [coral]lose the game[].
tutorial.pausingDesktop.text=If you ever need to take a break, press the [orange]pause button[] in the top left or [orange]space[] to pause the game. You can still select and place blocks while paused, but cannot move or shootInternal.
tutorial.pausingAndroid.text=If you ever need to take a break, press the [orange]pause button[] in the top left to pause the game. You can still place select and place blocks while paused.
tutorial.pausingDesktop.text=If you ever need to take a break, press the [orange]pause button[] in the top left or [orange]space[] to pause the game. You can still select and place blocks while paused, but cannot move or shoot.
tutorial.pausingAndroid.text=If you ever need to take a break, press the [orange]pause button[] in the top left to pause the game. You can still break and place blocks while paused.
tutorial.purchaseWeapons.text=You can purchase new [yellow]weapons[] for your mech by opening the upgrade menu in the bottom left.
tutorial.switchWeapons.text=Switch weapons by either clicking its icon in the bottom left, or using numbers [orange][[1-9][].
tutorial.spawnWave.text=Here comes a wave now. Destroy them.
@@ -275,7 +275,7 @@ keybind.move_x.name=move_x
keybind.move_y.name=move_y
keybind.select.name=select
keybind.break.name=break
keybind.shootInternal.name=shoot
keybind.shoot.name=shoot
keybind.zoom_hold.name=zoom_hold
keybind.zoom.name=zoom
keybind.menu.name=menu

View File

@@ -278,8 +278,6 @@ public class NetServer extends Module{
for(EntityGroup<?> group : Entities.getAllGroups()) {
if(group.amount() == 0 || !(group.all().first() instanceof SyncEntity)) continue;
UCore.log("Writing group " + group.getType(), "amount: " + group.amount());
//get write size for one entity (adding 4, as you need to write the ID as well)
int writesize = SyncEntity.getWriteSize((Class<? extends SyncEntity>)group.getType()) + 4;
//amount of entities
@@ -308,7 +306,6 @@ public class NetServer extends Module{
}
SyncEntity entity = (SyncEntity) group.all().get(i);
UCore.log("Writing entity: " + entity.id);
//write ID to the buffer
current.putInt(entity.id);

View File

@@ -31,7 +31,7 @@ public class Tutorial{
}
public boolean active(){
return world.getMap().name.equals("tutorial") && !GameState.is(State.menu);
return world.getMap() != null && world.getMap().name.equals("tutorial") && !GameState.is(State.menu);
}
public void buildUI(table table){

View File

@@ -6,14 +6,14 @@ import com.badlogic.gdx.utils.TimeUtils;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.entities.enemies.EnemyType;
import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.io.SaveFileVersion;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.Upgrade;
import io.anuke.mindustry.resource.Weapon;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.game.GameMode;
import io.anuke.mindustry.world.WorldGenerator;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.WorldGenerator;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.mindustry.world.blocks.types.BlockPart;
import io.anuke.mindustry.world.blocks.types.Rock;
@@ -165,6 +165,7 @@ public class Save14 extends SaveFileVersion{
for(int i = 0; i < rocks; i ++){
int pos = stream.readInt();
Tile tile = Vars.world.tile(pos % Vars.world.width(), pos / Vars.world.width());
if(tile == null) continue;
Block result = WorldGenerator.rocks.get(tile.floor());
if(result != null) tile.setBlock(result);
}

View File

@@ -68,9 +68,8 @@ public class PausedDialog extends FloatingDialog{
content().addButton("$text.quit", () -> {
ui.showConfirm("$text.confirm", "$text.quit.confirm", () -> {
if(Net.active() && Net.client()) Vars.netClient.disconnectQuietly();
runSave();
runExitSave();
hide();
GameState.set(State.menu);
});
});
@@ -111,9 +110,8 @@ public class PausedDialog extends FloatingDialog{
new imagebutton("icon-quit", isize, () -> {
Vars.ui.showConfirm("$text.confirm", "$text.quit.confirm", () -> {
if(Net.active() && Net.client()) Vars.netClient.disconnectQuietly();
runSave();
runExitSave();
hide();
GameState.set(State.menu);
});
}).text("Quit").padTop(4f);
@@ -127,9 +125,13 @@ public class PausedDialog extends FloatingDialog{
}
}
private void runSave(){
private void runExitSave(){
if(Vars.control.getSaves().getCurrent() == null ||
!Vars.control.getSaves().getCurrent().isAutosave()) return;
!Vars.control.getSaves().getCurrent().isAutosave()){
GameState.set(State.menu);
Vars.control.getTutorial().reset();
return;
}
Vars.ui.loadfrag.show("$text.saveload");
@@ -141,6 +143,7 @@ public class PausedDialog extends FloatingDialog{
e = (e.getCause() == null ? e : e.getCause());
Vars.ui.showError("[orange]"+ Bundles.get("text.savefail")+"\n[white]" + ClassReflection.getSimpleName(e.getClass()) + ": " + e.getMessage() + "\n" + "at " + e.getStackTrace()[0].getFileName() + ":" + e.getStackTrace()[0].getLineNumber());
}
GameState.set(State.menu);
});
}
}

View File

@@ -25,8 +25,8 @@ public class Smelter extends Block{
protected Item fuel;
protected Item result;
protected float craftTime = 15f; //time to craft one item, so max 4 items per second by default
protected float burnDuration = 45f; //by default, the fuel will burn 45 frames, so that's 4 items/fuel at most
protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default
protected float burnDuration = 50f; //by default, the fuel will burn 45 frames, so that's 2.5 items/fuel at most
protected Effect craftEffect = Fx.smelt, burnEffect = Fx.fuelburn;
protected int capacity = 20;