c l e a n u p

This commit is contained in:
Anuken
2020-02-05 18:28:19 -05:00
75 changed files with 2583 additions and 2600 deletions

View File

@@ -67,13 +67,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
//methods to override
@Remote(called = Loc.server, unreliable = true)
public static <T extends Posc & Itemsc> void transferItemEffect(Item item, float x, float y, T to){
public static void transferItemEffect(Item item, float x, float y, Itemsc to){
if(to == null) return;
createItemTransfer(item, x, y, to, null);
}
@Remote(called = Loc.server, unreliable = true)
public static <T extends Posc & Itemsc> void transferItemToUnit(Item item, float x, float y, T to){
public static void transferItemToUnit(Item item, float x, float y, Itemsc to){
if(to == null) return;
createItemTransfer(item, x, y, to, () -> to.addItem(item));
}

View File

@@ -97,7 +97,7 @@ public class Placement{
int nodeLimit = 1000;
int totalNodes = 0;
PriorityQueue<Tile> queue = new PriorityQueue<>(10, (a, b) -> Float.compare(costs.get(a.pos(), 0f) + distanceHeuristic(a.x, a.y, end.x, end.y), costs.get(b.pos(), 0f) + distanceHeuristic(b.x(), b.y(), end.x, end.y)));
PriorityQueue<Tile> queue = new PriorityQueue<>(10, (a, b) -> Float.compare(costs.get(a.pos(), 0f) + distanceHeuristic(a.x, a.y, end.x, end.y), costs.get(b.pos(), 0f) + distanceHeuristic(b.x, b.y, end.x, end.y)));
queue.add(start);
boolean found = false;
while(!queue.isEmpty() && totalNodes++ < nodeLimit){