add card uid map

This commit is contained in:
GenevensiS
2026-05-04 02:21:33 +02:00
parent 9a5be16e4e
commit 8cc17abecc
9 changed files with 138 additions and 90 deletions
+14 -11
View File
@@ -45,21 +45,22 @@ public:
Set(const StyleSheetP& stylesheet);
~Set();
GameP game; ///< The game this set uses
StyleSheetP stylesheet; ///< The default stylesheet
GameP game; ///< The game this set uses
StyleSheetP stylesheet; ///< The default stylesheet
/// The values on the fields of the set
/** The indices should correspond to the set_fields in the Game */
IndexMap<FieldP, ValueP> data;
IndexMap<FieldP, ValueP> data;
/// Extra values for specific stylesheets, indexed by stylesheet name
DelayedIndexMaps<FieldP,ValueP> styling_data;
vector<CardP> cards; ///< The cards in the set
vector<KeywordP> keywords; ///< Additional keywords used in this set
vector<PackTypeP> pack_types; ///< Additional/replacement pack types
String apprentice_code; ///< Code to use for apprentice (magic only)
ActionStack actions; ///< Actions performed on this set and the cards in it
KeywordDatabase keyword_db; ///< Database for matching keywords, must be cleared when keywords change
VCSP vcs; ///< The version control system to use
vector<CardP> cards; ///< The cards in the set
unordered_map<String, CardP> card_uids; ///< The uids of the cards in the set
vector<KeywordP> keywords; ///< Additional keywords used in this set
vector<PackTypeP> pack_types; ///< Additional/replacement pack types
String apprentice_code; ///< Code to use for apprentice (magic only)
ActionStack actions; ///< Actions performed on this set and the cards in it
KeywordDatabase keyword_db; ///< Database for matching keywords, must be cleared when keywords change
VCSP vcs; ///< The version control system to use
/// A context for performing scripts
/** Should only be used from the main thread! */
@@ -71,6 +72,8 @@ public:
void updateStyles(const CardP& card, bool only_content_dependent);
/// Update scripts that were delayed
void updateDelayed();
/// Update uid map
void buildUidMap();
/// A context for performing scripts
/** Should only be used from the thumbnail thread! */
Context& getContextForThumbnails();