Various bugfixes
This commit is contained in:
@@ -106,7 +106,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
arc = new PowerTurret("arc"){{
|
||||
shootType = AmmoTypes.arc;
|
||||
reload = 75f;
|
||||
reload = 85f;
|
||||
shootShake = 1f;
|
||||
shootCone = 40f;
|
||||
rotatespeed = 8f;
|
||||
@@ -121,7 +121,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
swarmer = new BurstTurret("swarmer"){{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
|
||||
reload = 5f;
|
||||
reload = 50f;
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
||||
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.Version;
|
||||
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.Packets.*;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Events;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.entities.EntityGroup;
|
||||
@@ -76,6 +78,9 @@ public class NetServer extends Module{
|
||||
private DataOutputStream dataStream = new DataOutputStream(syncStream);
|
||||
|
||||
public NetServer(){
|
||||
Events.on(WorldLoadEvent.class, event -> {
|
||||
connections.clear();
|
||||
});
|
||||
|
||||
Net.handleServer(Connect.class, (id, connect) -> {
|
||||
if(admins.isIPBanned(connect.addressTCP)){
|
||||
|
||||
@@ -17,6 +17,8 @@ import static io.anuke.mindustry.Vars.ui;
|
||||
public enum EditorTool{
|
||||
pick{
|
||||
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 bw = editor.getMap().read(x, y, DataPosition.wall);
|
||||
byte link = editor.getMap().read(x, y, DataPosition.link);
|
||||
|
||||
@@ -230,7 +230,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
player.clearBuilding();
|
||||
mode = none;
|
||||
recipe = null;
|
||||
}).visible(() -> player.isBuilding() || recipe != null);
|
||||
}).visible(() -> player.isBuilding() || recipe != null || mode == breaking);
|
||||
|
||||
//confirm button
|
||||
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
||||
|
||||
@@ -172,6 +172,25 @@ public class WorldGenerator{
|
||||
|
||||
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);
|
||||
|
||||
if(state.mode.isPvp){
|
||||
|
||||
@@ -356,12 +356,13 @@ public class Net{
|
||||
Gdx.net.sendHttpRequest(req, new HttpResponseListener(){
|
||||
@Override
|
||||
public void handleHttpResponse(HttpResponse httpResponse){
|
||||
listener.accept(httpResponse.getResultAsString());
|
||||
String result = httpResponse.getResultAsString();
|
||||
Gdx.app.postRunnable(() -> listener.accept(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable t){
|
||||
failure.accept(t);
|
||||
Gdx.app.postRunnable(() -> failure.accept(t));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -153,7 +153,7 @@ public class Block extends BaseBlock {
|
||||
TileEntity entity = tile.entity();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,8 +95,11 @@ public class MendProjector extends Block{
|
||||
|
||||
@Override
|
||||
public void drawSelect(Tile tile){
|
||||
MendEntity entity = tile.entity();
|
||||
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||
|
||||
Draw.color(color);
|
||||
Lines.dashCircle(tile.drawx(), tile.drawy() - 1f, range);
|
||||
Lines.dashCircle(tile.drawx(), tile.drawy(), realRange);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ public class OverdriveProjector extends Block{
|
||||
protected float speedBoost = 1.5f;
|
||||
protected float speedBoostPhase = 0.75f;
|
||||
protected float useTime = 400f;
|
||||
protected float phaseRangeBoost = 20f;
|
||||
|
||||
public OverdriveProjector(String name){
|
||||
super(name);
|
||||
@@ -66,7 +67,7 @@ public class OverdriveProjector extends Block{
|
||||
}
|
||||
|
||||
if(entity.charge >= reload){
|
||||
float realRange = range + entity.phaseHeat * 20f;
|
||||
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||
float realBoost = speedBoost + entity.phaseHeat*speedBoostPhase;
|
||||
|
||||
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
|
||||
public void drawSelect(Tile tile){
|
||||
OverdriveEntity entity = tile.entity();
|
||||
float realRange = range + entity.phaseHeat * phaseRangeBoost;
|
||||
|
||||
Draw.color(color);
|
||||
Lines.dashCircle(tile.drawx(), tile.drawy() - 1f, range);
|
||||
Lines.dashCircle(tile.drawx(), tile.drawy(), realRange);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user