Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken 2023-09-29 21:25:20 -04:00
commit 46ed5e05bb
5 changed files with 17 additions and 9 deletions

View file

@ -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 ObjectiveMarker>> allMarkerTypes = new Seq<>();
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!
@ -87,7 +87,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
Class<? extends ObjectiveMarker> type = prov.get().getClass();
String name = type.getSimpleName().replace("Marker", "");
allMarkerTypeNanes.add(Strings.camelize(name));
allMarkerTypeNames.add(Strings.camelize(name));
markerNameToType.put(name, prov);
markerNameToType.put(Strings.camelize(name), prov);
JsonIO.classTag(Strings.camelize(name), type);
@ -707,6 +707,9 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
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);
}
@ -898,7 +901,8 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
@Override
public void draw(){
if(hidden) return;
// font size cannot be 0
if(hidden || Math.abs(fontSize) < 1e-5) return;
if(fetchedText == null){
fetchedText = fetchText(text);

View file

@ -113,7 +113,7 @@ public class Placement{
}
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
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){
if(isSidePlace(plans)) return;
if(isSidePlace(plans) || plans.size == 0) return;
//check for orthogonal placement + unlocked state
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){

View file

@ -144,7 +144,7 @@ public abstract class LStatement{
if(p instanceof Enum e){
tooltip(c, e);
}
}).checked(current == p).group(group));
}).checked(current.equals(p)).group(group));
if(++i % cols == 0) t.row();
}

View file

@ -1982,7 +1982,7 @@ public class LStatements{
@RegisterStatement("makemarker")
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
public void build(Table table){
@ -1991,7 +1991,7 @@ public class LStatements{
table.button(b -> {
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;
build(table);
}, 2, cell -> cell.size(160, 50)));

View file

@ -1,4 +1,8 @@
[
{
"name": "meiqiuMDT",
"address": ["43.248.103.156:11023"]
},
{
"name": "CMS",
"address": ["195.2.84.144"]
@ -242,6 +246,6 @@
},
{
"name": "XuwenHost",
"address": ["106.14.14.210:6567"]
"address": ["v7.mindustru.lol:6567", "pi.xiyuchao.love:5500","mdt.xuwenblock.cn:6567"]
}
]