Less messy respawning / Standard starter mech / Bugfixes

This commit is contained in:
Anuken
2019-04-28 10:34:53 -04:00
parent ad13c83f93
commit 4c17b56e28
25 changed files with 2310 additions and 2352 deletions

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View File

@@ -482,6 +482,7 @@ keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause
keybind.minimap.name = Minimap
keybind.dash.name = Dash keybind.dash.name = Dash
keybind.chat.name = Chat keybind.chat.name = Chat
keybind.player_list.name = Player list keybind.player_list.name = Player list
@@ -733,7 +734,7 @@ block.pneumatic-drill.name = Pneumatic Drill
block.laser-drill.name = Laser Drill block.laser-drill.name = Laser Drill
block.water-extractor.name = Water Extractor block.water-extractor.name = Water Extractor
block.cultivator.name = Cultivator block.cultivator.name = Cultivator
block.alpha-dart-mech-pad.name = Alpha-Dart Mech Pad block.dart-mech-pad.name = Dart Mech Pad
block.delta-mech-pad.name = Delta Mech Pad block.delta-mech-pad.name = Delta Mech Pad
block.javelin-ship-pad.name = Javelin Ship Pad block.javelin-ship-pad.name = Javelin Ship Pad
block.trident-ship-pad.name = Trident Ship Pad block.trident-ship-pad.name = Trident Ship Pad

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 338 KiB

View File

@@ -77,7 +77,7 @@ public class Blocks implements ContentList{
fortressFactory, repairPoint, fortressFactory, repairPoint,
//upgrades //upgrades
alphaDartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad; dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad;
@Override @Override
public void load(){ public void load(){
@@ -1647,9 +1647,9 @@ public class Blocks implements ContentList{
//endregion //endregion
//region upgrades //region upgrades
alphaDartPad = new MechPad("alpha-dart-mech-pad"){{ dartPad = new MechPad("dart-mech-pad"){{
requirements(Category.upgrade, ItemStack.with(Items.lead, 200, Items.graphite, 100, Items.copper, 150)); requirements(Category.upgrade, ItemStack.with(Items.lead, 200, Items.graphite, 100, Items.copper, 150));
mech = Mechs.alpha; mech = Mechs.dart;
size = 2; size = 2;
consumes.powerBuffered(50f); consumes.powerBuffered(50f);
}}; }};

View File

@@ -730,7 +730,7 @@ public class Bullets implements ContentList{
explode = new BombBulletType(2f, 3f, "clear"){ explode = new BombBulletType(2f, 3f, "clear"){
{ {
hitEffect = Fx.pulverize; hitEffect = Fx.pulverize;
lifetime = 23f; lifetime = 30f;
speed = 1f; speed = 1f;
splashDamageRadius = 50f; splashDamageRadius = 50f;
splashDamage = 28f; splashDamage = 28f;

View File

@@ -20,8 +20,7 @@ import io.anuke.mindustry.type.Weapon;
public class Mechs implements ContentList{ public class Mechs implements ContentList{
public static Mech alpha, delta, tau, omega, dart, javelin, trident, glaive; public static Mech alpha, delta, tau, omega, dart, javelin, trident, glaive;
/** These are not new mechs, just re-assignments for convenience. */ public static Mech starter;
public static Mech starterDesktop, starterMobile;
@Override @Override
public void load(){ public void load(){
@@ -33,7 +32,7 @@ public class Mechs implements ContentList{
mineSpeed = 1.5f; mineSpeed = 1.5f;
mass = 1.2f; mass = 1.2f;
speed = 0.5f; speed = 0.5f;
boostSpeed = 0.85f; boostSpeed = 0.95f;
buildPower = 1.2f; buildPower = 1.2f;
engineColor = Color.valueOf("ffd37f"); engineColor = Color.valueOf("ffd37f");
health = 300f; health = 300f;
@@ -225,7 +224,7 @@ public class Mechs implements ContentList{
{ {
drillPower = 1; drillPower = 1;
mineSpeed = 0.9f; mineSpeed = 0.9f;
speed = 0.4f; speed = 0.45f;
drag = 0.1f; drag = 0.1f;
health = 180f; health = 180f;
weaponOffsetX = -1; weaponOffsetX = -1;
@@ -366,7 +365,6 @@ public class Mechs implements ContentList{
} }
}; };
starterDesktop = alpha; starter = alpha;
starterMobile = dart;
} }
} }

View File

@@ -250,7 +250,7 @@ public class TechTree implements ContentList{
node(phantomFactory); node(phantomFactory);
}); });
node(alphaDartPad, () -> { node(dartPad, () -> {
node(deltaPad, () -> { node(deltaPad, () -> {
node(javelinPad, () -> { node(javelinPad, () -> {

View File

@@ -9,7 +9,6 @@ import io.anuke.arc.input.KeyCode;
import io.anuke.arc.scene.ui.Dialog; import io.anuke.arc.scene.ui.Dialog;
import io.anuke.arc.scene.ui.TextField; import io.anuke.arc.scene.ui.TextField;
import io.anuke.arc.util.*; import io.anuke.arc.util.*;
import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.entities.Effects; import io.anuke.mindustry.entities.Effects;
import io.anuke.mindustry.entities.type.Player; import io.anuke.mindustry.entities.type.Player;
@@ -172,7 +171,6 @@ public class Control implements ApplicationListener{
void createPlayer(){ void createPlayer(){
player = new Player(); player = new Player();
player.name = Core.settings.getString("name"); player.name = Core.settings.getString("name");
player.mech = mobile ? Mechs.starterMobile : Mechs.starterDesktop;
player.color.set(Core.settings.getInt("color-0")); player.color.set(Core.settings.getInt("color-0"));
player.isLocal = true; player.isLocal = true;
player.isMobile = mobile; player.isMobile = mobile;

View File

@@ -4,7 +4,8 @@ import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote; import io.anuke.annotations.Annotations.Remote;
import io.anuke.arc.ApplicationListener; import io.anuke.arc.ApplicationListener;
import io.anuke.arc.Events; import io.anuke.arc.Events;
import io.anuke.arc.collection.*; import io.anuke.arc.collection.IntMap;
import io.anuke.arc.collection.ObjectSet;
import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.Colors; import io.anuke.arc.graphics.Colors;
import io.anuke.arc.math.Mathf; import io.anuke.arc.math.Mathf;
@@ -14,7 +15,6 @@ import io.anuke.arc.util.*;
import io.anuke.arc.util.io.ByteBufferOutput; import io.anuke.arc.util.io.ByteBufferOutput;
import io.anuke.arc.util.io.CountableByteArrayOutputStream; import io.anuke.arc.util.io.CountableByteArrayOutputStream;
import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Blocks;
import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.entities.Entities; import io.anuke.mindustry.entities.Entities;
import io.anuke.mindustry.entities.EntityGroup; import io.anuke.mindustry.entities.EntityGroup;
@@ -33,7 +33,6 @@ import io.anuke.mindustry.net.Packets.*;
import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.Tile;
import java.io.*; import java.io.*;
import java.lang.StringBuilder;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.zip.DeflaterOutputStream; import java.util.zip.DeflaterOutputStream;
@@ -161,7 +160,6 @@ public class NetServer implements ApplicationListener{
player.name = packet.name; player.name = packet.name;
player.uuid = uuid; player.uuid = uuid;
player.isMobile = packet.mobile; player.isMobile = packet.mobile;
player.mech = packet.mobile ? Mechs.starterMobile : Mechs.starterDesktop;
player.dead = true; player.dead = true;
player.setNet(player.x, player.y); player.setNet(player.x, player.y);
player.color.set(packet.color); player.color.set(packet.color);

View File

@@ -52,7 +52,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
public float boostHeat, shootHeat, destructTime; public float boostHeat, shootHeat, destructTime;
public boolean achievedFlight; public boolean achievedFlight;
public Color color = new Color(); public Color color = new Color();
public Mech mech; public Mech mech = Mechs.starter;
public SpawnerTrait spawner, lastSpawner; public SpawnerTrait spawner, lastSpawner;
public int respawns; public int respawns;
@@ -82,7 +82,6 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
player.dead = true; player.dead = true;
player.placeQueue.clear(); player.placeQueue.clear();
player.onDeath(); player.onDeath();
player.mech = (player.isMobile ? Mechs.starterMobile : Mechs.starterDesktop);
} }
@Override @Override
@@ -102,11 +101,18 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
@Override @Override
public void onRespawn(Tile tile){ public void onRespawn(Tile tile){
velocity.setZero();
boostHeat = 1f; boostHeat = 1f;
achievedFlight = true; achievedFlight = true;
if(state.rules.limitedRespawns){ rotation = 90f;
respawns--; baseRotation = 90f;
} dead = false;
spawner = null;
respawns --;
setNet(tile.drawx(), tile.drawy());
clearItem();
heal();
} }
@Override @Override
@@ -118,12 +124,6 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
} }
} }
@Override
public boolean collidesGrid(int x, int y){
Tile tile = world.tile(x, y);
return !isFlying() || (!mech.flying && tile != null && !tile.block().synthetic() && tile.block().solid);
}
@Override @Override
public float drag(){ public float drag(){
return mech.drag; return mech.drag;
@@ -519,7 +519,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
if(isDead()){ if(isDead()){
isBoosting = false; isBoosting = false;
boostHeat = 0f; boostHeat = 0f;
if(respawns!=0){ if(respawns > 0 || !state.rules.limitedRespawns){
updateRespawning(); updateRespawning();
} }
return; return;
@@ -780,15 +780,11 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
spawner = lastSpawner = null; spawner = lastSpawner = null;
health = maxHealth(); health = maxHealth();
boostHeat = drownTime = hitTime = 0f; boostHeat = drownTime = hitTime = 0f;
mech = getStarterMech(); mech = Mechs.starter;
placeQueue.clear(); placeQueue.clear();
respawns = state.rules.respawns; respawns = state.rules.respawns;
} }
public Mech getStarterMech(){
return (isMobile ? Mechs.starterMobile : Mechs.starterDesktop);
}
public boolean isShooting(){ public boolean isShooting(){
return isShooting && (!isBoosting || mech.flying); return isShooting && (!isBoosting || mech.flying);
} }
@@ -812,17 +808,13 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
this.spawner = spawner; this.spawner = spawner;
this.lastSpawner = spawner; this.lastSpawner = spawner;
this.dead = true; this.dead = true;
} setNet(spawner.getX(), spawner.getY());
public void endRespawning(){
spawner = null;
} }
//endregion //endregion
//region read and write methods //region read and write methods
@Override @Override
public boolean isClipped(){ public boolean isClipped(){
return false; return false;

View File

@@ -22,6 +22,7 @@ public enum Binding implements KeyBind{
zoom(new Axis(KeyCode.SCROLL)), zoom(new Axis(KeyCode.SCROLL)),
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE), menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
pause(KeyCode.SPACE), pause(KeyCode.SPACE),
minimap(KeyCode.M),
toggle_menus(KeyCode.C), toggle_menus(KeyCode.C),
screenshot(KeyCode.P), screenshot(KeyCode.P),
player_list(KeyCode.TAB, "multiplayer"), player_list(KeyCode.TAB, "multiplayer"),

View File

@@ -130,6 +130,14 @@ public class DesktopInput extends InputHandler{
player.isShooting = false; player.isShooting = false;
} }
if(!state.is(State.menu) && Core.input.keyTap(Binding.minimap)){
if(!ui.minimap.isShown()){
ui.minimap.show();
}else{
ui.minimap.hide();
}
}
if(state.is(State.menu) || Core.scene.hasDialog()) return; if(state.is(State.menu) || Core.scene.hasDialog()) return;
//zoom and rotate things //zoom and rotate things

View File

@@ -734,9 +734,11 @@ public class MobileInput extends InputHandler implements GestureListener{
if(player.isDead()) return; if(player.isDead()) return;
Vector2 v = Core.camera.position; Vector2 v = Core.camera.position;
//change to 1/2 to clamp to viewport
float scaling = 1f;
v.x = clerp(v.x, player.x - Core.camera.width/2f, player.x + Core.camera.width/2f); v.x = clerp(v.x, player.x - Core.camera.width*scaling, player.x + Core.camera.width*scaling);
v.y = clerp(v.y, player.y - Core.camera.height/2f, player.y + Core.camera.height/2f); v.y = clerp(v.y, player.y - Core.camera.height*scaling, player.y + Core.camera.height*scaling);
} }
float clerp(float value, float min, float max){ float clerp(float value, float min, float max){

View File

@@ -8,8 +8,8 @@ import io.anuke.arc.scene.event.InputEvent;
import io.anuke.arc.scene.event.InputListener; import io.anuke.arc.scene.event.InputListener;
import io.anuke.arc.scene.ui.layout.Unit; import io.anuke.arc.scene.ui.layout.Unit;
import static io.anuke.mindustry.Vars.mobile; import static io.anuke.mindustry.Vars.*;
import static io.anuke.mindustry.Vars.renderer; import static io.anuke.mindustry.Vars.world;
public class MinimapDialog extends FloatingDialog{ public class MinimapDialog extends FloatingDialog{
@@ -54,7 +54,8 @@ public class MinimapDialog extends FloatingDialog{
@Override @Override
public void touchDragged(InputEvent event, float x, float y, int pointer){ public void touchDragged(InputEvent event, float x, float y, int pointer){
if(mobile){ if(mobile){
renderer.minimap.zoomBy(Core.input.deltaY(pointer) / 30f / Unit.dp.scl(1f)); float max = Math.min(world.width(), world.height()) / 16f / 2f;
renderer.minimap.setZoom(1f + y / cont.getHeight() * (max - 1f));
} }
} }
}); });

View File

@@ -40,15 +40,15 @@ public class PlacementFragment extends Fragment{
//TODO make this configurable //TODO make this configurable
final KeyCode[] inputGrid = { final KeyCode[] inputGrid = {
KeyCode.NUM_1, KeyCode.NUM_2, KeyCode.NUM_3, KeyCode.NUM_4, KeyCode.NUM_1, KeyCode.NUM_2, KeyCode.NUM_3, KeyCode.NUM_4,
KeyCode.Q, KeyCode.W, KeyCode.E, KeyCode.R, KeyCode.Q, KeyCode.W, KeyCode.E, KeyCode.R,
KeyCode.A, KeyCode.S, KeyCode.D, KeyCode.F, KeyCode.A, KeyCode.S, KeyCode.D, KeyCode.F,
KeyCode.Z, KeyCode.X, KeyCode.C, KeyCode.V KeyCode.Z, KeyCode.X, KeyCode.C, KeyCode.V
}, inputCatGrid = { }, inputCatGrid = {
KeyCode.NUM_1, KeyCode.NUM_2, KeyCode.NUM_1, KeyCode.NUM_2,
KeyCode.Q, KeyCode.W, KeyCode.Q, KeyCode.W,
KeyCode.A, KeyCode.S, KeyCode.A, KeyCode.S,
KeyCode.Z, KeyCode.X, KeyCode.C, KeyCode.V KeyCode.Z, KeyCode.X, KeyCode.C, KeyCode.V
}; };
public PlacementFragment(){ public PlacementFragment(){

View File

@@ -45,7 +45,7 @@ public class PowerNode extends PowerBlock{
@Remote(targets = Loc.both, called = Loc.server, forward = true) @Remote(targets = Loc.both, called = Loc.server, forward = true)
public static void linkPowerNodes(Player player, Tile tile, Tile other){ public static void linkPowerNodes(Player player, Tile tile, Tile other){
if(tile.entity.power == null || !((PowerNode)tile.block()).linkValid(tile, other) if(tile.entity == null || other == null || tile.entity.power == null || !((PowerNode)tile.block()).linkValid(tile, other)
|| tile.entity.power.links.size >= ((PowerNode)tile.block()).maxNodes) return; || tile.entity.power.links.size >= ((PowerNode)tile.block()).maxNodes) return;
TileEntity entity = tile.entity(); TileEntity entity = tile.entity();

View File

@@ -8,6 +8,7 @@ import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.Mathf; import io.anuke.arc.math.Mathf;
import io.anuke.mindustry.Vars; import io.anuke.mindustry.Vars;
import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.content.Fx;
import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.entities.Effects; import io.anuke.mindustry.entities.Effects;
import io.anuke.mindustry.entities.traits.SpawnerTrait; import io.anuke.mindustry.entities.traits.SpawnerTrait;
import io.anuke.mindustry.entities.type.*; import io.anuke.mindustry.entities.type.*;
@@ -43,14 +44,8 @@ public class CoreBlock extends StorageBlock{
entity.progress = 0; entity.progress = 0;
entity.currentUnit = player; entity.currentUnit = player;
entity.currentUnit.onRespawn(tile); entity.currentUnit.onRespawn(tile);
entity.currentUnit.heal();
entity.currentUnit.rotation = 90f;
entity.currentUnit.applyImpulse(0, 8f); entity.currentUnit.applyImpulse(0, 8f);
entity.currentUnit.setNet(tile.drawx(), tile.drawy());
entity.currentUnit.add();
entity.currentUnit = null; entity.currentUnit = null;
player.endRespawning();
} }
@Override @Override
@@ -124,10 +119,10 @@ public class CoreBlock extends StorageBlock{
Draw.color(Pal.accent); Draw.color(Pal.accent);
Lines.lineAngleCenter( Lines.lineAngleCenter(
tile.drawx() + Mathf.sin(entity.time, 6f, Vars.tilesize / 3f * size), tile.drawx() + Mathf.sin(entity.time, 6f, Vars.tilesize / 3f * size),
tile.drawy(), tile.drawy(),
90, 90,
size * Vars.tilesize / 2f); size * Vars.tilesize / 2f);
Draw.reset(); Draw.reset();
} }
@@ -148,6 +143,7 @@ public class CoreBlock extends StorageBlock{
return; return;
} }
entity.currentUnit.set(tile.drawx(), tile.drawy());
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f); entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
entity.time += entity.delta(); entity.time += entity.delta();
entity.progress += 1f / state.rules.respawnTime * entity.delta(); entity.progress += 1f / state.rules.respawnTime * entity.delta();
@@ -176,8 +172,8 @@ public class CoreBlock extends StorageBlock{
if(!netServer.isWaitingForPlayers() && currentUnit == null){ if(!netServer.isWaitingForPlayers() && currentUnit == null){
currentUnit = player; currentUnit = player;
progress = 0f; progress = 0f;
player.mech = player.getStarterMech(); player.mech = Mechs.starter;
player.set(tile.drawx(), tile.drawy()); player.beginRespawning(this);
} }
} }
} }

View File

@@ -9,7 +9,6 @@ import io.anuke.arc.math.geom.Geometry;
import io.anuke.arc.util.Time; import io.anuke.arc.util.Time;
import io.anuke.mindustry.Vars; import io.anuke.mindustry.Vars;
import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.content.Fx;
import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.entities.Effects; import io.anuke.mindustry.entities.Effects;
import io.anuke.mindustry.entities.traits.SpawnerTrait; import io.anuke.mindustry.entities.traits.SpawnerTrait;
import io.anuke.mindustry.entities.type.Player; import io.anuke.mindustry.entities.type.Player;
@@ -33,8 +32,6 @@ public class MechPad extends Block{
protected float buildTime = 60 * 5; protected float buildTime = 60 * 5;
protected float requiredSatisfaction = 0.999f; protected float requiredSatisfaction = 0.999f;
protected TextureRegion openRegion;
public MechPad(String name){ public MechPad(String name){
super(name); super(name);
update = true; update = true;
@@ -49,11 +46,6 @@ public class MechPad extends Block{
stats.add(BlockStat.productionTime, buildTime / 60f, StatUnit.seconds); stats.add(BlockStat.productionTime, buildTime / 60f, StatUnit.seconds);
} }
@Override
public void init(){
super.init();
}
@Override @Override
public boolean shouldConsume(Tile tile){ public boolean shouldConsume(Tile tile){
return false; return false;
@@ -81,25 +73,10 @@ public class MechPad extends Block{
Effects.effect(Fx.spawn, entity); Effects.effect(Fx.spawn, entity);
if(entity.player == null) return; if(entity.player == null) return;
entity.player.mech = ((MechPad)tile.block()).mech;
Mech result = ((MechPad)tile.block()).mech;
if(entity.player.mech == result){
Mech target = (entity.player.isMobile ? Mechs.starterMobile : Mechs.starterDesktop);
if(entity.player.mech == target){
entity.player.mech = (entity.player.isMobile ? Mechs.starterDesktop : Mechs.starterMobile);
}else{
entity.player.mech = target;
}
}else{
entity.player.mech = result;
}
entity.progress = 0; entity.progress = 0;
entity.player.heal(); entity.player.onRespawn(tile);
entity.player.endRespawning();
entity.player.setDead(false);
entity.player.clearItem();
entity.player = null; entity.player = null;
} }
@@ -131,12 +108,6 @@ public class MechPad extends Block{
} }
} }
@Override
public void load(){
super.load();
openRegion = Core.atlas.find(name + "-open");
}
@Override @Override
public void draw(Tile tile){ public void draw(Tile tile){
MechFactoryEntity entity = tile.entity(); MechFactoryEntity entity = tile.entity();
@@ -146,10 +117,6 @@ public class MechPad extends Block{
if(entity.player != null){ if(entity.player != null){
TextureRegion region = mech.iconRegion; TextureRegion region = mech.iconRegion;
if(entity.player.mech == mech){
region = (entity.player.mech == Mechs.starterDesktop ? Mechs.starterMobile : Mechs.starterDesktop).iconRegion;
}
Shaders.build.region = region; Shaders.build.region = region;
Shaders.build.progress = entity.progress; Shaders.build.progress = entity.progress;
Shaders.build.time = -entity.time / 5f; Shaders.build.time = -entity.time / 5f;
@@ -176,6 +143,7 @@ public class MechPad extends Block{
MechFactoryEntity entity = tile.entity(); MechFactoryEntity entity = tile.entity();
if(entity.player != null){ if(entity.player != null){
entity.player.set(tile.drawx(), tile.drawy());
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f); entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
entity.progress += 1f / buildTime * entity.delta(); entity.progress += 1f / buildTime * entity.delta();
@@ -206,9 +174,6 @@ public class MechPad extends Block{
progress = 0f; progress = 0f;
player = unit; player = unit;
player.rotation = 90f;
player.baseRotation = 90f;
player.setNet(x, y);
player.beginRespawning(this); player.beginRespawning(this);
} }
} }

View File

@@ -1,7 +1,6 @@
package io.anuke.mindustry.desktop; package io.anuke.mindustry.desktop;
import io.anuke.arc.ApplicationListener; import io.anuke.arc.*;
import io.anuke.arc.Settings;
import io.anuke.arc.backends.lwjgl3.Lwjgl3Application; import io.anuke.arc.backends.lwjgl3.Lwjgl3Application;
import io.anuke.arc.backends.lwjgl3.Lwjgl3ApplicationConfiguration; import io.anuke.arc.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import io.anuke.arc.files.FileHandle; import io.anuke.arc.files.FileHandle;
@@ -10,8 +9,7 @@ import io.anuke.mindustry.Mindustry;
import io.anuke.mindustry.Vars; import io.anuke.mindustry.Vars;
import io.anuke.mindustry.core.Platform; import io.anuke.mindustry.core.Platform;
import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.ArcNetClient; import io.anuke.mindustry.net.*;
import io.anuke.mindustry.net.ArcNetServer;
public class DesktopLauncher extends Lwjgl3Application{ public class DesktopLauncher extends Lwjgl3Application{