From 6ed9bc0ea63d4cb072659d5cb546b70d99c901cc Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 4 Feb 2025 15:44:57 -0500 Subject: [PATCH] Closes #8027 --- core/src/mindustry/ctype/UnlockableContent.java | 4 +++- core/src/mindustry/ui/dialogs/DatabaseDialog.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index c4ed0bf7081e..f8fdc2867964 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -32,8 +32,10 @@ public abstract class UnlockableContent extends MappableContent{ public boolean alwaysUnlocked = false; /** Whether to show the description in the research dialog preview. */ public boolean inlineDescription = true; - /** Whether details of blocks are hidden in custom games if they haven't been unlocked in campaign mode. */ + /** Whether details are hidden in custom games if this hasn't been unlocked in campaign mode. */ public boolean hideDetails = true; + /** Whether this is hidden from the Core Database. */ + public boolean hideDatabase = false; /** If false, all icon generation is disabled for this content; createIcons is not called. */ public boolean generateIcons = true; /** How big the content appears in certain selection menus */ diff --git a/core/src/mindustry/ui/dialogs/DatabaseDialog.java b/core/src/mindustry/ui/dialogs/DatabaseDialog.java index 81fbbf98958e..262afe96e6bd 100644 --- a/core/src/mindustry/ui/dialogs/DatabaseDialog.java +++ b/core/src/mindustry/ui/dialogs/DatabaseDialog.java @@ -101,7 +101,7 @@ void rebuild(){ ContentType type = ContentType.all[j]; Seq array = allContent[j] - .select(c -> c instanceof UnlockableContent u && !u.isHidden() && (tab == Planets.sun || u.allDatabaseTabs || u.databaseTabs.contains(tab)) && + .select(c -> c instanceof UnlockableContent u && !u.isHidden() && !u.hideDatabase && (tab == Planets.sun || u.allDatabaseTabs || u.databaseTabs.contains(tab)) && (text.isEmpty() || u.localizedName.toLowerCase().contains(text))).as(); if(array.size == 0) continue;