diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 5978f70ed8..7c61c90a96 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -101,6 +101,7 @@ coreattack = < Core is under attack! > nearpoint = [[ [scarlet]LEAVE DROP POINT IMMEDIATELY[] ]\nannihilation imminent database = Core Database database.button = Database +database.patched = Modified by data patches. viewfields = View Content Fields savegame = Save Game loadgame = Load Game diff --git a/core/src/mindustry/mod/DataPatcher.java b/core/src/mindustry/mod/DataPatcher.java index 302eaa320b..9cbaddd1fc 100644 --- a/core/src/mindustry/mod/DataPatcher.java +++ b/core/src/mindustry/mod/DataPatcher.java @@ -62,6 +62,10 @@ public class DataPatcher{ return cont; } + public boolean isPatched(Object object){ + return usedpatches.contains(object); + } + /** Applies the specified patches. If patches were already applied, the previous ones are un-applied - they do not stack! */ public void apply(Seq patchArray) throws Exception{ if(applied){ diff --git a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java index c32316d745..d5ade2118d 100644 --- a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java +++ b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java @@ -46,6 +46,15 @@ public class ContentInfoDialog extends BaseDialog{ table.row(); + if(state.isGame() && state.patcher.isPatched(content)){ + table.table(t -> { + t.image(Icon.info).color(Pal.lightishGray); + t.add("@database.patched").color(Pal.lightishGray).padLeft(4f); + }).pad(4f).left(); + + table.row(); + } + if(content.description != null){ var any = content.stats.toMap().size > 0; diff --git a/core/src/mindustry/ui/dialogs/DatabaseDialog.java b/core/src/mindustry/ui/dialogs/DatabaseDialog.java index f993d6b5ca..5f9489b5b5 100644 --- a/core/src/mindustry/ui/dialogs/DatabaseDialog.java +++ b/core/src/mindustry/ui/dialogs/DatabaseDialog.java @@ -179,6 +179,12 @@ public class DatabaseDialog extends BaseDialog{ setColor(Color.scarlet); touchable = Touchable.disabled; }}).size(8 * 4).pad(3); + }else if(state.isGame() && state.patcher.isPatched(unlock)){ + list.stack(image, new Table(){{ + right().bottom().touchable = Touchable.disabled; + // Interpolated color (lerp lightishGray and white) for better contrast + image(Icon.fileSmall).size(12f).color(Tmp.c1.set(Color.white).a(0.5f)); + }}).size(8 * 4).pad(3); }else{ list.add(image).size(8 * 4).pad(3); }