Added credits for each map to bundle (not displayed yet)

This commit is contained in:
Anuken
2026-01-16 19:51:19 -05:00
parent 4f9ea8b70d
commit 88acbbdc84
4 changed files with 52 additions and 16 deletions

View File

@@ -29,7 +29,7 @@ public abstract class UnlockableContent extends MappableContent{
/** Localized, formal name. Never null. Set to internal name if not found in bundle. */
public String localizedName;
/** Localized description & details. May be null. */
public @Nullable String description, details;
public @Nullable String description, details, credit;
/** Whether this content is always unlocked in the tech tree. */
public boolean alwaysUnlocked = false;
/** Whether to show the description in the research dialog preview. */
@@ -90,6 +90,7 @@ public abstract class UnlockableContent extends MappableContent{
this.localizedName = Core.bundle.get(getContentType() + "." + this.name + ".name", this.name);
this.description = Core.bundle.getOrNull(getContentType() + "." + this.name + ".description");
this.details = Core.bundle.getOrNull(getContentType() + "." + this.name + ".details");
this.credit = Core.bundle.getOrNull(getContentType() + "." + this.name + ".credit");
this.unlocked = Core.settings != null && Core.settings.getBool(this.name + "-unlocked", false);
}

View File

@@ -94,6 +94,7 @@ public class SectorSubmissions{
var preset = new SectorPreset("sector-" + planet.name + "-" + id, "hidden/" + id, planet, id);
if(preset.credit == null) preset.credit = author;
preset.requireUnlock = false;
if(difficulty > 0f) preset.difficulty = difficulty;

View File

@@ -109,7 +109,7 @@ public class ContentInfoDialog extends BaseDialog{
if(contentClass.isAnonymousClass()) contentClass = contentClass.getSuperclass();
Core.app.openURI("https://mindustrygame.github.io/wiki/Modding%20Classes/" + contentClass.getSimpleName());
}).margin(8f).pad(4f).padTop(8f).size(300f, 50f).row();
}).margin(8f).pad(4f).padTop(16f).size(300f, 50f).row();
}
content.displayExtra(table);