Various bugfixes
This commit is contained in:
@@ -464,7 +464,7 @@ mech.delta-mech.description = A fast, lightly-armored mech made for hit-and-run
|
|||||||
mech.tau-mech.name = Tau
|
mech.tau-mech.name = Tau
|
||||||
mech.tau-mech.weapon = Restruct Laser
|
mech.tau-mech.weapon = Restruct Laser
|
||||||
mech.tau-mech.ability = Repair Burst
|
mech.tau-mech.ability = Repair Burst
|
||||||
mech.tau-mech.description = The support mech. Heals allied blocks by shooting at them. Can extinguish fires and heal allies in a radius with its repair ability.
|
mech.tau-mech.description = The support mech. Heals allied blocks by shooting at them. Can heal allies in a radius with its repair ability.
|
||||||
mech.omega-mech.name = Omega
|
mech.omega-mech.name = Omega
|
||||||
mech.omega-mech.weapon = Swarm Missiles
|
mech.omega-mech.weapon = Swarm Missiles
|
||||||
mech.omega-mech.ability = Armored Configuration
|
mech.omega-mech.ability = Armored Configuration
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
arc = new PowerTurret("arc"){{
|
arc = new PowerTurret("arc"){{
|
||||||
shootType = AmmoTypes.arc;
|
shootType = AmmoTypes.arc;
|
||||||
reload = 75f;
|
reload = 85f;
|
||||||
shootShake = 1f;
|
shootShake = 1f;
|
||||||
shootCone = 40f;
|
shootCone = 40f;
|
||||||
rotatespeed = 8f;
|
rotatespeed = 8f;
|
||||||
@@ -121,7 +121,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
swarmer = new BurstTurret("swarmer"){{
|
swarmer = new BurstTurret("swarmer"){{
|
||||||
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
|
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
|
||||||
reload = 5f;
|
reload = 50f;
|
||||||
shots = 4;
|
shots = 4;
|
||||||
burstSpacing = 5;
|
burstSpacing = 5;
|
||||||
inaccuracy = 10f;
|
inaccuracy = 10f;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import io.anuke.mindustry.core.GameState.State;
|
|||||||
import io.anuke.mindustry.entities.Player;
|
import io.anuke.mindustry.entities.Player;
|
||||||
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
||||||
import io.anuke.mindustry.entities.traits.SyncTrait;
|
import io.anuke.mindustry.entities.traits.SyncTrait;
|
||||||
|
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.game.Version;
|
import io.anuke.mindustry.game.Version;
|
||||||
import io.anuke.mindustry.gen.Call;
|
import io.anuke.mindustry.gen.Call;
|
||||||
@@ -24,6 +25,7 @@ import io.anuke.mindustry.net.*;
|
|||||||
import io.anuke.mindustry.net.Administration.PlayerInfo;
|
import io.anuke.mindustry.net.Administration.PlayerInfo;
|
||||||
import io.anuke.mindustry.net.Packets.*;
|
import io.anuke.mindustry.net.Packets.*;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
|
import io.anuke.ucore.core.Events;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.entities.Entities;
|
import io.anuke.ucore.entities.Entities;
|
||||||
import io.anuke.ucore.entities.EntityGroup;
|
import io.anuke.ucore.entities.EntityGroup;
|
||||||
@@ -76,6 +78,9 @@ public class NetServer extends Module{
|
|||||||
private DataOutputStream dataStream = new DataOutputStream(syncStream);
|
private DataOutputStream dataStream = new DataOutputStream(syncStream);
|
||||||
|
|
||||||
public NetServer(){
|
public NetServer(){
|
||||||
|
Events.on(WorldLoadEvent.class, event -> {
|
||||||
|
connections.clear();
|
||||||
|
});
|
||||||
|
|
||||||
Net.handleServer(Connect.class, (id, connect) -> {
|
Net.handleServer(Connect.class, (id, connect) -> {
|
||||||
if(admins.isIPBanned(connect.addressTCP)){
|
if(admins.isIPBanned(connect.addressTCP)){
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import static io.anuke.mindustry.Vars.ui;
|
|||||||
public enum EditorTool{
|
public enum EditorTool{
|
||||||
pick{
|
pick{
|
||||||
public void touched(MapEditor editor, int x, int y){
|
public void touched(MapEditor editor, int x, int y){
|
||||||
|
if(!Structs.inBounds(x, y, editor.getMap().width(), editor.getMap().height())) return;
|
||||||
|
|
||||||
byte bf = editor.getMap().read(x, y, DataPosition.floor);
|
byte bf = editor.getMap().read(x, y, DataPosition.floor);
|
||||||
byte bw = editor.getMap().read(x, y, DataPosition.wall);
|
byte bw = editor.getMap().read(x, y, DataPosition.wall);
|
||||||
byte link = editor.getMap().read(x, y, DataPosition.link);
|
byte link = editor.getMap().read(x, y, DataPosition.link);
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
player.clearBuilding();
|
player.clearBuilding();
|
||||||
mode = none;
|
mode = none;
|
||||||
recipe = null;
|
recipe = null;
|
||||||
}).visible(() -> player.isBuilding() || recipe != null);
|
}).visible(() -> player.isBuilding() || recipe != null || mode == breaking);
|
||||||
|
|
||||||
//confirm button
|
//confirm button
|
||||||
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
||||||
|
|||||||
@@ -172,6 +172,25 @@ public class WorldGenerator{
|
|||||||
|
|
||||||
prepareTiles(tiles);
|
prepareTiles(tiles);
|
||||||
|
|
||||||
|
for(int x = 0; x < width; x++){
|
||||||
|
for(int y = 0; y < height; y++){
|
||||||
|
Tile tile = tiles[x][y];
|
||||||
|
|
||||||
|
byte elevation = tile.getElevation();
|
||||||
|
|
||||||
|
for(GridPoint2 point : Geometry.d4){
|
||||||
|
if(!Structs.inBounds(x + point.x, y + point.y, width, height)) continue;
|
||||||
|
if(tiles[x + point.x][y + point.y].getElevation() < elevation){
|
||||||
|
|
||||||
|
if(sim2.octaveNoise2D(1, 1, 1.0 / 8, x, y) > 0.8){
|
||||||
|
tile.setElevation(-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
world.setBlock(tiles[spawns.get(0).x][spawns.get(0).y], StorageBlocks.core, Team.blue);
|
world.setBlock(tiles[spawns.get(0).x][spawns.get(0).y], StorageBlocks.core, Team.blue);
|
||||||
|
|
||||||
if(state.mode.isPvp){
|
if(state.mode.isPvp){
|
||||||
|
|||||||
@@ -356,12 +356,13 @@ public class Net{
|
|||||||
Gdx.net.sendHttpRequest(req, new HttpResponseListener(){
|
Gdx.net.sendHttpRequest(req, new HttpResponseListener(){
|
||||||
@Override
|
@Override
|
||||||
public void handleHttpResponse(HttpResponse httpResponse){
|
public void handleHttpResponse(HttpResponse httpResponse){
|
||||||
listener.accept(httpResponse.getResultAsString());
|
String result = httpResponse.getResultAsString();
|
||||||
|
Gdx.app.postRunnable(() -> listener.accept(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void failed(Throwable t){
|
public void failed(Throwable t){
|
||||||
failure.accept(t);
|
Gdx.app.postRunnable(() -> failure.accept(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public class Block extends BaseBlock {
|
|||||||
TileEntity entity = tile.entity();
|
TileEntity entity = tile.entity();
|
||||||
|
|
||||||
for(Tile other : getPowerConnections(tile, tempTiles)){
|
for(Tile other : getPowerConnections(tile, tempTiles)){
|
||||||
if(other.entity.power != null){
|
if(other.entity.power != null && other.entity.power.graph != null){
|
||||||
other.entity.power.graph.add(entity.power.graph);
|
other.entity.power.graph.add(entity.power.graph);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,8 +95,11 @@ public class MendProjector extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawSelect(Tile tile){
|
public void drawSelect(Tile tile){
|
||||||
|
MendEntity entity = tile.entity();
|
||||||
|
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||||
|
|
||||||
Draw.color(color);
|
Draw.color(color);
|
||||||
Lines.dashCircle(tile.drawx(), tile.drawy() - 1f, range);
|
Lines.dashCircle(tile.drawx(), tile.drawy(), realRange);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class OverdriveProjector extends Block{
|
|||||||
protected float speedBoost = 1.5f;
|
protected float speedBoost = 1.5f;
|
||||||
protected float speedBoostPhase = 0.75f;
|
protected float speedBoostPhase = 0.75f;
|
||||||
protected float useTime = 400f;
|
protected float useTime = 400f;
|
||||||
|
protected float phaseRangeBoost = 20f;
|
||||||
|
|
||||||
public OverdriveProjector(String name){
|
public OverdriveProjector(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -66,7 +67,7 @@ public class OverdriveProjector extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(entity.charge >= reload){
|
if(entity.charge >= reload){
|
||||||
float realRange = range + entity.phaseHeat * 20f;
|
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||||
float realBoost = speedBoost + entity.phaseHeat*speedBoostPhase;
|
float realBoost = speedBoost + entity.phaseHeat*speedBoostPhase;
|
||||||
|
|
||||||
Effects.effect(BlockFx.overdriveWave, Hue.mix(color, phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange);
|
Effects.effect(BlockFx.overdriveWave, Hue.mix(color, phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange);
|
||||||
@@ -97,8 +98,11 @@ public class OverdriveProjector extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawSelect(Tile tile){
|
public void drawSelect(Tile tile){
|
||||||
|
OverdriveEntity entity = tile.entity();
|
||||||
|
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||||
|
|
||||||
Draw.color(color);
|
Draw.color(color);
|
||||||
Lines.dashCircle(tile.drawx(), tile.drawy() - 1f, range);
|
Lines.dashCircle(tile.drawx(), tile.drawy(), realRange);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user