diff --git a/cockatrice/src/client/tabs/abstract_tab_deck_editor.h b/cockatrice/src/client/tabs/abstract_tab_deck_editor.h index 89219b013..796213d27 100644 --- a/cockatrice/src/client/tabs/abstract_tab_deck_editor.h +++ b/cockatrice/src/client/tabs/abstract_tab_deck_editor.h @@ -1,7 +1,7 @@ #ifndef TAB_GENERIC_DECK_EDITOR_H #define TAB_GENERIC_DECK_EDITOR_H -#include "../../game/cards/card_database.h" +#include "../../game/cards/card_info.h" #include "../menus/deck_editor/deck_editor_menu.h" #include "../ui/widgets/deck_editor/deck_editor_card_info_dock_widget.h" #include "../ui/widgets/deck_editor/deck_editor_database_display_widget.h" diff --git a/cockatrice/src/client/tabs/api/edhrec/tab_edhrec.h b/cockatrice/src/client/tabs/api/edhrec/tab_edhrec.h index c15f22b26..af8d0cd49 100644 --- a/cockatrice/src/client/tabs/api/edhrec/tab_edhrec.h +++ b/cockatrice/src/client/tabs/api/edhrec/tab_edhrec.h @@ -1,7 +1,7 @@ #ifndef TAB_EDHREC_H #define TAB_EDHREC_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../../../ui/widgets/general/layout_containers/flow_widget.h" #include "../../tab.h" #include "edhrec_commander_api_response_display_widget.h" diff --git a/cockatrice/src/client/tabs/tab_deck_editor.h b/cockatrice/src/client/tabs/tab_deck_editor.h index d9b10de7d..710689b8e 100644 --- a/cockatrice/src/client/tabs/tab_deck_editor.h +++ b/cockatrice/src/client/tabs/tab_deck_editor.h @@ -1,7 +1,7 @@ #ifndef WINDOW_DECKEDITOR_H #define WINDOW_DECKEDITOR_H -#include "../../game/cards/card_database.h" +#include "../../game/cards/card_info.h" #include "../game_logic/key_signals.h" #include "../ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.h" #include "abstract_tab_deck_editor.h" diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader.h b/cockatrice/src/client/ui/picture_loader/picture_loader.h index 68a9424e4..e2769f567 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader.h +++ b/cockatrice/src/client/ui/picture_loader/picture_loader.h @@ -1,7 +1,7 @@ #ifndef PICTURELOADER_H #define PICTURELOADER_H -#include "../../../game/cards/card_database.h" +#include "../../../game/cards/card_info.h" #include "picture_loader_worker.h" #include diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h index e85ede8f1..47d2cca5a 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h @@ -1,7 +1,7 @@ #ifndef PICTURE_LOADER_WORKER_H #define PICTURE_LOADER_WORKER_H -#include "../../../game/cards/card_database.h" +#include "../../../game/cards/card_info.h" #include "picture_to_load.h" #include diff --git a/cockatrice/src/client/ui/picture_loader/picture_to_load.h b/cockatrice/src/client/ui/picture_loader/picture_to_load.h index 96a114cd4..9d1a784f0 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_to_load.h +++ b/cockatrice/src/client/ui/picture_loader/picture_to_load.h @@ -1,7 +1,7 @@ #ifndef PICTURE_TO_LOAD_H #define PICTURE_TO_LOAD_H -#include "../../../game/cards/card_database.h" +#include "../../../game/cards/card_info.h" #include diff --git a/cockatrice/src/client/ui/widgets/cards/additional_info/color_identity_widget.h b/cockatrice/src/client/ui/widgets/cards/additional_info/color_identity_widget.h index 8518aa1a5..9b8fef71c 100644 --- a/cockatrice/src/client/ui/widgets/cards/additional_info/color_identity_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/additional_info/color_identity_widget.h @@ -1,7 +1,7 @@ #ifndef COLOR_IDENTITY_WIDGET_H #define COLOR_IDENTITY_WIDGET_H -#include "../../../../../game/cards/card_database.h" +#include "../../../../../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/client/ui/widgets/cards/additional_info/mana_cost_widget.h b/cockatrice/src/client/ui/widgets/cards/additional_info/mana_cost_widget.h index 0872183f3..c9ed221be 100644 --- a/cockatrice/src/client/ui/widgets/cards/additional_info/mana_cost_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/additional_info/mana_cost_widget.h @@ -1,7 +1,7 @@ #ifndef MANA_COST_WIDGET_H #define MANA_COST_WIDGET_H -#include "../../../../../game/cards/card_database.h" +#include "../../../../../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/client/ui/widgets/cards/card_group_display_widgets/card_group_display_widget.h b/cockatrice/src/client/ui/widgets/cards/card_group_display_widgets/card_group_display_widget.h index c470b7d83..079c5e3ea 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_group_display_widgets/card_group_display_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_group_display_widgets/card_group_display_widget.h @@ -2,7 +2,7 @@ #define CARD_GROUP_DISPLAY_WIDGET_H #include "../../../../../deck/deck_list_model.h" -#include "../../../../../game/cards/card_database.h" +#include "../../../../../game/cards/card_info.h" #include "../../general/display/banner_widget.h" #include "../card_info_picture_with_text_overlay_widget.h" #include "../card_size_widget.h" diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_display_widget.h b/cockatrice/src/client/ui/widgets/cards/card_info_display_widget.h index 46d42b2bc..29ad703e7 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_display_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_info_display_widget.h @@ -1,7 +1,7 @@ #ifndef CARDINFOWIDGET_H #define CARDINFOWIDGET_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.h b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.h index 2b6012f1f..40a3b454a 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.h @@ -1,7 +1,7 @@ #ifndef CARDFRAME_H #define CARDFRAME_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_picture_enlarged_widget.h b/cockatrice/src/client/ui/widgets/cards/card_info_picture_enlarged_widget.h index 73b0a9cc5..d65b0da69 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_picture_enlarged_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_info_picture_enlarged_widget.h @@ -1,7 +1,7 @@ #ifndef CARD_PICTURE_ENLARGED_WIDGET_H #define CARD_PICTURE_ENLARGED_WIDGET_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_picture_widget.h b/cockatrice/src/client/ui/widgets/cards/card_info_picture_widget.h index 89298de94..02b0fd8f5 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_picture_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_info_picture_widget.h @@ -1,7 +1,7 @@ #ifndef CARD_INFO_PICTURE_H #define CARD_INFO_PICTURE_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "card_info_picture_enlarged_widget.h" #include diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_text_widget.h b/cockatrice/src/client/ui/widgets/cards/card_info_text_widget.h index 17985021d..e066fdb34 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_text_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/card_info_text_widget.h @@ -1,7 +1,7 @@ #ifndef CARDINFOTEXT_H #define CARDINFOTEXT_H -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include class QLabel; diff --git a/cockatrice/src/client/ui/widgets/cards/deck_card_zone_display_widget.h b/cockatrice/src/client/ui/widgets/cards/deck_card_zone_display_widget.h index c946b9557..b80ca4332 100644 --- a/cockatrice/src/client/ui/widgets/cards/deck_card_zone_display_widget.h +++ b/cockatrice/src/client/ui/widgets/cards/deck_card_zone_display_widget.h @@ -2,7 +2,7 @@ #define DECK_CARD_ZONE_DISPLAY_WIDGET_H #include "../../../../deck/deck_list_model.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../general/display/banner_widget.h" #include "../general/layout_containers/overlap_widget.h" #include "card_info_picture_with_text_overlay_widget.h" diff --git a/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.h b/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.h index 0500b5fca..89899b4bf 100644 --- a/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.h +++ b/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.h @@ -2,7 +2,7 @@ #define DECK_EDITOR_DECK_DOCK_WIDGET_H #include "../../../../deck/custom_line_edit.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../../../game_logic/key_signals.h" #include "../../../tabs/abstract_tab_deck_editor.h" #include "../visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.h" diff --git a/cockatrice/src/client/ui/widgets/printing_selector/card_amount_widget.h b/cockatrice/src/client/ui/widgets/printing_selector/card_amount_widget.h index a051d2ea2..74d8793f0 100644 --- a/cockatrice/src/client/ui/widgets/printing_selector/card_amount_widget.h +++ b/cockatrice/src/client/ui/widgets/printing_selector/card_amount_widget.h @@ -3,7 +3,7 @@ #include "../../../../deck/deck_list_model.h" #include "../../../../deck/deck_loader.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../../../tabs/abstract_tab_deck_editor.h" #include "../general/display/dynamic_font_size_push_button.h" diff --git a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector.h b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector.h index ea2e69a5f..515807831 100644 --- a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector.h +++ b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector.h @@ -2,7 +2,7 @@ #define PRINTING_SELECTOR_H #include "../../../../deck/deck_list_model.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../cards/card_size_widget.h" #include "../general/layout_containers/flow_widget.h" #include "../quick_settings/settings_button_widget.h" diff --git a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_display_widget.h b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_display_widget.h index 32e1e925d..b6e4ee157 100644 --- a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_display_widget.h +++ b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_display_widget.h @@ -2,7 +2,7 @@ #define PRINTING_SELECTOR_CARD_DISPLAY_WIDGET_H #include "../../../../deck/deck_list_model.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../../../tabs/abstract_tab_deck_editor.h" #include "printing_selector_card_overlay_widget.h" #include "set_name_and_collectors_number_display_widget.h" diff --git a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_overlay_widget.h b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_overlay_widget.h index 5ab27a274..1741c91dc 100644 --- a/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_overlay_widget.h +++ b/cockatrice/src/client/ui/widgets/printing_selector/printing_selector_card_overlay_widget.h @@ -3,7 +3,7 @@ #include "../../../../client/ui/widgets/cards/card_info_picture_widget.h" #include "../../../../deck/deck_list_model.h" -#include "../../../../game/cards/card_database.h" +#include "../../../../game/cards/card_info.h" #include "../../../tabs/abstract_tab_deck_editor.h" #include "all_zones_card_amount_widget.h" #include "card_amount_widget.h" diff --git a/cockatrice/src/deck/deck_list_model.h b/cockatrice/src/deck/deck_list_model.h index 4595f6ad0..94b323e18 100644 --- a/cockatrice/src/deck/deck_list_model.h +++ b/cockatrice/src/deck/deck_list_model.h @@ -1,7 +1,7 @@ #ifndef DECKLISTMODEL_H #define DECKLISTMODEL_H -#include "../game/cards/card_database.h" +#include "../game/cards/card_info.h" #include "decklist.h" #include diff --git a/cockatrice/src/dialogs/dlg_edit_tokens.h b/cockatrice/src/dialogs/dlg_edit_tokens.h index e5befe892..a008010bd 100644 --- a/cockatrice/src/dialogs/dlg_edit_tokens.h +++ b/cockatrice/src/dialogs/dlg_edit_tokens.h @@ -1,7 +1,7 @@ #ifndef DLG_EDIT_TOKENS_H #define DLG_EDIT_TOKENS_H -#include "../game/cards/card_database.h" +#include "../game/cards/card_info.h" #include diff --git a/cockatrice/src/game/board/arrow_item.cpp b/cockatrice/src/game/board/arrow_item.cpp index 512d1ab72..2be8fbdd8 100644 --- a/cockatrice/src/game/board/arrow_item.cpp +++ b/cockatrice/src/game/board/arrow_item.cpp @@ -2,7 +2,7 @@ #include "arrow_item.h" #include "../../settings/cache_settings.h" -#include "../cards/card_database.h" +#include "../cards/card_info.h" #include "../cards/card_item.h" #include "../player/player.h" #include "../player/player_target.h" diff --git a/cockatrice/src/game/cards/abstract_card_item.h b/cockatrice/src/game/cards/abstract_card_item.h index 51b345267..48f890701 100644 --- a/cockatrice/src/game/cards/abstract_card_item.h +++ b/cockatrice/src/game/cards/abstract_card_item.h @@ -2,7 +2,7 @@ #define ABSTRACTCARDITEM_H #include "../board/arrow_target.h" -#include "card_database.h" +#include "card_info.h" class Player; diff --git a/cockatrice/src/game/cards/card_database.h b/cockatrice/src/game/cards/card_database.h index a4baaf0a5..2de5999ee 100644 --- a/cockatrice/src/game/cards/card_database.h +++ b/cockatrice/src/game/cards/card_database.h @@ -28,9 +28,6 @@ enum LoadStatus NoCards }; -typedef QHash CardNameMap; -typedef QHash SetNameMap; - class CardDatabase : public QObject { Q_OBJECT diff --git a/cockatrice/src/game/cards/card_database_parser/card_database_parser.h b/cockatrice/src/game/cards/card_database_parser/card_database_parser.h index 12da8efbb..b7ef36636 100644 --- a/cockatrice/src/game/cards/card_database_parser/card_database_parser.h +++ b/cockatrice/src/game/cards/card_database_parser/card_database_parser.h @@ -1,7 +1,7 @@ #ifndef CARDDATABASE_PARSER_H #define CARDDATABASE_PARSER_H -#include "../card_database.h" +#include "../card_info.h" #include #include diff --git a/cockatrice/src/game/cards/card_info.h b/cockatrice/src/game/cards/card_info.h index 9d06bc5f6..76397588f 100644 --- a/cockatrice/src/game/cards/card_info.h +++ b/cockatrice/src/game/cards/card_info.h @@ -25,6 +25,9 @@ typedef QSharedPointer CardInfoPtr; typedef QSharedPointer CardSetPtr; typedef QMap> CardInfoPerSetMap; +typedef QHash CardNameMap; +typedef QHash SetNameMap; + Q_DECLARE_METATYPE(CardInfoPtr) class CardSet : public QList diff --git a/cockatrice/src/game/cards/card_item.cpp b/cockatrice/src/game/cards/card_item.cpp index c088a4ed1..40fa8d119 100644 --- a/cockatrice/src/game/cards/card_item.cpp +++ b/cockatrice/src/game/cards/card_item.cpp @@ -8,8 +8,8 @@ #include "../zones/card_zone.h" #include "../zones/table_zone.h" #include "../zones/view_zone.h" -#include "card_database.h" #include "card_drag_item.h" +#include "card_info.h" #include "pb/serverinfo_card.pb.h" #include diff --git a/cockatrice/src/game/cards/card_list.cpp b/cockatrice/src/game/cards/card_list.cpp index 3a353ce3f..0eda14626 100644 --- a/cockatrice/src/game/cards/card_list.cpp +++ b/cockatrice/src/game/cards/card_list.cpp @@ -1,6 +1,6 @@ #include "card_list.h" -#include "card_database.h" +#include "card_info.h" #include "card_item.h" #include diff --git a/cockatrice/src/game/deckview/deck_view.cpp b/cockatrice/src/game/deckview/deck_view.cpp index 41c6ed45a..15a8adcac 100644 --- a/cockatrice/src/game/deckview/deck_view.cpp +++ b/cockatrice/src/game/deckview/deck_view.cpp @@ -1,7 +1,7 @@ #include "deck_view.h" #include "../../client/ui/theme_manager.h" -#include "../../game/cards/card_database.h" +#include "../../game/cards/card_info.h" #include "../../settings/cache_settings.h" #include "decklist.h" diff --git a/cockatrice/src/game/filters/filter_string.h b/cockatrice/src/game/filters/filter_string.h index a633a235b..b3877e54a 100644 --- a/cockatrice/src/game/filters/filter_string.h +++ b/cockatrice/src/game/filters/filter_string.h @@ -1,7 +1,7 @@ #ifndef FILTER_STRING_H #define FILTER_STRING_H -#include "../cards/card_database.h" +#include "../cards/card_info.h" #include "filter_tree.h" #include diff --git a/cockatrice/src/game/player/player.h b/cockatrice/src/game/player/player.h index e32798481..76365d50d 100644 --- a/cockatrice/src/game/player/player.h +++ b/cockatrice/src/game/player/player.h @@ -4,7 +4,7 @@ #include "../../client/tearoff_menu.h" #include "../../dialogs/dlg_create_token.h" #include "../board/abstract_graphics_item.h" -#include "../cards/card_database.h" +#include "../cards/card_info.h" #include "../filters/filter_string.h" #include "pb/card_attributes.pb.h" #include "pb/game_event.pb.h" diff --git a/cockatrice/src/game/zones/table_zone.cpp b/cockatrice/src/game/zones/table_zone.cpp index 71327b9ec..02a06ed2e 100644 --- a/cockatrice/src/game/zones/table_zone.cpp +++ b/cockatrice/src/game/zones/table_zone.cpp @@ -3,8 +3,8 @@ #include "../../client/ui/theme_manager.h" #include "../../settings/cache_settings.h" #include "../board/arrow_item.h" -#include "../cards/card_database.h" #include "../cards/card_drag_item.h" +#include "../cards/card_info.h" #include "../cards/card_item.h" #include "../player/player.h" #include "pb/command_move_card.pb.h" diff --git a/cockatrice/src/game/zones/view_zone.cpp b/cockatrice/src/game/zones/view_zone.cpp index 793f90918..9aec01db3 100644 --- a/cockatrice/src/game/zones/view_zone.cpp +++ b/cockatrice/src/game/zones/view_zone.cpp @@ -1,8 +1,8 @@ #include "view_zone.h" #include "../../server/pending_command.h" -#include "../cards/card_database.h" #include "../cards/card_drag_item.h" +#include "../cards/card_info.h" #include "../cards/card_item.h" #include "../player/player.h" #include "pb/command_dump_zone.pb.h" diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index 2122ccbd8..be720a34e 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -28,7 +28,6 @@ #include "client/ui/window_main.h" #include "dialogs/dlg_settings.h" #include "featureset.h" -#include "game/cards/card_database.h" #include "rng_sfmt.h" #include "settings/cache_settings.h" #include "utility/logger.h" diff --git a/cockatrice/src/utility/card_info_comparator.h b/cockatrice/src/utility/card_info_comparator.h index 012a50c2c..9402ed401 100644 --- a/cockatrice/src/utility/card_info_comparator.h +++ b/cockatrice/src/utility/card_info_comparator.h @@ -1,7 +1,7 @@ #ifndef CARD_INFO_COMPARATOR_H #define CARD_INFO_COMPARATOR_H -#include "../game/cards/card_database.h" +#include "../game/cards/card_info.h" #include #include diff --git a/cockatrice/src/utility/card_set_comparator.h b/cockatrice/src/utility/card_set_comparator.h index 107b618fb..ed4b3d5e1 100644 --- a/cockatrice/src/utility/card_set_comparator.h +++ b/cockatrice/src/utility/card_set_comparator.h @@ -1,7 +1,7 @@ #ifndef SET_PRIORITY_COMPARATOR_H #define SET_PRIORITY_COMPARATOR_H -#include "../game/cards/card_database.h" +#include "../game/cards/card_info.h" class SetPriorityComparator {