Better json mod warning logging

This commit is contained in:
Anuken 2022-05-05 22:31:27 -04:00
parent f7175540f8
commit a7f84e8690
4 changed files with 11 additions and 5 deletions

View File

@ -844,7 +844,7 @@ public class ContentParser{
FieldMetadata metadata = fields.get(child.name().replace(" ", "_")); FieldMetadata metadata = fields.get(child.name().replace(" ", "_"));
if(metadata == null){ if(metadata == null){
if(ignoreUnknownFields){ if(ignoreUnknownFields){
Log.warn("@: Ignoring unknown field: " + child.name + " (" + type.getName() + ")", object); Log.warn("[@]: Ignoring unknown field: @ (@)", currentContent.minfo.sourceFile.name(), child.name, type.getSimpleName());
continue; continue;
}else{ }else{
SerializationException ex = new SerializationException("Field not found: " + child.name + " (" + type.getName() + ")"); SerializationException ex = new SerializationException("Field not found: " + child.name + " (" + type.getName() + ")");

View File

@ -246,9 +246,9 @@ public class ModsDialog extends BaseDialog{
text.add("[accent]" + Strings.stripColors(item.meta.displayName()) + "\n" + text.add("[accent]" + Strings.stripColors(item.meta.displayName()) + "\n" +
(shortDesc.length() > 0 ? "[lightgray]" + shortDesc + "\n" : "") (shortDesc.length() > 0 ? "[lightgray]" + shortDesc + "\n" : "")
+ "[gray]v" + Strings.stripColors(trimText(item.meta.version)) //so does anybody care about version?
+ (item.enabled() || hideDisabled ? "" : "\n" + Core.bundle.get("mod.disabled") + "")) //+ "[gray]v" + Strings.stripColors(trimText(item.meta.version)) + "\n"
+ (item.enabled() || hideDisabled ? "" : Core.bundle.get("mod.disabled") + ""))
.wrap().top().width(300f).growX().left(); .wrap().top().width(300f).growX().left();
text.row(); text.row();

View File

@ -61,6 +61,12 @@ public class DuctRouter extends Block{
Draw.rect(topRegion, plan.drawx(), plan.drawy(), plan.rotation * 90); Draw.rect(topRegion, plan.drawx(), plan.drawy(), plan.rotation * 90);
} }
@Override
public int minimapColor(Tile tile){
var build = (DuctRouterBuild)tile.build;
return build == null || build.sortItem == null ? 0 : build.sortItem.color.rgba();
}
@Override @Override
public boolean rotatedOutput(int x, int y){ public boolean rotatedOutput(int x, int y){
return false; return false;

View File

@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works #used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
archash=de2c33931c archash=9f57abe6d4