Bugfixes
This commit is contained in:
@@ -4,6 +4,5 @@
|
|||||||
flattenPaths: true,
|
flattenPaths: true,
|
||||||
maxWidth: 4096,
|
maxWidth: 4096,
|
||||||
maxHeight: 4096,
|
maxHeight: 4096,
|
||||||
minHeight: 2048,
|
|
||||||
fast: true
|
fast: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ public class RepairAI extends AIController{
|
|||||||
boolean shoot = false;
|
boolean shoot = false;
|
||||||
|
|
||||||
if(target != null){
|
if(target != null){
|
||||||
if(!target.within(unit, unit.type().range)){
|
if(!target.within(unit, unit.type().range * 0.8f)){
|
||||||
moveTo(target, unit.type().range * 0.9f);
|
moveTo(target, unit.type().range * 0.8f);
|
||||||
}else{
|
}else{
|
||||||
unit.aim(target);
|
unit.aim(target);
|
||||||
shoot = true;
|
shoot = true;
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
duneWall = new StaticWall("dune-wall"){{
|
duneWall = new StaticWall("dune-wall"){{
|
||||||
variants = 2;
|
variants = 2;
|
||||||
basalt.asFloor().wall = this;
|
basalt.asFloor().wall = darksandWater.asFloor().wall = darksandTaintedWater.asFloor().wall = this;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
sandWall = new StaticWall("sand-wall"){{
|
sandWall = new StaticWall("sand-wall"){{
|
||||||
@@ -1645,7 +1645,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
spectre = new ItemTurret("spectre"){{
|
spectre = new ItemTurret("spectre"){{
|
||||||
requirements(Category.turret, with(Items.copper, 350, Items.graphite, 300, Items.surgealloy, 250, Items.plastanium, 175, Items.thorium, 250));
|
requirements(Category.turret, with(Items.copper, 900, Items.graphite, 300, Items.surgealloy, 250, Items.plastanium, 175, Items.thorium, 250));
|
||||||
ammo(
|
ammo(
|
||||||
Items.graphite, Bullets.standardDenseBig,
|
Items.graphite, Bullets.standardDenseBig,
|
||||||
Items.pyratite, Bullets.standardIncendiaryBig,
|
Items.pyratite, Bullets.standardIncendiaryBig,
|
||||||
@@ -1671,7 +1671,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
meltdown = new LaserTurret("meltdown"){{
|
meltdown = new LaserTurret("meltdown"){{
|
||||||
requirements(Category.turret, with(Items.copper, 250, Items.lead, 350, Items.graphite, 300, Items.surgealloy, 325, Items.silicon, 325));
|
requirements(Category.turret, with(Items.copper, 1200, Items.lead, 350, Items.graphite, 300, Items.surgealloy, 325, Items.silicon, 325));
|
||||||
shootEffect = Fx.shootBigSmoke2;
|
shootEffect = Fx.shootBigSmoke2;
|
||||||
shootCone = 40f;
|
shootCone = 40f;
|
||||||
recoilAmount = 4f;
|
recoilAmount = 4f;
|
||||||
|
|||||||
@@ -33,11 +33,17 @@ public class World{
|
|||||||
public @NonNull Tiles tiles = new Tiles(0, 0);
|
public @NonNull Tiles tiles = new Tiles(0, 0);
|
||||||
|
|
||||||
private boolean generating, invalidMap;
|
private boolean generating, invalidMap;
|
||||||
|
private ObjectMap<Map, Runnable> customMapLoaders = new ObjectMap<>();
|
||||||
|
|
||||||
public World(){
|
public World(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Adds a custom handler function for loading a custom map - usually a generated one. */
|
||||||
|
public void addMapLoader(Map map, Runnable loader){
|
||||||
|
customMapLoaders.put(map, loader);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isInvalidMap(){
|
public boolean isInvalidMap(){
|
||||||
return invalidMap;
|
return invalidMap;
|
||||||
}
|
}
|
||||||
@@ -270,6 +276,12 @@ public class World{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadMap(Map map, Rules checkRules){
|
public void loadMap(Map map, Rules checkRules){
|
||||||
|
//load using custom loader if possible
|
||||||
|
if(customMapLoaders.containsKey(map)){
|
||||||
|
customMapLoaders.get(map).run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
SaveIO.load(map.file, new FilterContext(map));
|
SaveIO.load(map.file, new FilterContext(map));
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.editor;
|
|||||||
|
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.ArcAnnotate.*;
|
||||||
import arc.util.*;
|
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.editor.DrawOperation.*;
|
import mindustry.editor.DrawOperation.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
@@ -47,6 +46,11 @@ public class EditorTile extends Tile{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if(this.block == type && (build == null || build.rotation == rotation)){
|
||||||
|
// ui.editor.editor.renderer().updatePoint(x, y);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
if(rotation != 0) op(OpType.rotation, (byte)rotation);
|
if(rotation != 0) op(OpType.rotation, (byte)rotation);
|
||||||
if(team() != Team.derelict) op(OpType.team, (byte)team().id);
|
if(team() != Team.derelict) op(OpType.team, (byte)team().id);
|
||||||
op(OpType.block, block.id);
|
op(OpType.block, block.id);
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class Map implements Comparable<Map>, Publishable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String tag(String name){
|
public String tag(String name){
|
||||||
return tags.containsKey(name) && !tags.get(name).trim().isEmpty() ? tags.get(name) : Core.bundle.get("unknown");
|
return tags.containsKey(name) && !tags.get(name).trim().isEmpty() ? tags.get(name) : Core.bundle.get("unknown", "unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasTag(String name){
|
public boolean hasTag(String name){
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public class Maps{
|
|||||||
|
|
||||||
/** @return the next map to shuffle to. May be null, in which case the server should be stopped. */
|
/** @return the next map to shuffle to. May be null, in which case the server should be stopped. */
|
||||||
public @Nullable Map getNextMap(Gamemode mode, @Nullable Map previous){
|
public @Nullable Map getNextMap(Gamemode mode, @Nullable Map previous){
|
||||||
|
if(shuffler != null) return shuffler.next(mode, previous);
|
||||||
return shuffleMode.next(mode, previous);
|
return shuffleMode.next(mode, previous);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class ChatFragment extends Table{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return net.active();
|
return net.active() && ui.hudfrag.shown();
|
||||||
});
|
});
|
||||||
|
|
||||||
update(() -> {
|
update(() -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user