Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -32,7 +32,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
public static final Seq<Prov<? extends MapObjective>> allObjectiveTypes = new Seq<>();
|
public static final Seq<Prov<? extends MapObjective>> allObjectiveTypes = new Seq<>();
|
||||||
public static final Seq<Prov<? extends ObjectiveMarker>> allMarkerTypes = new Seq<>();
|
public static final Seq<Prov<? extends ObjectiveMarker>> allMarkerTypes = new Seq<>();
|
||||||
public static final ObjectMap<String, Prov<? extends ObjectiveMarker>> markerNameToType = new ObjectMap<>();
|
public static final ObjectMap<String, Prov<? extends ObjectiveMarker>> markerNameToType = new ObjectMap<>();
|
||||||
public static final Seq<String> allMarkerTypeNanes = new Seq<>();
|
public static final Seq<String> allMarkerTypeNames = new Seq<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All objectives the executor contains. Do not modify directly, ever!
|
* All objectives the executor contains. Do not modify directly, ever!
|
||||||
@@ -87,7 +87,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
|
|
||||||
Class<? extends ObjectiveMarker> type = prov.get().getClass();
|
Class<? extends ObjectiveMarker> type = prov.get().getClass();
|
||||||
String name = type.getSimpleName().replace("Marker", "");
|
String name = type.getSimpleName().replace("Marker", "");
|
||||||
allMarkerTypeNanes.add(Strings.camelize(name));
|
allMarkerTypeNames.add(Strings.camelize(name));
|
||||||
markerNameToType.put(name, prov);
|
markerNameToType.put(name, prov);
|
||||||
markerNameToType.put(Strings.camelize(name), prov);
|
markerNameToType.put(Strings.camelize(name), prov);
|
||||||
JsonIO.classTag(Strings.camelize(name), type);
|
JsonIO.classTag(Strings.camelize(name), type);
|
||||||
@@ -707,6 +707,9 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
fetchedText = fetchText(text);
|
fetchedText = fetchText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// font size cannot be 0
|
||||||
|
if(Math.abs(fontSize) < 1e-5) return;
|
||||||
|
|
||||||
WorldLabel.drawAt(fetchedText, pos.x, pos.y + radius + textHeight, Draw.z(), flags, fontSize);
|
WorldLabel.drawAt(fetchedText, pos.x, pos.y + radius + textHeight, Draw.z(), flags, fontSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -898,7 +901,8 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
if(hidden) return;
|
// font size cannot be 0
|
||||||
|
if(hidden || Math.abs(fontSize) < 1e-5) return;
|
||||||
|
|
||||||
if(fetchedText == null){
|
if(fetchedText == null){
|
||||||
fetchedText = fetchText(text);
|
fetchedText = fetchText(text);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class Placement{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void calculateBridges(Seq<BuildPlan> plans, ItemBridge bridge){
|
public static void calculateBridges(Seq<BuildPlan> plans, ItemBridge bridge){
|
||||||
if(isSidePlace(plans)) return;
|
if(isSidePlace(plans) || plans.size == 0) return;
|
||||||
|
|
||||||
//check for orthogonal placement + unlocked state
|
//check for orthogonal placement + unlocked state
|
||||||
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
||||||
@@ -176,7 +176,7 @@ public class Placement{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void calculateBridges(Seq<BuildPlan> plans, DirectionBridge bridge, boolean hasJunction, Boolf<Block> same){
|
public static void calculateBridges(Seq<BuildPlan> plans, DirectionBridge bridge, boolean hasJunction, Boolf<Block> same){
|
||||||
if(isSidePlace(plans)) return;
|
if(isSidePlace(plans) || plans.size == 0) return;
|
||||||
|
|
||||||
//check for orthogonal placement + unlocked state
|
//check for orthogonal placement + unlocked state
|
||||||
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public abstract class LStatement{
|
|||||||
if(p instanceof Enum e){
|
if(p instanceof Enum e){
|
||||||
tooltip(c, e);
|
tooltip(c, e);
|
||||||
}
|
}
|
||||||
}).checked(current == p).group(group));
|
}).checked(current.equals(p)).group(group));
|
||||||
|
|
||||||
if(++i % cols == 0) t.row();
|
if(++i % cols == 0) t.row();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1982,7 +1982,7 @@ public class LStatements{
|
|||||||
|
|
||||||
@RegisterStatement("makemarker")
|
@RegisterStatement("makemarker")
|
||||||
public static class MakeMarkerStatement extends LStatement{
|
public static class MakeMarkerStatement extends LStatement{
|
||||||
public String id = "0", type = "Shape", x = "0", y = "0";
|
public String id = "0", type = "shape", x = "0", y = "0";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(Table table){
|
public void build(Table table){
|
||||||
@@ -1991,7 +1991,7 @@ public class LStatements{
|
|||||||
table.button(b -> {
|
table.button(b -> {
|
||||||
b.label(() -> type);
|
b.label(() -> type);
|
||||||
|
|
||||||
b.clicked(() -> showSelect(b, MapObjectives.allMarkerTypeNanes.toArray(String.class), type, t -> {
|
b.clicked(() -> showSelect(b, MapObjectives.allMarkerTypeNames.toArray(String.class), type, t -> {
|
||||||
type = t;
|
type = t;
|
||||||
build(table);
|
build(table);
|
||||||
}, 2, cell -> cell.size(160, 50)));
|
}, 2, cell -> cell.size(160, 50)));
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "meiqiuMDT",
|
||||||
|
"address": ["43.248.103.156:11023"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "CMS",
|
"name": "CMS",
|
||||||
"address": ["195.2.84.144"]
|
"address": ["195.2.84.144"]
|
||||||
@@ -242,6 +246,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "XuwenHost",
|
"name": "XuwenHost",
|
||||||
"address": ["106.14.14.210:6567"]
|
"address": ["v7.mindustru.lol:6567", "pi.xiyuchao.love:5500","mdt.xuwenblock.cn:6567"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user