1package com.fs.starfarer.api.impl.codex;
3import java.util.ArrayList;
4import java.util.LinkedHashSet;
8import com.fs.starfarer.api.ModSpecAPI;
9import com.fs.starfarer.api.campaign.CustomUIPanelPlugin;
10import com.fs.starfarer.api.impl.campaign.ids.Tags;
11import com.fs.starfarer.api.loading.WithSourceMod;
12import com.fs.starfarer.api.ui.CustomPanelAPI;
13import com.fs.starfarer.api.ui.TagDisplayAPI;
14import com.fs.starfarer.api.ui.TooltipMakerAPI;
15import com.fs.starfarer.api.ui.UIPanelAPI;
16import com.fs.starfarer.api.util.Misc;
26 protected List<CodexEntryPlugin>
children =
new ArrayList<>();
28 protected Set<String>
related =
new LinkedHashSet<>();
32 protected Set<String>
tags =
new LinkedHashSet<>();
103 if (entry ==
null)
return;
160 Set<CodexEntryPlugin> result =
new LinkedHashSet<>();
163 if (entry !=
null && entry !=
this) {
172 if (entry ==
null || entry.
getId().equals(
getId()))
return;
179 if (
id ==
null)
return;
185 if (entry ==
null)
return;
216 List<CodexEntryPlugin> result =
new ArrayList<>();
222 if (includeCategories || !curr.
isCategory()) {
260 boolean found =
false;
262 if (rel.isVisible()) {
275 boolean found =
false;
277 if (!rel.isLocked()) {
310 if (
tags ==
null)
return true;
322 if (
tags ==
null)
return false;
361 return tags.contains(tag);
static boolean codexFullyUnlocked()
static CodexEntryPlugin getEntry(String id)
void addChild(CodexEntryPlugin entry)
void setParent(CodexEntryPlugin parent)
float getCategorySortTierForRelatedEntries()
ModSpecAPI getSourceMod()
CustomUIPanelPlugin getCustomPanelPlugin()
List< CodexEntryPlugin > children
boolean isRetainOrderOfChildren()
void setIcon(String icon)
boolean areAnyRelatedEntriesUnlocked()
boolean retainOrderOfRelatedEntries
boolean checkTagsWhenLocked()
List< CodexEntryPlugin > getChildrenRecursive(boolean includeCategories)
void setCategorySortTierForRelatedEntries(float categorySortTierForRelatedEntries)
void setRetainOrderOfRelatedEntries(boolean retainOrderOfRelatedEntries)
void setRetainOrderOfChildren(boolean retainOrderOfChildren)
void setParam(Object param)
boolean areAnyRelatedEntriesVisible()
void setParam2(Object param2)
void configureTagDisplay(TagDisplayAPI tags)
void removeRelatedEntry(CodexEntryPlugin entry)
void destroyCustomDetail()
void createCustomDetail(CustomPanelAPI panel, UIPanelAPI relatedEntries, CodexDialogAPI codex)
float categorySortTierForRelatedEntries
boolean retainOrderOfChildren
void addRelatedEntry(CodexEntryPlugin entry)
CodexEntryV2(String id, String title, String icon, Object param)
void createTitleForList(TooltipMakerAPI info, float width, ListMode mode)
boolean hasCustomDetailPanel()
Set< String > getRelatedEntryIds()
CodexEntryV2(String id, String title, String icon)
void findChildren(CodexEntryPlugin curr, List< CodexEntryPlugin > result, boolean includeCategories)
boolean isUnlockedIfRequiresUnlock()
boolean isRetainOrderOfRelatedEntries()
boolean isVisibleStandard(Set< String > tags, boolean thingUnlocked)
void addRelatedEntry(String id)
void removeRelatedEntry(String id)
CodexEntryPlugin getParent()
Set< CodexEntryPlugin > getRelatedEntries()
boolean isLockedStandard(Set< String > tags, boolean thingUnlocked)
List< CodexEntryPlugin > getChildren()
Set< String > getUnlockRelatedTags()
boolean matchesTags(Set< String > tags)
boolean hasTag(String tag)
static Color getBasePlayerColor()
List< CodexEntryPlugin > getChildren()
void setParent(CodexEntryPlugin parent)