From 602647da0337e4a6e3b28f0d580a883a1a1bf9f3 Mon Sep 17 00:00:00 2001 From: Brambor Date: Thu, 11 Apr 2024 20:56:27 +0200 Subject: [PATCH 1/3] iwyu: run for src/ folder, A*-F* files skipped some files since they were complicated --- src/achievement.cpp | 5 +++ src/achievement.h | 6 ++-- src/active_item_cache.cpp | 2 ++ src/activity_actor.cpp | 37 +++++++++++++++++----- src/activity_actor.h | 4 +-- src/activity_handlers.cpp | 17 ++++++---- src/activity_handlers.h | 9 +++--- src/activity_item_handling.cpp | 24 +++++++++------ src/activity_tracker.cpp | 7 +++-- src/activity_tracker.h | 2 ++ src/activity_type.cpp | 5 +-- src/activity_type.h | 10 +++--- src/addiction.cpp | 13 ++++++-- src/addiction.h | 5 +-- src/advanced_inv.cpp | 10 +++++- src/advanced_inv.h | 12 +++++--- src/advanced_inv_area.cpp | 15 +++------ src/advanced_inv_area.h | 5 ++- src/advanced_inv_listitem.cpp | 1 + src/advanced_inv_listitem.h | 2 +- src/advanced_inv_pagination.cpp | 1 + src/advanced_inv_pane.cpp | 6 +++- src/advanced_inv_pane.h | 3 +- src/ammo.cpp | 5 +-- src/ammo.h | 4 +-- src/ammo_effect.cpp | 4 ++- src/ammo_effect.h | 5 ++- src/anatomy.cpp | 14 +++++---- src/anatomy.h | 8 +++-- src/animation.h | 1 + src/armor_layers.cpp | 17 +++++++++- src/ascii_art.cpp | 4 ++- src/ascii_art.h | 4 ++- src/assign.cpp | 8 +++++ src/assign.h | 20 ++++++------ src/auto_note.cpp | 8 +++++ src/auto_note.h | 10 ++++-- src/auto_pickup.cpp | 13 +++++++- src/auto_pickup.h | 6 ++-- src/avatar_action.cpp | 15 ++++----- src/avatar_action.h | 3 +- src/ballistics.cpp | 8 ++--- src/ballistics.h | 7 +++++ src/basecamp.cpp | 12 +++++--- src/basecamp.h | 17 ++++++++-- src/behavior.cpp | 7 +++-- src/behavior.h | 4 +-- src/behavior_oracle.h | 2 +- src/bionics.cpp | 22 ++++++++++--- src/bionics.h | 11 ++++--- src/bionics_ui.cpp | 19 ++++++++++-- src/bodygraph.cpp | 27 ++++++++++++++++ src/bodygraph.h | 10 ++++-- src/bodypart.cpp | 10 ++++-- src/bodypart.h | 16 +++++----- src/bonuses.cpp | 6 ++-- src/bonuses.h | 4 +-- src/butchery_requirements.cpp | 5 +-- src/butchery_requirements.h | 4 +-- src/calendar.cpp | 5 ++- src/calendar_ui.cpp | 8 +++++ src/calendar_ui.h | 2 +- src/cata_bitset.h | 4 ++- src/cata_imgui.h | 7 ++--- src/cata_utility.cpp | 21 ++++++++----- src/cata_variant.h | 4 +-- src/catacharset.cpp | 4 +-- src/catacharset.h | 3 +- src/cellular_automata.cpp | 3 ++ src/cellular_automata.h | 3 +- src/character.cpp | 18 ++++++++++- src/character.h | 38 ++++++++++++++--------- src/character_ammo.cpp | 19 +++++++++--- src/character_armor.cpp | 31 ++++++++++++++++++- src/character_attire.cpp | 39 +++++++++++++++++++++-- src/character_attire.h | 27 ++++++++++++++-- src/character_body.cpp | 39 +++++++++++++++++++++-- src/character_crafting.cpp | 1 + src/character_escape.cpp | 18 +++++++++++ src/character_guns.cpp | 23 ++++++++++++++ src/character_inventory.cpp | 37 ++++++++++++++++++++++ src/character_martial_arts.cpp | 6 ++++ src/character_martial_arts.h | 4 +-- src/character_modifier.cpp | 18 ++++++++++- src/character_modifier.h | 9 +++++- src/character_morale.cpp | 24 ++++++++++++++- src/character_oracle.cpp | 6 ++-- src/character_oracle.h | 2 +- src/character_proficiency.cpp | 13 ++++++++ src/city.cpp | 30 +++++++++--------- src/city.h | 11 +++---- src/climbing.cpp | 24 +++++++-------- src/climbing.h | 15 ++++----- src/clothing_mod.cpp | 6 ++-- src/clothing_mod.h | 6 ++-- src/clzones.cpp | 16 +++++++--- src/clzones.h | 11 +++---- src/color.cpp | 10 ++++-- src/color.h | 4 +-- src/compatibility.h | 1 + src/computer.cpp | 9 ++++-- src/computer.h | 5 +-- src/computer_session.cpp | 8 ++++- src/computer_session.h | 2 +- src/condition.cpp | 31 +++++++++++++++++-- src/condition.h | 13 ++++++-- src/construction.cpp | 10 +++++- src/construction.h | 5 +-- src/construction_category.cpp | 5 ++- src/construction_category.h | 6 ++-- src/construction_group.cpp | 5 ++- src/construction_group.h | 6 ++-- src/consumption.cpp | 22 +++++++++++-- src/contents_change_handler.cpp | 9 ++++++ src/contents_change_handler.h | 3 +- src/coordinates.cpp | 2 ++ src/coordinates.h | 15 ++++++--- src/craft_command.cpp | 15 ++++++++- src/craft_command.h | 8 +++-- src/crafting.cpp | 17 ++++++---- src/crafting_gui.cpp | 15 +++++++++ src/crafting_gui.h | 2 +- src/creature.cpp | 18 +++++++++-- src/creature.h | 48 +++++++++++++++-------------- src/creature_tracker.cpp | 8 ++++- src/creature_tracker.h | 9 +++--- src/damage.cpp | 12 ++++++-- src/damage.h | 11 ++++--- src/debug_menu.cpp | 30 +++++++++++++----- src/debug_menu.h | 7 ++--- src/dependency_tree.h | 2 +- src/descriptions.cpp | 3 ++ src/dialogue_chatbin.h | 2 +- src/dialogue_helpers.cpp | 2 ++ src/dialogue_helpers.h | 16 +++++++--- src/dialogue_win.h | 12 +++----- src/disease.cpp | 5 ++- src/disease.h | 5 +-- src/display.cpp | 34 +++++++++++++++++--- src/display.h | 23 +++++++++++--- src/distraction_manager.cpp | 2 ++ src/distribution.cpp | 8 +++-- src/distribution.h | 3 +- src/do_turn.cpp | 37 ++++++++++++++++++++++ src/drawing_primitives.cpp | 2 +- src/editmap.cpp | 10 ++++-- src/editmap.h | 3 +- src/effect.cpp | 13 ++++++-- src/effect.h | 18 ++++++----- src/effect_on_condition.cpp | 21 ++++++++++++- src/effect_on_condition.h | 25 ++++++++++----- src/effect_source.cpp | 3 +- src/effect_source.h | 2 +- src/emit.cpp | 3 +- src/event.cpp | 2 ++ src/event.h | 6 ++-- src/event_bus.cpp | 12 ++++++-- src/event_bus.h | 3 +- src/event_field_transformations.cpp | 5 +++ src/event_field_transformations.h | 2 +- src/event_statistics.cpp | 10 ++++-- src/event_statistics.h | 7 +++-- src/explosion.cpp | 12 +++++--- src/explosion.h | 4 +-- src/faction.cpp | 9 +++++- src/faction.h | 7 ++--- src/fault.cpp | 6 +++- src/fault.h | 8 ++--- src/field.h | 2 +- src/flag.cpp | 5 ++- src/flag.h | 5 +-- src/flexbuffer_cache.cpp | 20 ++++++------ 172 files changed, 1372 insertions(+), 474 deletions(-) diff --git a/src/achievement.cpp b/src/achievement.cpp index 6ba293b00f897..912e778ce7664 100644 --- a/src/achievement.cpp +++ b/src/achievement.cpp @@ -14,11 +14,16 @@ #include "enums.h" #include "event.h" #include "event_statistics.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" #include "json.h" +#include "json_error.h" #include "past_achievements_info.h" #include "stats_tracker.h" #include "string_formatter.h" +#include "translations.h" template struct enum_traits; diff --git a/src/achievement.h b/src/achievement.h index 5e8d25a3fb689..6beae2c14c94c 100644 --- a/src/achievement.h +++ b/src/achievement.h @@ -6,16 +6,18 @@ #include #include #include -#include #include +#include +#include #include #include +#include #include #include "calendar.h" #include "cata_variant.h" #include "event_subscriber.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/active_item_cache.cpp b/src/active_item_cache.cpp index cc58d7793b881..0d7d109d4ff5e 100644 --- a/src/active_item_cache.cpp +++ b/src/active_item_cache.cpp @@ -1,9 +1,11 @@ #include "active_item_cache.h" #include +#include #include #include "item.h" +#include "item_pocket.h" #include "safe_reference.h" float item_reference::spoil_multiplier() diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index a1d6dafd68c69..748b825540e26 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -6,34 +6,47 @@ #include #include #include +#include #include #include #include -#include #include +#include +#include #include +#include #include +#include #include #include #include "action.h" #include "activity_actor_definitions.h" -#include "activity_handlers.h" // put_into_vehicle_or_drop and drop_on_map +#include "activity_handlers.h" #include "advanced_inv.h" #include "avatar.h" #include "avatar_action.h" #include "bodypart.h" +#include "calendar.h" +#include "cata_assert.h" +#include "cata_utility.h" #include "character.h" -#include "coordinates.h" +#include "character_id.h" +#include "clzones.h" #include "contents_change_handler.h" +#include "coordinates.h" #include "craft_command.h" +#include "creature.h" #include "creature_tracker.h" #include "debug.h" #include "enums.h" #include "event.h" #include "event_bus.h" +#include "faction.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "game_inventory.h" @@ -42,17 +55,22 @@ #include "handle_liquid.h" #include "harvest.h" #include "iexamine.h" +#include "inventory.h" #include "item.h" -#include "item_group.h" +#include "item_components.h" +#include "item_contents.h" #include "item_location.h" #include "itype.h" +#include "iuse.h" #include "iuse_actor.h" #include "json.h" +#include "json_error.h" #include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" +#include "map_selector.h" #include "mapdata.h" -#include "memory_fast.h" #include "martialarts.h" #include "messages.h" #include "monster.h" @@ -64,6 +82,7 @@ #include "pickup.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "ranged.h" #include "recipe.h" @@ -72,19 +91,21 @@ #include "ret_val.h" #include "rng.h" #include "shearing.h" +#include "skill.h" #include "sounds.h" #include "string_formatter.h" -#include "skill.h" -#include "timed_event.h" +#include "translation.h" #include "translations.h" +#include "trap.h" #include "try_parse_integer.h" #include "ui.h" #include "uistate.h" #include "units.h" #include "value_ptr.h" +#include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" -#include "veh_type.h" +#include "vpart_range.h" static const activity_id ACT_AIM( "ACT_AIM" ); static const activity_id ACT_AUTODRIVE( "ACT_AUTODRIVE" ); diff --git a/src/activity_actor.h b/src/activity_actor.h index c060cfd21b867..a9b93ee4cb53c 100644 --- a/src/activity_actor.h +++ b/src/activity_actor.h @@ -2,19 +2,17 @@ #ifndef CATA_SRC_ACTIVITY_ACTOR_H #define CATA_SRC_ACTIVITY_ACTOR_H -#include #include +#include #include #include "activity_type.h" #include "clone_ptr.h" -#include "point.h" #include "type_id.h" class Character; class JsonOut; class JsonValue; -class monster; class player_activity; class activity_actor diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 1e38023246340..0381e3c158b58 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -13,9 +14,10 @@ #include #include #include +#include #include -#include "action.h" +#include "activity_actor.h" #include "activity_type.h" #include "advanced_inv.h" #include "avatar.h" @@ -26,6 +28,8 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "character_id.h" #include "character_martial_arts.h" #include "clzones.h" #include "colony.h" @@ -34,15 +38,15 @@ #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" -#include "damage.h" +#include "cuboid_rectangle.h" #include "debug.h" -#include "effect_source.h" #include "enums.h" #include "event.h" #include "event_bus.h" #include "fault.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "game_inventory.h" @@ -50,6 +54,7 @@ #include "harvest.h" #include "iexamine.h" #include "inventory.h" +#include "inventory_ui.h" #include "item.h" #include "item_factory.h" #include "item_location.h" @@ -62,10 +67,8 @@ #include "make_static.h" #include "map.h" #include "map_iterator.h" -#include "map_selector.h" #include "mapdata.h" #include "martialarts.h" -#include "memory_fast.h" #include "messages.h" #include "mongroup.h" #include "monster.h" @@ -80,7 +83,7 @@ #include "pocket_type.h" #include "point.h" #include "proficiency.h" -#include "ranged.h" +#include "recipe.h" #include "recipe_dictionary.h" #include "requirements.h" #include "ret_val.h" @@ -89,6 +92,7 @@ #include "sounds.h" #include "string_formatter.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui.h" @@ -97,6 +101,7 @@ #include "veh_interact.h" #include "vehicle.h" #include "vpart_position.h" +#include "weakpoint.h" #include "weather.h" enum class creature_size : int; diff --git a/src/activity_handlers.h b/src/activity_handlers.h index b463b9b2a9719..1d7d6f8aa00a4 100644 --- a/src/activity_handlers.h +++ b/src/activity_handlers.h @@ -2,23 +2,24 @@ #ifndef CATA_SRC_ACTIVITY_HANDLERS_H #define CATA_SRC_ACTIVITY_HANDLERS_H +#include #include #include #include -#include #include +#include #include #include #include "coordinates.h" -#include "item_location.h" -#include "type_id.h" #include "requirements.h" +#include "type_id.h" +#include "units_fwd.h" class Character; class item; +class item_location; class player_activity; -struct tripoint; template std::vector get_sorted_tiles_by_distance( const Point ¢er, const Container &tiles ) diff --git a/src/activity_item_handling.cpp b/src/activity_item_handling.cpp index abc53d671cd3b..09cdae753702e 100644 --- a/src/activity_item_handling.cpp +++ b/src/activity_item_handling.cpp @@ -2,31 +2,32 @@ #include #include -#include #include -#include #include #include #include #include #include #include -#include +#include #include #include +#include "activity_actor_definitions.h" #include "activity_type.h" #include "avatar.h" #include "calendar.h" +#include "cata_utility.h" #include "character.h" #include "clzones.h" #include "colony.h" #include "construction.h" -#include "contents_change_handler.h" +#include "craft_command.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" #include "enums.h" +#include "faction.h" #include "field.h" #include "field_type.h" #include "fire.h" @@ -36,11 +37,12 @@ #include "iexamine.h" #include "inventory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" #include "item_location.h" +#include "item_pocket.h" +#include "item_stack.h" #include "itype.h" -#include "iuse.h" -#include "line.h" -#include "make_static.h" #include "map.h" #include "map_iterator.h" #include "map_selector.h" @@ -52,7 +54,10 @@ #include "overmapbuffer.h" #include "pickup.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" +#include "recipe.h" +#include "recipe_dictionary.h" #include "requirements.h" #include "ret_val.h" #include "rng.h" @@ -65,10 +70,11 @@ #include "veh_type.h" #include "vehicle.h" #include "vehicle_selector.h" +#include "visitable.h" #include "vpart_position.h" #include "weather.h" -#include "recipe_dictionary.h" -#include "activity_actor_definitions.h" + +struct use_function; static const activity_id ACT_BUILD( "ACT_BUILD" ); static const activity_id ACT_BUTCHER_FULL( "ACT_BUTCHER_FULL" ); diff --git a/src/activity_tracker.cpp b/src/activity_tracker.cpp index 7d88548c903e5..473fbac3bf4ad 100644 --- a/src/activity_tracker.cpp +++ b/src/activity_tracker.cpp @@ -1,12 +1,15 @@ #include "activity_tracker.h" +#include +#include +#include +#include + #include "cata_assert.h" #include "game_constants.h" #include "options.h" #include "string_formatter.h" -#include - int activity_tracker::weariness() const { if( intake > tracker ) { diff --git a/src/activity_tracker.h b/src/activity_tracker.h index 6461f526e1a85..5c15c170b1366 100644 --- a/src/activity_tracker.h +++ b/src/activity_tracker.h @@ -2,6 +2,8 @@ #ifndef CATA_SRC_ACTIVITY_TRACKER_H #define CATA_SRC_ACTIVITY_TRACKER_H +#include + #include "calendar.h" class JsonObject; diff --git a/src/activity_type.cpp b/src/activity_type.cpp index 2a28d32e2dddc..86138c0e3d579 100644 --- a/src/activity_type.cpp +++ b/src/activity_type.cpp @@ -10,9 +10,10 @@ #include "activity_handlers.h" #include "assign.h" #include "debug.h" -#include "enum_conversions.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "json_error.h" #include "sounds.h" #include "string_formatter.h" #include "translations.h" diff --git a/src/activity_type.h b/src/activity_type.h index 7b3fcc9ef6e80..26fcd334708ea 100644 --- a/src/activity_type.h +++ b/src/activity_type.h @@ -2,17 +2,19 @@ #ifndef CATA_SRC_ACTIVITY_TYPE_H #define CATA_SRC_ACTIVITY_TYPE_H -#include +#include +#include +#include "enums.h" #include "game_constants.h" -#include "string_id.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" +class Character; class JsonObject; class activity_type; -class Character; class player_activity; +template struct enum_traits; using activity_id = string_id; diff --git a/src/addiction.cpp b/src/addiction.cpp index 01bee1eb6c37f..eea065ec3ef5e 100644 --- a/src/addiction.cpp +++ b/src/addiction.cpp @@ -1,21 +1,30 @@ #include "addiction.h" #include -#include +#include #include +#include +#include +#include #include #include #include "calendar.h" #include "character.h" +#include "creature.h" #include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" #include "enums.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" +#include "json_error.h" #include "morale_types.h" #include "rng.h" +#include "talker.h" #include "text_snippets.h" -#include "translations.h" static const efftype_id effect_hallu( "hallu" ); static const efftype_id effect_shakes( "shakes" ); diff --git a/src/addiction.h b/src/addiction.h index 6d02668b3ed0c..938f48c115e28 100644 --- a/src/addiction.h +++ b/src/addiction.h @@ -2,7 +2,9 @@ #ifndef CATA_SRC_ADDICTION_H #define CATA_SRC_ADDICTION_H -#include +#include +#include +#include #include "calendar.h" #include "translation.h" @@ -11,7 +13,6 @@ class Character; class JsonObject; class JsonOut; -class time_duration; struct add_type { private: diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp index ad7c7c70d311f..7df4aec7ba237 100644 --- a/src/advanced_inv.cpp +++ b/src/advanced_inv.cpp @@ -1,12 +1,18 @@ #include "advanced_inv.h" #include +#include +#include #include +#include #include +#include #include #include #include #include +#include +#include #include #include @@ -16,23 +22,25 @@ #include "advanced_inv_pagination.h" #include "auto_pickup.h" #include "avatar.h" -#include "cached_options.h" #include "calendar.h" #include "cata_assert.h" #include "cata_scope_helpers.h" #include "catacharset.h" #include "character.h" #include "color.h" +#include "coordinates.h" #include "debug.h" #include "enums.h" #include "game.h" #include "game_constants.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "inventory_ui.h" #include "item.h" #include "item_category.h" +#include "item_contents.h" #include "item_location.h" #include "localized_comparator.h" #include "map.h" diff --git a/src/advanced_inv.h b/src/advanced_inv.h index 76a10b6f72942..c6972d9920600 100644 --- a/src/advanced_inv.h +++ b/src/advanced_inv.h @@ -3,18 +3,20 @@ #define CATA_SRC_ADVANCED_INV_H #include -#include +#include +#include +#include -#include "activity_actor_definitions.h" #include "advanced_inv_area.h" #include "advanced_inv_pane.h" #include "cursesdef.h" -#include "string_input_popup.h" -#include "ui_manager.h" +class Character; class advanced_inv_listitem; +class drop_or_stash_item_info; class input_context; -class item; +class string_input_popup; +class ui_adaptor; struct advanced_inv_save_state; void create_advanced_inv(); diff --git a/src/advanced_inv_area.cpp b/src/advanced_inv_area.cpp index ce76a1c7c1395..c605031775dea 100644 --- a/src/advanced_inv_area.cpp +++ b/src/advanced_inv_area.cpp @@ -1,19 +1,15 @@ -#include -#include -#include -#include +#include "advanced_inv_area.h" + #include -#include #include #include #include #include -#include "advanced_inv_area.h" -#include "advanced_inv_listitem.h" #include "avatar.h" -#include "cata_assert.h" #include "character.h" +#include "character_attire.h" +#include "debug.h" #include "enums.h" #include "field.h" #include "field_type.h" @@ -21,8 +17,8 @@ #include "inventory.h" #include "item.h" #include "map.h" -#include "map_selector.h" #include "mapdata.h" +#include "mdarray.h" #include "pimpl.h" #include "translations.h" #include "trap.h" @@ -31,7 +27,6 @@ #include "units.h" #include "veh_type.h" #include "vehicle.h" -#include "vehicle_selector.h" #include "vpart_position.h" int advanced_inv_area::get_item_count() const diff --git a/src/advanced_inv_area.h b/src/advanced_inv_area.h index 025abed7957a0..ca3f5f980e7af 100644 --- a/src/advanced_inv_area.h +++ b/src/advanced_inv_area.h @@ -3,12 +3,12 @@ #define CATA_SRC_ADVANCED_INV_AREA_H #include -#include +#include #include #include "item_location.h" #include "point.h" -#include "units.h" // IWYU pragma: keep +#include "units.h" enum aim_location : char { AIM_INVENTORY = 0, @@ -32,7 +32,6 @@ enum aim_location : char { AIM_AROUND_END = AIM_NORTHEAST }; -class advanced_inv_listitem; class item; class vehicle; class vehicle_stack; diff --git a/src/advanced_inv_listitem.cpp b/src/advanced_inv_listitem.cpp index 3e5dc1711826f..57a242fb40e25 100644 --- a/src/advanced_inv_listitem.cpp +++ b/src/advanced_inv_listitem.cpp @@ -3,6 +3,7 @@ #include "auto_pickup.h" #include "cata_assert.h" #include "item.h" +#include "item_tname.h" advanced_inv_listitem::advanced_inv_listitem( const item_location &an_item, int index, int count, aim_location area, bool from_vehicle ) diff --git a/src/advanced_inv_listitem.h b/src/advanced_inv_listitem.h index ae466c50e7560..b3fd7c48fa9cc 100644 --- a/src/advanced_inv_listitem.h +++ b/src/advanced_inv_listitem.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_ADVANCED_INV_LISTITEM_H #define CATA_SRC_ADVANCED_INV_LISTITEM_H -#include +#include #include #include "item_location.h" diff --git a/src/advanced_inv_pagination.cpp b/src/advanced_inv_pagination.cpp index e58900b1e33c9..89509ff61d4c3 100644 --- a/src/advanced_inv_pagination.cpp +++ b/src/advanced_inv_pagination.cpp @@ -1,5 +1,6 @@ #include "advanced_inv_pagination.h" +#include #include #include "advanced_inv_pane.h" diff --git a/src/advanced_inv_pane.cpp b/src/advanced_inv_pane.cpp index 96f380566a915..1220ae710534e 100644 --- a/src/advanced_inv_pane.cpp +++ b/src/advanced_inv_pane.cpp @@ -1,14 +1,18 @@ +#include "advanced_inv_pane.h" + #include #include #include +#include #include #include #include "advanced_inv_area.h" #include "advanced_inv_pagination.h" -#include "advanced_inv_pane.h" #include "avatar.h" #include "cata_assert.h" +#include "character.h" +#include "character_attire.h" #include "flag.h" #include "item.h" #include "item_search.h" diff --git a/src/advanced_inv_pane.h b/src/advanced_inv_pane.h index d91dbafd73114..535b6ef1447bb 100644 --- a/src/advanced_inv_pane.h +++ b/src/advanced_inv_pane.h @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -12,6 +11,8 @@ #include "advanced_inv_area.h" #include "advanced_inv_listitem.h" #include "cursesdef.h" +#include "item_location.h" +#include "units_fwd.h" class item; struct advanced_inv_pane_save_state; diff --git a/src/ammo.cpp b/src/ammo.cpp index d1ed085445e8d..6152e91180a1e 100644 --- a/src/ammo.cpp +++ b/src/ammo.cpp @@ -5,9 +5,10 @@ #include #include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "item.h" -#include "json.h" -#include "translations.h" +#include "json_error.h" #include "type_id.h" namespace diff --git a/src/ammo.h b/src/ammo.h index e2bb481eb9ad6..199cedd7344ab 100644 --- a/src/ammo.h +++ b/src/ammo.h @@ -2,9 +2,9 @@ #ifndef CATA_SRC_AMMO_H #define CATA_SRC_AMMO_H -#include +#include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/ammo_effect.cpp b/src/ammo_effect.cpp index 8dfc6ab600d63..03f75f9b0c138 100644 --- a/src/ammo_effect.cpp +++ b/src/ammo_effect.cpp @@ -3,8 +3,10 @@ #include #include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" generic_factory &get_all_ammo_effects() { diff --git a/src/ammo_effect.h b/src/ammo_effect.h index ea5f21c777cd7..c066a928cdd2b 100644 --- a/src/ammo_effect.h +++ b/src/ammo_effect.h @@ -3,8 +3,9 @@ #define CATA_SRC_AMMO_EFFECT_H #include -#include #include +#include +#include #include #include "explosion.h" @@ -12,6 +13,8 @@ #include "type_id.h" class JsonObject; +struct ammo_effect; +template class generic_factory; generic_factory &get_all_ammo_effects(); diff --git a/src/anatomy.cpp b/src/anatomy.cpp index 8adc5d86e86fa..a64e01d017d9d 100644 --- a/src/anatomy.cpp +++ b/src/anatomy.cpp @@ -1,20 +1,22 @@ #include "anatomy.h" -#include +#include #include -#include -#include +#include #include #include #include #include "ballistics.h" -#include "cata_utility.h" #include "character.h" +#include "creature.h" #include "debug.h" -#include "generic_factory.h" #include "flag.h" -#include "json.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "generic_factory.h" +#include "init.h" +#include "json_error.h" #include "messages.h" #include "output.h" #include "rng.h" diff --git a/src/anatomy.h b/src/anatomy.h index 02a05cc00cc99..7b6dfc7b6acd9 100644 --- a/src/anatomy.h +++ b/src/anatomy.h @@ -2,15 +2,17 @@ #ifndef CATA_SRC_ANATOMY_H #define CATA_SRC_ANATOMY_H -#include +#include +#include +#include #include #include "bodypart.h" -#include "string_id.h" +#include "type_id.h" +class Creature; class JsonObject; class anatomy; -class Creature; using anatomy_id = string_id; diff --git a/src/animation.h b/src/animation.h index f410bbadaf7ae..66f67add27f18 100644 --- a/src/animation.h +++ b/src/animation.h @@ -3,6 +3,7 @@ #define CATA_SRC_ANIMATION_H #include +#include #include "color.h" diff --git a/src/armor_layers.cpp b/src/armor_layers.cpp index 909bbd380cc8a..b7c3f0b46890f 100644 --- a/src/armor_layers.cpp +++ b/src/armor_layers.cpp @@ -2,16 +2,24 @@ #include #include #include +#include #include +#include +#include #include +#include #include #include "activity_type.h" +#include "body_part_set.h" #include "bodypart.h" -#include "catacharset.h" // used for utf8_width() +#include "catacharset.h" #include "character.h" +#include "character_attire.h" #include "color.h" +#include "creature.h" #include "cursesdef.h" +#include "damage.h" #include "debug.h" #include "enums.h" #include "flag.h" @@ -20,14 +28,21 @@ #include "input_context.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "line.h" #include "output.h" #include "pimpl.h" #include "player_activity.h" +#include "point.h" #include "string_formatter.h" +#include "subbodypart.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" +#include "ui.h" #include "ui_manager.h" +#include "units.h" #include "units_utility.h" static const activity_id ACT_ARMOR_LAYERS( "ACT_ARMOR_LAYERS" ); diff --git a/src/ascii_art.cpp b/src/ascii_art.cpp index e27e36f71dfc9..0021d4295820a 100644 --- a/src/ascii_art.cpp +++ b/src/ascii_art.cpp @@ -6,8 +6,10 @@ #include "assign.h" #include "catacharset.h" #include "debug.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" #include "output.h" static const int ascii_art_width = 41; diff --git a/src/ascii_art.h b/src/ascii_art.h index 23da5dabb9b80..3351f90b7e83c 100644 --- a/src/ascii_art.h +++ b/src/ascii_art.h @@ -2,7 +2,9 @@ #ifndef CATA_SRC_ASCII_ART_H #define CATA_SRC_ASCII_ART_H -#include +#include +#include +#include #include #include "type_id.h" diff --git a/src/assign.cpp b/src/assign.cpp index ab5ec64463108..7ab6b1ce076d2 100644 --- a/src/assign.cpp +++ b/src/assign.cpp @@ -1,5 +1,13 @@ #include "assign.h" +#include +#include +#include + +#include "color.h" +#include "debug.h" +#include "json_error.h" + void report_strict_violation( const JsonObject &jo, const std::string &message, const std::string_view name ) { diff --git a/src/assign.h b/src/assign.h index dff88e998c65d..c658c709df3a6 100644 --- a/src/assign.h +++ b/src/assign.h @@ -2,21 +2,25 @@ #ifndef CATA_SRC_ASSIGN_H #define CATA_SRC_ASSIGN_H -#include -#include +#include +#include +#include #include -#include #include -#include +#include +#include +#include #include "calendar.h" -#include "color.h" #include "damage.h" -#include "debug.h" #include "flat_set.h" -#include "json.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "type_id.h" #include "units.h" +class nc_color; + namespace detail { template @@ -232,8 +236,6 @@ bool assign( const JsonObject &jo, std::string_view name, units::power &val, bool assign( const JsonObject &jo, const std::string &name, nc_color &val, bool strict = false ); -class time_duration; - template inline std::enable_if_t, time_duration>, bool> diff --git a/src/auto_note.cpp b/src/auto_note.cpp index 6c09c8627e9ce..83bc0bf91e84f 100644 --- a/src/auto_note.cpp +++ b/src/auto_note.cpp @@ -1,11 +1,17 @@ #include "auto_note.h" +#include +#include +#include #include +#include #include "cata_utility.h" #include "color.h" #include "cursesdef.h" #include "filesystem.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" #include "input_context.h" #include "json.h" @@ -14,7 +20,9 @@ #include "output.h" #include "path_info.h" #include "point.h" +#include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" diff --git a/src/auto_note.h b/src/auto_note.h index c908bf62745e0..5ae7095e7de28 100644 --- a/src/auto_note.h +++ b/src/auto_note.h @@ -2,15 +2,19 @@ #ifndef CATA_SRC_AUTO_NOTE_H #define CATA_SRC_AUTO_NOTE_H -#include +#include +#include +#include #include #include #include #include #include "cata_path.h" -#include "map_extras.h" -#include "string_id.h" +#include "catacharset.h" +#include "color.h" +#include "map_extras.h" // IWYU pragma: keep +#include "type_id.h" namespace auto_notes { diff --git a/src/auto_pickup.cpp b/src/auto_pickup.cpp index 184c034fa6f1e..a88b03de9ed85 100644 --- a/src/auto_pickup.cpp +++ b/src/auto_pickup.cpp @@ -3,23 +3,32 @@ #include #include #include +#include +#include #include +#include #include #include +#include "cata_path.h" #include "cata_utility.h" #include "character.h" #include "color.h" #include "cursesdef.h" #include "filesystem.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "input_context.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "item_stack.h" #include "itype.h" -#include "map.h" #include "json.h" +#include "map.h" +#include "map_selector.h" #include "material.h" #include "options.h" #include "output.h" @@ -29,7 +38,9 @@ #include "string_input_popup.h" #include "translations.h" #include "type_id.h" +#include "ui.h" #include "ui_manager.h" +#include "units.h" using namespace auto_pickup; diff --git a/src/auto_pickup.h b/src/auto_pickup.h index 8a2d03b69cd3c..4d47fc931e4f0 100644 --- a/src/auto_pickup.h +++ b/src/auto_pickup.h @@ -3,20 +3,22 @@ #define CATA_SRC_AUTO_PICKUP_H #include -#include +#include #include #include +#include #include #include "enums.h" -#include "item_location.h" #include "item_stack.h" class JsonArray; class JsonObject; class JsonOut; class item; +class item_location; struct itype; +struct tripoint; namespace auto_pickup { diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index 7c3aa08c49027..0d9e8fc93a6a3 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -3,22 +3,23 @@ #include #include #include -#include +#include #include #include #include #include #include +#include #include #include #include "action.h" #include "activity_actor_definitions.h" #include "avatar.h" -#include "bodypart.h" -#include "cached_options.h" +#include "body_part_set.h" #include "calendar.h" #include "character.h" +#include "color.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" @@ -28,16 +29,18 @@ #include "game.h" #include "game_constants.h" #include "game_inventory.h" +#include "gun_mode.h" #include "inventory.h" #include "item.h" #include "item_location.h" +#include "item_pocket.h" #include "itype.h" #include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "math_defines.h" -#include "memory_fast.h" #include "messages.h" #include "monster.h" #include "move_mode.h" @@ -53,13 +56,11 @@ #include "rng.h" #include "translations.h" #include "type_id.h" -#include "value_ptr.h" +#include "ui.h" #include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" -class gun_mode; - static const efftype_id effect_amigara( "amigara" ); static const efftype_id effect_glowing( "glowing" ); static const efftype_id effect_harnessed( "harnessed" ); diff --git a/src/avatar_action.h b/src/avatar_action.h index fe8ad11135f55..49355c6d0fc92 100644 --- a/src/avatar_action.h +++ b/src/avatar_action.h @@ -2,13 +2,12 @@ #ifndef CATA_SRC_AVATAR_ACTION_H #define CATA_SRC_AVATAR_ACTION_H -#include #include +#include #include #include "activity_type.h" #include "point.h" -#include "units_fwd.h" class Character; class avatar; diff --git a/src/ballistics.cpp b/src/ballistics.cpp index 072c8437044d3..72bfd44d0a5d1 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -2,15 +2,14 @@ #include #include -#include -#include -#include #include #include #include +#include #include #include "calendar.h" +#include "character.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" @@ -24,6 +23,7 @@ #include "line.h" #include "make_static.h" #include "map.h" +#include "mapdata.h" #include "messages.h" #include "monster.h" #include "npc.h" @@ -36,9 +36,7 @@ #include "trap.h" #include "type_id.h" #include "units.h" -#include "visitable.h" #include "vpart_position.h" -#include "weakpoint.h" static const efftype_id effect_bounced( "bounced" ); diff --git a/src/ballistics.h b/src/ballistics.h index 9a4157b90c267..cb07e8352a62f 100644 --- a/src/ballistics.h +++ b/src/ballistics.h @@ -2,6 +2,13 @@ #ifndef CATA_SRC_BALLISTICS_H #define CATA_SRC_BALLISTICS_H +#include +#include +#include +#include +#include +#include + #include "weakpoint.h" #include "weighted_list.h" diff --git a/src/basecamp.cpp b/src/basecamp.cpp index cffe1f3f369b2..46f9e55169b58 100644 --- a/src/basecamp.cpp +++ b/src/basecamp.cpp @@ -1,36 +1,38 @@ #include "basecamp.h" #include -#include #include -#include #include #include +#include #include #include #include #include "avatar.h" +#include "build_reqs.h" #include "calendar.h" +#include "cata_assert.h" +#include "cata_utility.h" #include "character.h" #include "character_id.h" #include "clzones.h" -#include "colony.h" #include "color.h" #include "debug.h" +#include "faction.h" #include "faction_camp.h" #include "game.h" #include "inventory.h" #include "item.h" -#include "item_group.h" -#include "itype.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "mapdata.h" #include "npc.h" #include "output.h" #include "overmap.h" #include "overmapbuffer.h" +#include "pimpl.h" #include "recipe.h" #include "recipe_dictionary.h" #include "recipe_groups.h" diff --git a/src/basecamp.h b/src/basecamp.h index bffbe6b2da69a..8584101fbc429 100644 --- a/src/basecamp.h +++ b/src/basecamp.h @@ -2,13 +2,17 @@ #ifndef CATA_SRC_BASECAMP_H #define CATA_SRC_BASECAMP_H +#include #include +#include #include #include #include #include #include #include +#include +#include #include #include "coordinates.h" @@ -17,21 +21,28 @@ #include "game_inventory.h" #include "inventory.h" #include "map.h" +#include "mapgendata.h" #include "mission_companion.h" #include "point.h" #include "requirements.h" #include "stomach.h" +#include "translation.h" #include "type_id.h" +#include "units_fwd.h" +class Character; class JsonObject; class JsonOut; +class basecamp; class character_id; +class faction; +class item; class npc; +class recipe; class time_duration; class zone_data; -enum class farm_ops : int; -class item; -class recipe; +struct MonsterGroupResult; +enum class farm_ops; using faction_id = string_id; diff --git a/src/behavior.cpp b/src/behavior.cpp index 2eb626e8a1e8a..9932eb0b4301f 100644 --- a/src/behavior.cpp +++ b/src/behavior.cpp @@ -8,9 +8,12 @@ #include "behavior_oracle.h" #include "behavior_strategy.h" #include "cata_assert.h" -#include "generic_factory.h" #include "debug.h" -#include "json.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "generic_factory.h" +#include "init.h" +#include "json_error.h" using namespace behavior; diff --git a/src/behavior.h b/src/behavior.h index b17c540874b6e..02babc16dc264 100644 --- a/src/behavior.h +++ b/src/behavior.h @@ -3,12 +3,12 @@ #define CATA_SRC_BEHAVIOR_H #include -#include #include +#include +#include #include #include -#include "string_id.h" #include "type_id.h" class JsonObject; diff --git a/src/behavior_oracle.h b/src/behavior_oracle.h index 59091e6566c76..c177afc94716a 100644 --- a/src/behavior_oracle.h +++ b/src/behavior_oracle.h @@ -3,8 +3,8 @@ #define CATA_SRC_BEHAVIOR_ORACLE_H #include -#include #include +#include #include namespace behavior diff --git a/src/bionics.cpp b/src/bionics.cpp index 22098e23a381a..ea06fc35d3fed 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -1,16 +1,18 @@ #include "bionics.h" -#include //std::min +#include #include #include #include +#include #include -#include #include #include #include #include +#include #include +#include #include #include "action.h" @@ -24,36 +26,45 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "character_attire.h" #include "character_martial_arts.h" #include "colony.h" #include "color.h" +#include "condition.h" +#include "coordinates.h" +#include "creature.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "dispersion.h" #include "effect.h" #include "effect_on_condition.h" -#include "enum_conversions.h" #include "enums.h" #include "event.h" #include "event_bus.h" #include "explosion.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "generic_factory.h" +#include "global_vars.h" #include "handle_liquid.h" +#include "init.h" #include "inventory.h" #include "item.h" #include "item_location.h" #include "itype.h" #include "json.h" +#include "json_error.h" #include "line.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "material.h" -#include "memorial_logger.h" #include "messages.h" #include "monster.h" #include "morale_types.h" @@ -64,13 +75,16 @@ #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "projectile.h" #include "requirements.h" #include "ret_val.h" #include "rng.h" +#include "safe_reference.h" #include "sounds.h" #include "string_formatter.h" +#include "talker.h" #include "teleport.h" #include "translations.h" #include "ui.h" diff --git a/src/bionics.h b/src/bionics.h index 4643acfcee325..fe4fb51c9b634 100644 --- a/src/bionics.h +++ b/src/bionics.h @@ -3,20 +3,23 @@ #define CATA_SRC_BIONICS_H #include -#include #include -#include #include #include +#include +#include +#include #include +#include "bodypart.h" #include "calendar.h" -#include "effect_on_condition.h" +#include "damage.h" #include "enums.h" #include "flat_set.h" #include "item.h" #include "magic.h" -#include "translations.h" +#include "npc.h" +#include "translation.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" diff --git a/src/bionics_ui.cpp b/src/bionics_ui.cpp index 461034d97a366..2d2504eb90e5c 100644 --- a/src/bionics_ui.cpp +++ b/src/bionics_ui.cpp @@ -1,7 +1,14 @@ -#include //std::min +#include #include +#include +#include +#include #include +#include +#include #include +#include +#include #include "avatar.h" #include "bionics.h" @@ -9,6 +16,7 @@ #include "calendar.h" #include "cata_utility.h" #include "catacharset.h" +#include "character.h" #include "color.h" #include "cursesdef.h" #include "enums.h" @@ -16,14 +24,21 @@ #include "game.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" +#include "item.h" +#include "item_location.h" #include "localized_comparator.h" +#include "make_static.h" +#include "npc.h" #include "options.h" #include "output.h" -#include "make_static.h" #include "pimpl.h" +#include "point.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" #include "ui.h" #include "ui_manager.h" #include "uistate.h" diff --git a/src/bodygraph.cpp b/src/bodygraph.cpp index 59dd71168358b..8af29d421fb53 100644 --- a/src/bodygraph.cpp +++ b/src/bodygraph.cpp @@ -1,12 +1,39 @@ #include "bodygraph.h" + +#include +#include +#include +#include +#include +#include + #include "bodypart.h" +#include "cata_utility.h" +#include "catacharset.h" #include "character.h" +#include "character_attire.h" +#include "creature.h" #include "cursesdef.h" #include "damage.h" +#include "debug.h" +#include "enums.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" #include "input_context.h" +#include "json_error.h" #include "make_static.h" +#include "memory_fast.h" +#include "output.h" +#include "point.h" +#include "string_formatter.h" +#include "subbodypart.h" +#include "translation.h" +#include "translations.h" +#include "ui.h" #include "ui_manager.h" +#include "units.h" #include "weather.h" #define BPGRAPH_MAXROWS 20 diff --git a/src/bodygraph.h b/src/bodygraph.h index bc53012613ca6..147cdb3ae13fd 100644 --- a/src/bodygraph.h +++ b/src/bodygraph.h @@ -2,13 +2,19 @@ #ifndef CATA_SRC_BODYGRAPH_H #define CATA_SRC_BODYGRAPH_H +#include +#include +#include +#include +#include +#include #include #include "color.h" -#include "type_id.h" #include "damage.h" +#include "effect.h" +#include "type_id.h" -class effect; class Character; class JsonObject; diff --git a/src/bodypart.cpp b/src/bodypart.cpp index bb7f90e5bdde8..73f9a04ed6988 100644 --- a/src/bodypart.cpp +++ b/src/bodypart.cpp @@ -1,19 +1,25 @@ #include "bodypart.h" -#include +#include #include #include #include #include #include +#include "assign.h" #include "body_part_set.h" #include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "subbodypart.h" +#include "init.h" #include "json.h" +#include "json_error.h" +#include "localized_comparator.h" #include "rng.h" +#include "subbodypart.h" const bodypart_str_id body_part_arm_l( "arm_l" ); const bodypart_str_id body_part_arm_r( "arm_r" ); diff --git a/src/bodypart.h b/src/bodypart.h index ff447c5a9f5a3..72e0f8cdf2fab 100644 --- a/src/bodypart.h +++ b/src/bodypart.h @@ -5,30 +5,28 @@ #include #include #include -#include -#include +#include #include #include +#include #include #include #include "damage.h" #include "enums.h" #include "flat_set.h" -#include "int_id.h" -#include "mod_tracker.h" -#include "string_id.h" -#include "translations.h" -#include "type_id.h" #include "subbodypart.h" -#include "localized_comparator.h" +#include "translation.h" +#include "type_id.h" +#include "units.h" #include "weather.h" class JsonObject; class JsonOut; -class JsonValue; struct body_part_type; +struct localized_comparator; template struct enum_traits; +template class generic_factory; using bodypart_str_id = string_id; using bodypart_id = int_id; diff --git a/src/bonuses.cpp b/src/bonuses.cpp index 6d0d7592b260f..bcf723110e25f 100644 --- a/src/bonuses.cpp +++ b/src/bonuses.cpp @@ -2,13 +2,15 @@ #include #include +#include #include #include "character.h" #include "damage.h" -#include "json.h" -#include "make_static.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" static const skill_id skill_archery( "archery" ); diff --git a/src/bonuses.h b/src/bonuses.h index 27f10f711c30f..21eb79b3fbd10 100644 --- a/src/bonuses.h +++ b/src/bonuses.h @@ -2,11 +2,11 @@ #ifndef CATA_SRC_BONUSES_H #define CATA_SRC_BONUSES_H -#include #include +#include #include -#include "damage.h" +#include "type_id.h" class Character; class JsonArray; diff --git a/src/butchery_requirements.cpp b/src/butchery_requirements.cpp index 2cad6bd8931b7..5ec31384a32f0 100644 --- a/src/butchery_requirements.cpp +++ b/src/butchery_requirements.cpp @@ -1,7 +1,6 @@ #include "butchery_requirements.h" #include -#include #include #include #include @@ -10,9 +9,11 @@ #include "creature.h" #include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" #include "item.h" -#include "json.h" #include "requirements.h" namespace diff --git a/src/butchery_requirements.h b/src/butchery_requirements.h index ee26f9e1d6d4a..b7772419366d5 100644 --- a/src/butchery_requirements.h +++ b/src/butchery_requirements.h @@ -2,12 +2,12 @@ #ifndef CATA_SRC_BUTCHERY_REQUIREMENTS_H #define CATA_SRC_BUTCHERY_REQUIREMENTS_H -#include #include +#include +#include #include #include -#include "creature.h" #include "type_id.h" class JsonObject; diff --git a/src/calendar.cpp b/src/calendar.cpp index a91ac7ab4655a..af66fb37d111f 100644 --- a/src/calendar.cpp +++ b/src/calendar.cpp @@ -6,13 +6,12 @@ #include #include #include +#include #include +#include -#include "cata_assert.h" -#include "cata_utility.h" #include "debug.h" #include "display.h" -#include "enum_conversions.h" #include "line.h" #include "options.h" #include "rng.h" diff --git a/src/calendar_ui.cpp b/src/calendar_ui.cpp index c723824a510ea..86dbcf709d643 100644 --- a/src/calendar_ui.cpp +++ b/src/calendar_ui.cpp @@ -1,8 +1,16 @@ #include "calendar_ui.h" +#include +#include +#include +#include +#include + +#include "color.h" #include "input_context.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "ui.h" time_point calendar_ui::select_time_point( time_point initial_value, std::string_view title, diff --git a/src/calendar_ui.h b/src/calendar_ui.h index ad9c2e53254f5..ec689a6eb155f 100644 --- a/src/calendar_ui.h +++ b/src/calendar_ui.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_CALENDAR_UI_H #define CATA_SRC_CALENDAR_UI_H -#include +#include #include "calendar.h" #include "translations.h" diff --git a/src/cata_bitset.h b/src/cata_bitset.h index d3163aa3b2570..6eeecd65a7a3f 100644 --- a/src/cata_bitset.h +++ b/src/cata_bitset.h @@ -2,10 +2,12 @@ #ifndef CATA_SRC_CATA_BITSET_H #define CATA_SRC_CATA_BITSET_H -#include #include +#include #include +#include #include +#include #include "cata_assert.h" diff --git a/src/cata_imgui.h b/src/cata_imgui.h index 50db9dbe4e519..1bb3789aebc7c 100644 --- a/src/cata_imgui.h +++ b/src/cata_imgui.h @@ -1,13 +1,10 @@ #pragma once -#include -#include -#include +#include #include -#include +#include class nc_color; struct input_event; -struct item_info_data; #if defined(WIN32) || defined(TILES) #include "sdl_geometry.h" diff --git a/src/cata_utility.cpp b/src/cata_utility.cpp index e18f501817c4d..47d046f5b9fea 100644 --- a/src/cata_utility.cpp +++ b/src/cata_utility.cpp @@ -1,33 +1,38 @@ #include "cata_utility.h" -#include +#include +#include #include #include -#include -#include -#include -#include #include +#include #include +#include +#include +#include #include -#include +#include +#include +#include #include #include #include #include "cached_options.h" +#include "cata_path.h" #include "catacharset.h" #include "debug.h" -#include "enum_conversions.h" #include "filesystem.h" +#include "flexbuffer_json.h" #include "json.h" #include "json_loader.h" #include "ofstream_wrapper.h" #include "options.h" #include "output.h" -#include "path_info.h" #include "pinyin.h" #include "rng.h" +#include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "unicode.h" #include "zlib.h" diff --git a/src/cata_variant.h b/src/cata_variant.h index b3a06276e4b74..a7ceffff435a8 100644 --- a/src/cata_variant.h +++ b/src/cata_variant.h @@ -6,8 +6,8 @@ #include #include #include -#include #include +#include #include #include @@ -17,7 +17,7 @@ #include "hash_utils.h" #include "point.h" #include "to_string_id.h" -#include "type_id.h" +#include "type_id.h" // IWYU pragma: keep class JsonOut; class JsonValue; diff --git a/src/catacharset.cpp b/src/catacharset.cpp index 89f7b87684e8f..03184dab307bc 100644 --- a/src/catacharset.cpp +++ b/src/catacharset.cpp @@ -1,10 +1,10 @@ #include "catacharset.h" +#include #include #include -#include -#include "options.h" +#include "cata_assert.h" #include "output.h" #include "wcwidth.h" diff --git a/src/catacharset.h b/src/catacharset.h index a12432f930bc2..94c7186405c69 100644 --- a/src/catacharset.h +++ b/src/catacharset.h @@ -4,8 +4,9 @@ #include #include -#include +#include #include +#include #include constexpr int ANY_LENGTH = 5; diff --git a/src/cellular_automata.cpp b/src/cellular_automata.cpp index 937ab82dbf442..6c0dd3e7fa32b 100644 --- a/src/cellular_automata.cpp +++ b/src/cellular_automata.cpp @@ -1,5 +1,8 @@ #include "cellular_automata.h" +#include "point.h" +#include "rng.h" + namespace CellularAutomata { /** diff --git a/src/cellular_automata.h b/src/cellular_automata.h index d994f8ac17cd6..05d79751564c2 100644 --- a/src/cellular_automata.h +++ b/src/cellular_automata.h @@ -4,8 +4,7 @@ #include -#include "point.h" -#include "rng.h" +struct point; namespace CellularAutomata { diff --git a/src/character.cpp b/src/character.cpp index e22959d21c574..15196e7aebffd 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -6,7 +6,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -22,24 +24,29 @@ #include "avatar_action.h" #include "bionics.h" #include "cached_options.h" +#include "cata_assert.h" #include "cata_utility.h" #include "catacharset.h" #include "character_attire.h" #include "character_martial_arts.h" +#include "city.h" #include "colony.h" #include "color.h" #include "construction.h" #include "coordinates.h" #include "creature_tracker.h" #include "cursesdef.h" +#include "debug.h" #include "disease.h" #include "display.h" #include "effect.h" #include "effect_on_condition.h" #include "effect_source.h" +#include "enum_traits.h" #include "enums.h" #include "event.h" #include "event_bus.h" +#include "faction.h" #include "fault.h" #include "field.h" #include "field_type.h" @@ -50,15 +57,18 @@ #include "gun_mode.h" #include "handle_liquid.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "item_location.h" #include "item_pocket.h" #include "item_stack.h" +#include "item_tname.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" #include "lightmap.h" #include "line.h" +#include "localized_comparator.h" #include "magic.h" #include "magic_enchantment.h" #include "make_static.h" @@ -66,6 +76,8 @@ #include "map_iterator.h" #include "map_selector.h" #include "mapdata.h" +#include "maptile_fwd.h" +#include "martialarts.h" #include "math_defines.h" #include "memorial_logger.h" #include "messages.h" @@ -80,11 +92,13 @@ #include "options.h" #include "output.h" #include "overlay_ordering.h" +#include "overmap_types.h" #include "overmapbuffer.h" #include "pathfinding.h" #include "profession.h" #include "proficiency.h" #include "recipe_dictionary.h" +#include "requirements.h" #include "ret_val.h" #include "rng.h" #include "scent_map.h" @@ -93,8 +107,9 @@ #include "sounds.h" #include "stomach.h" #include "string_formatter.h" -#include "submap.h" +#include "submap.h" // IWYU pragma: keep #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "ui.h" @@ -112,6 +127,7 @@ #include "weather.h" #include "weather_type.h" +class activity_actor; struct dealt_projectile_attack; static const activity_id ACT_ADV_INVENTORY( "ACT_ADV_INVENTORY" ); diff --git a/src/character.h b/src/character.h index f97405d6d99d6..ab0496aedf69e 100644 --- a/src/character.h +++ b/src/character.h @@ -7,16 +7,15 @@ #include #include #include -#include #include #include #include -#include +#include #include +#include #include #include #include -#include #include #include #include @@ -25,77 +24,86 @@ #include "activity_tracker.h" #include "activity_type.h" #include "addiction.h" +#include "body_part_set.h" #include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character_attire.h" #include "character_id.h" -#include "city.h" +#include "city.h" // IWYU pragma: keep +#include "compatibility.h" #include "coordinates.h" +#include "craft_command.h" #include "creature.h" #include "damage.h" -#include "debug.h" #include "enums.h" #include "flat_set.h" #include "game_constants.h" +#include "inventory.h" #include "item.h" #include "item_location.h" -#include "item_pocket.h" #include "magic_enchantment.h" -#include "memory_fast.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "ranged.h" #include "ret_val.h" +#include "safe_reference.h" #include "stomach.h" #include "string_formatter.h" +#include "subbodypart.h" #include "type_id.h" -#include "units_fwd.h" +#include "units.h" #include "visitable.h" #include "weakpoint.h" #include "weighted_list.h" -class Character; class JsonObject; class JsonOut; class SkillLevel; class SkillLevelMap; +class activity_actor; class basecamp; class bionic_collection; class character_martial_arts; -class craft_command; class dispersion_sources; class effect; class effect_source; class faction; -class inventory; +class item_pocket; class known_magic; class ma_technique; class map; class monster; class nc_color; -class npc; class player_morale; +class profession; class proficiency_set; +class recipe; class recipe_subset; class spell; class ui_adaptor; -class vpart_reference; class vehicle; +class vpart_reference; +namespace catacurses +{ +class window; +} // namespace catacurses struct bionic; struct construction; struct dealt_projectile_attack; struct display_proficiency; +struct field_immunity_data; /// @brief Item slot used to apply modifications from food and meds struct islot_comestible; struct item_comp; struct itype; struct mutation_branch; +struct mutation_category_trait; struct mutation_variant; -struct needs_rates; struct pathfinding_settings; -struct points_left; +struct projectile; struct requirement_data; struct tool_comp; struct trait_and_var; diff --git a/src/character_ammo.cpp b/src/character_ammo.cpp index 79001def8a8f7..b1477346a656b 100644 --- a/src/character_ammo.cpp +++ b/src/character_ammo.cpp @@ -1,13 +1,24 @@ -#include "ammo.h" +#include "ammo.h" // IWYU pragma: associated +#include +#include +#include +#include +#include #include +#include +#include "cata_utility.h" #include "character.h" -#include "character_modifier.h" +#include "enums.h" #include "flag.h" -#include "game.h" +#include "item.h" +#include "item_location.h" #include "itype.h" -#include "output.h" +#include "type_id.h" +#include "units.h" +#include "value_ptr.h" +#include "visitable.h" static const character_modifier_id character_modifier_reloading_move_mod( "reloading_move_mod" ); static const skill_id skill_gun( "gun" ); diff --git a/src/character_armor.cpp b/src/character_armor.cpp index 829e8b10e9354..3e9bad9fbab26 100644 --- a/src/character_armor.cpp +++ b/src/character_armor.cpp @@ -1,13 +1,42 @@ +#include +#include +#include +#include +#include +#include +#include + #include "bionics.h" +#include "bodypart.h" #include "character.h" +#include "character_attire.h" +#include "damage.h" +#include "enums.h" #include "flag.h" +#include "item.h" +#include "item_pocket.h" #include "itype.h" +#include "line.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" +#include "material.h" #include "memorial_logger.h" #include "mutation.h" +#include "npc.h" #include "output.h" -#include "weakpoint.h" +#include "pimpl.h" +#include "point.h" +#include "rng.h" +#include "subbodypart.h" +#include "translation.h" +#include "translations.h" +#include "type_id.h" +#include "units.h" +#include "viewer.h" + +struct weakpoint; +struct weakpoint_attack; static const bionic_id bio_ads( "bio_ads" ); diff --git a/src/character_attire.cpp b/src/character_attire.cpp index 20291b17bcde4..99b18137bf814 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -1,20 +1,55 @@ #include "character_attire.h" +#include +#include +#include +#include +#include +#include +#include +#include + #include "bodygraph.h" +#include "calendar.h" +#include "cata_utility.h" #include "character.h" +#include "creature.h" +#include "damage.h" +#include "debug.h" #include "display.h" +#include "effect.h" +#include "enums.h" #include "event.h" #include "event_bus.h" +#include "fire.h" #include "flag.h" -#include "game.h" +#include "flat_set.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "game_constants.h" #include "inventory.h" +#include "item_contents.h" +#include "item_pocket.h" #include "itype.h" +#include "json.h" +#include "json_error.h" +#include "line.h" +#include "magic_enchantment.h" #include "make_static.h" #include "melee.h" -#include "memorial_logger.h" #include "messages.h" #include "mutation.h" #include "output.h" +#include "pimpl.h" +#include "pocket_type.h" +#include "point.h" +#include "relic.h" +#include "rng.h" +#include "string_formatter.h" +#include "translation.h" +#include "translations.h" +#include "value_ptr.h" +#include "viewer.h" static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_heating_bionic( "heating_bionic" ); diff --git a/src/character_attire.h b/src/character_attire.h index 321a8f7288782..e99e3fe29bc77 100644 --- a/src/character_attire.h +++ b/src/character_attire.h @@ -2,18 +2,41 @@ #ifndef CATA_SRC_CHARACTER_ATTIRE_H #define CATA_SRC_CHARACTER_ATTIRE_H -#include "advanced_inv_listitem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "body_part_set.h" #include "bodypart.h" #include "color.h" #include "item.h" +#include "item_location.h" +#include "ret_val.h" +#include "subbodypart.h" +#include "type_id.h" #include "units.h" +#include "visitable.h" -class advanced_inventory_pane; +class Character; +class JsonObject; +class JsonOut; class advanced_inv_area; +class advanced_inv_listitem; +class advanced_inventory_pane; class avatar; +class item_pocket; class npc; class player_morale; struct bodygraph_info; +struct damage_unit; using drop_location = std::pair; using drop_locations = std::list; diff --git a/src/character_body.cpp b/src/character_body.cpp index edb5a3ea0a295..fa9a6a4246d8f 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -1,21 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "activity_tracker.h" #include "avatar.h" +#include "bodypart.h" +#include "calendar.h" +#include "cata_utility.h" +#include "catacharset.h" #include "character.h" +#include "character_attire.h" +#include "color.h" +#include "creature.h" #include "display.h" +#include "effect.h" +#include "enums.h" #include "flag.h" #include "game.h" +#include "game_constants.h" +#include "magic.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" +#include "mapdata.h" #include "messages.h" #include "morale_types.h" -#include "options.h" #include "output.h" #include "overmapbuffer.h" +#include "pimpl.h" +#include "rng.h" +#include "stomach.h" +#include "string_formatter.h" +#include "translation.h" +#include "translations.h" #include "type_id.h" -#include "vitamin.h" +#include "ui.h" +#include "units.h" #include "veh_type.h" #include "vehicle.h" +#include "vitamin.h" #include "vpart_position.h" #include "weather.h" +#include "weather_gen.h" + +class item; +struct mutation_branch; static const bionic_id bio_sleep_shutdown( "bio_sleep_shutdown" ); diff --git a/src/character_crafting.cpp b/src/character_crafting.cpp index e4feaccf42f88..abfb944497811 100644 --- a/src/character_crafting.cpp +++ b/src/character_crafting.cpp @@ -9,6 +9,7 @@ #include "character.h" #include "inventory.h" #include "item.h" +#include "item_contents.h" #include "itype.h" #include "pimpl.h" #include "recipe.h" diff --git a/src/character_escape.cpp b/src/character_escape.cpp index a9b9f4f693a49..25f5cc1a17ebf 100644 --- a/src/character_escape.cpp +++ b/src/character_escape.cpp @@ -1,8 +1,20 @@ +#include +#include +#include + +#include "bodypart.h" +#include "calendar.h" #include "character.h" #include "character_attire.h" #include "character_martial_arts.h" #include "creature_tracker.h" +#include "damage.h" +#include "debug.h" +#include "effect.h" +#include "enums.h" #include "flag.h" +#include "item.h" +#include "item_pocket.h" #include "map.h" #include "map_iterator.h" #include "martialarts.h" @@ -10,6 +22,12 @@ #include "monster.h" #include "mtype.h" #include "output.h" +#include "pimpl.h" +#include "point.h" +#include "rng.h" +#include "translation.h" +#include "translations.h" +#include "type_id.h" static const character_modifier_id character_modifier_grab_break_limb_mod( "grab_break_limb_mod" ); diff --git a/src/character_guns.cpp b/src/character_guns.cpp index 9afcf33f10f67..45196dbb8d33b 100644 --- a/src/character_guns.cpp +++ b/src/character_guns.cpp @@ -1,10 +1,33 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "activity_actor_definitions.h" #include "character.h" +#include "color.h" +#include "debug.h" +#include "enums.h" #include "flag.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "map_selector.h" +#include "player_activity.h" +#include "ret_val.h" +#include "string_formatter.h" +#include "translations.h" +#include "type_id.h" +#include "ui.h" +#include "value_ptr.h" #include "vehicle_selector.h" +#include "visitable.h" static const itype_id itype_large_repairkit( "large_repairkit" ); static const itype_id itype_small_repairkit( "small_repairkit" ); diff --git a/src/character_inventory.cpp b/src/character_inventory.cpp index 252fb7ad8502c..818915f1a73a5 100644 --- a/src/character_inventory.cpp +++ b/src/character_inventory.cpp @@ -1,13 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "activity_actor_definitions.h" #include "activity_handlers.h" #include "catacharset.h" #include "character.h" +#include "character_attire.h" +#include "debug.h" +#include "enums.h" #include "flag.h" #include "inventory.h" +#include "item.h" +#include "item_contents.h" +#include "item_location.h" +#include "item_pocket.h" +#include "itype.h" +#include "iuse.h" #include "iuse_actor.h" +#include "line.h" #include "map.h" +#include "map_selector.h" #include "options.h" +#include "pimpl.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "string_formatter.h" +#include "translations.h" +#include "type_id.h" +#include "ui.h" +#include "units_fwd.h" #include "vehicle.h" +#include "visitable.h" #include "vpart_position.h" void Character::handle_contents_changed( const std::vector &containers ) diff --git a/src/character_martial_arts.cpp b/src/character_martial_arts.cpp index 85478c37b89e6..f498ad62cc1f8 100644 --- a/src/character_martial_arts.cpp +++ b/src/character_martial_arts.cpp @@ -1,13 +1,19 @@ #include "character_martial_arts.h" +#include + #include "action.h" #include "character.h" #include "color.h" #include "enums.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "json.h" +#include "json_error.h" #include "martialarts.h" #include "messages.h" #include "output.h" +#include "translation.h" #include "translations.h" static const matype_id style_kicks( "style_kicks" ); diff --git a/src/character_martial_arts.h b/src/character_martial_arts.h index 6928d247b8fee..958414e393371 100644 --- a/src/character_martial_arts.h +++ b/src/character_martial_arts.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_CHARACTER_MARTIAL_ARTS_H #define CATA_SRC_CHARACTER_MARTIAL_ARTS_H -#include +#include #include #include "martialarts.h" @@ -11,8 +11,8 @@ class Character; class JsonObject; class JsonOut; -class avatar; class item; +class item_location; class character_martial_arts { diff --git a/src/character_modifier.cpp b/src/character_modifier.cpp index aa54a1098a133..937425bf74c0a 100644 --- a/src/character_modifier.cpp +++ b/src/character_modifier.cpp @@ -1,10 +1,26 @@ -#include "character.h" #include "character_modifier.h" + +#include +#include +#include +#include +#include + +#include "character.h" +#include "debug.h" +#include "effect.h" #include "enum_conversions.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "game_constants.h" #include "generic_factory.h" +#include "init.h" +#include "json_error.h" #include "messages.h" #include "move_mode.h" +#include "output.h" +#include "string_formatter.h" static const character_modifier_id character_modifier_limb_footing_movecost_mod( "limb_footing_movecost_mod" ); diff --git a/src/character_modifier.h b/src/character_modifier.h index a0a39ea89388e..580924956f1cd 100644 --- a/src/character_modifier.h +++ b/src/character_modifier.h @@ -2,13 +2,20 @@ #ifndef CATA_SRC_CHARACTER_MODIFIER_H #define CATA_SRC_CHARACTER_MODIFIER_H +#include +#include +#include +#include #include #include "bodypart.h" -#include "json.h" #include "translation.h" #include "type_id.h" +class Character; +class JsonObject; +template class generic_factory; + struct character_modifier { public: enum mod_type { diff --git a/src/character_morale.cpp b/src/character_morale.cpp index 657541bcd9919..4e72a34dcd008 100644 --- a/src/character_morale.cpp +++ b/src/character_morale.cpp @@ -1,7 +1,29 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "bodypart.h" +#include "calendar.h" +#include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "debug.h" +#include "effect.h" +#include "map_iterator.h" #include "messages.h" #include "morale.h" -#include "map_iterator.h" +#include "morale_types.h" +#include "pimpl.h" +#include "type_id.h" +#include "units.h" + +class item; +struct itype; static const efftype_id effect_took_prozac( "took_prozac" ); static const efftype_id effect_took_xanax( "took_xanax" ); diff --git a/src/character_oracle.cpp b/src/character_oracle.cpp index cfb3c240f1915..cf0a8928ce806 100644 --- a/src/character_oracle.cpp +++ b/src/character_oracle.cpp @@ -1,15 +1,17 @@ -#include +#include "character_oracle.h" + #include #include #include "behavior.h" +#include "bodypart.h" #include "character.h" -#include "character_oracle.h" #include "item.h" #include "itype.h" #include "make_static.h" #include "ret_val.h" #include "type_id.h" +#include "units.h" #include "value_ptr.h" #include "weather.h" diff --git a/src/character_oracle.h b/src/character_oracle.h index d73d63f7215ec..9b721e350652e 100644 --- a/src/character_oracle.h +++ b/src/character_oracle.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_CHARACTER_ORACLE_H #define CATA_SRC_CHARACTER_ORACLE_H -#include +#include #include "behavior_oracle.h" diff --git a/src/character_proficiency.cpp b/src/character_proficiency.cpp index 152092e44e035..b408d0a79c4c1 100644 --- a/src/character_proficiency.cpp +++ b/src/character_proficiency.cpp @@ -1,7 +1,20 @@ +#include +#include +#include +#include +#include +#include + #include "cached_options.h" +#include "calendar.h" #include "character.h" +#include "enums.h" +#include "event.h" #include "event_bus.h" +#include "pimpl.h" #include "proficiency.h" +#include "translations.h" +#include "type_id.h" bool Character::has_proficiency( const proficiency_id &prof ) const { diff --git a/src/city.cpp b/src/city.cpp index a6e54d8893a41..1fa3f21e6010f 100644 --- a/src/city.cpp +++ b/src/city.cpp @@ -1,17 +1,19 @@ -#include "city.h" // IWYU pragma: associated - -#include // for max -#include // for set -#include // for vector -#include "coordinates.h" // for point_om_omt, point_abs_om, trig_dist -#include "debug.h" // for realDebugmsg, debugmsg -#include "generic_factory.h" // for mandatory, optional, generic_factory -#include "options.h" // for get_option -#include "rng.h" // for rng - -#include "cube_direction.h" -#include "omdata.h" -#include "overmap.h" +#include "city.h" + +#include +#include +#include +#include + +#include "coordinates.h" +#include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "generic_factory.h" +#include "init.h" +#include "json_error.h" +#include "options.h" +#include "rng.h" #include "text_snippets.h" generic_factory &get_city_factory() diff --git a/src/city.h b/src/city.h index 458df9067a95e..d02a4d6b77455 100644 --- a/src/city.h +++ b/src/city.h @@ -2,13 +2,12 @@ #ifndef CATA_SRC_CITY_H #define CATA_SRC_CITY_H -#include // for string, basic_string -#include // for vector +#include +#include +#include -#include "coordinates.h" // for operator==, point_om_omt, point_abs_om, coo... -#include "overmap_types.h" -#include "point.h" // for point -#include "type_id.h" // for city_id, string_id +#include "coordinates.h" +#include "type_id.h" class JsonObject; template class generic_factory; diff --git a/src/climbing.cpp b/src/climbing.cpp index 3007dff95509b..92683e2ce8c01 100644 --- a/src/climbing.cpp +++ b/src/climbing.cpp @@ -1,23 +1,23 @@ -#include -#include -#include - #include "climbing.h" -#include "cata_assert.h" +#include +#include +#include +#include + +#include "cata_utility.h" #include "character.h" #include "creature_tracker.h" -#include "enum_conversions.h" -#include "enums.h" -#include "game.h" +#include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "int_id.h" -#include "json.h" +#include "init.h" +#include "json_error.h" #include "map.h" -#include "string_formatter.h" -#include "vehicle.h" #include "vpart_position.h" +template struct enum_traits; static const climbing_aid_id climbing_aid_default( "default" ); diff --git a/src/climbing.h b/src/climbing.h index 5fc33e47b7257..f9399400c5e56 100644 --- a/src/climbing.h +++ b/src/climbing.h @@ -2,22 +2,19 @@ #ifndef CATA_SRC_CLIMBING_H #define CATA_SRC_CLIMBING_H -#include -#include -#include -#include -#include +#include +#include +#include #include +#include +#include -#include "calendar.h" #include "point.h" #include "translation.h" #include "type_id.h" -class JsonObject; class Character; -class map; -struct tripoint; +class JsonObject; /** * A "Climbing Aid" as defined here is any one trait, mutation, tool, furniture terrain, technique diff --git a/src/clothing_mod.cpp b/src/clothing_mod.cpp index f88bb1c6667bb..a9992152263bc 100644 --- a/src/clothing_mod.cpp +++ b/src/clothing_mod.cpp @@ -4,14 +4,16 @@ #include #include #include -#include #include #include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" #include "item.h" -#include "json.h" +#include "json_error.h" namespace { diff --git a/src/clothing_mod.h b/src/clothing_mod.h index 51de04008e5f6..fd899bbcf6698 100644 --- a/src/clothing_mod.h +++ b/src/clothing_mod.h @@ -4,10 +4,12 @@ #include #include -#include +#include +#include +#include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/clzones.cpp b/src/clzones.cpp index 2f9fea54d1096..41c0d446ee011 100644 --- a/src/clzones.cpp +++ b/src/clzones.cpp @@ -5,28 +5,34 @@ #include #include #include -#include #include #include -#include +#include "avatar.h" +#include "calendar.h" +#include "cata_path.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" +#include "color.h" #include "construction.h" #include "construction_group.h" -#include "cursesdef.h" #include "debug.h" #include "faction.h" +#include "field_type.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "game_constants.h" #include "generic_factory.h" #include "iexamine.h" +#include "init.h" #include "item.h" #include "item_category.h" +#include "item_group.h" #include "item_pocket.h" #include "item_search.h" #include "itype.h" #include "json.h" -#include "line.h" +#include "json_error.h" #include "localized_comparator.h" #include "make_static.h" #include "map.h" diff --git a/src/clzones.h b/src/clzones.h index fb31b1d93a498..3b578ff352366 100644 --- a/src/clzones.h +++ b/src/clzones.h @@ -2,25 +2,24 @@ #ifndef CATA_SRC_CLZONES_H #define CATA_SRC_CLZONES_H -#include #include -#include +#include #include #include #include #include #include +#include #include #include #include #include -#include "memory_fast.h" +#include "coordinates.h" +#include "cuboid_rectangle.h" #include "point.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -#include "avatar.h" -#include "map.h" class JsonObject; class JsonOut; diff --git a/src/color.cpp b/src/color.cpp index e13913239316d..eb325c8d031f7 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -1,18 +1,21 @@ #include "color.h" -#include // for std::count +#include +#include +#include #include #include +#include #include #include -#include - #include "cata_path.h" #include "cata_utility.h" #include "cursesdef.h" #include "debug.h" #include "filesystem.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "input_context.h" #include "json.h" #include "output.h" @@ -20,6 +23,7 @@ #include "point.h" #include "rng.h" #include "string_formatter.h" +#include "translations.h" #include "ui.h" #include "ui_manager.h" #if !(defined(TILES) || defined(WIN32)) diff --git a/src/color.h b/src/color.h index 006fbc90acaf1..bddf649a54040 100644 --- a/src/color.h +++ b/src/color.h @@ -3,12 +3,12 @@ #define CATA_SRC_COLOR_H #include -#include #include #include +#include #include -#include "translations.h" +#include "translation.h" #define all_colors get_all_colors() diff --git a/src/compatibility.h b/src/compatibility.h index c2aeef6572200..f65a214663f45 100644 --- a/src/compatibility.h +++ b/src/compatibility.h @@ -7,6 +7,7 @@ #include #include #include +#include // Some older standard libraries don't have all their classes // nothrow-move-assignable when you might expect them to be. diff --git a/src/computer.cpp b/src/computer.cpp index 8ececeb2b8521..fe6bd0360cb73 100644 --- a/src/computer.cpp +++ b/src/computer.cpp @@ -1,14 +1,19 @@ #include "computer.h" -#include -#include +#include #include +#include #include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "json.h" +#include "json_error.h" #include "output.h" +#include "talker.h" #include "talker_furniture.h" +#include "translation.h" #include "translations.h" template struct enum_traits; diff --git a/src/computer.h b/src/computer.h index 44bad4c0045e3..e388a8be18841 100644 --- a/src/computer.h +++ b/src/computer.h @@ -2,19 +2,20 @@ #ifndef CATA_SRC_COMPUTER_H #define CATA_SRC_COMPUTER_H -#include +#include +#include #include #include #include #include "calendar.h" #include "point.h" -#include "talker.h" #include "type_id.h" class JsonObject; class JsonOut; class JsonValue; +class talker; enum computer_action { COMPACT_NULL = 0, diff --git a/src/computer_session.cpp b/src/computer_session.cpp index 0332621013d46..1eab99a47d163 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -1,6 +1,7 @@ #include "computer_session.h" #include +#include #include #include #include @@ -12,9 +13,9 @@ #include "calendar.h" #include "character.h" #include "character_id.h" -#include "computer.h" #include "colony.h" #include "color.h" +#include "computer.h" #include "coordinate_conversions.h" #include "coordinates.h" #include "creature.h" @@ -31,9 +32,11 @@ #include "game_inventory.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "item.h" #include "item_location.h" #include "line.h" +#include "localized_comparator.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -42,6 +45,8 @@ #include "monster.h" #include "mtype.h" #include "mutation.h" +#include "npc.h" +#include "omdata.h" #include "options.h" #include "output.h" #include "overmap.h" @@ -55,6 +60,7 @@ #include "string_formatter.h" #include "text_snippets.h" #include "timed_event.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "type_id.h" diff --git a/src/computer_session.h b/src/computer_session.h index a54412adccd58..0fdeb1764589f 100644 --- a/src/computer_session.h +++ b/src/computer_session.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_COMPUTER_SESSION_H #define CATA_SRC_COMPUTER_SESSION_H -#include #include +#include #include #include diff --git a/src/condition.cpp b/src/condition.cpp index 25812e6df4b67..2686e2d6040ad 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -1,39 +1,54 @@ #include "condition.h" +#include +#include #include +#include #include #include #include #include #include +#include #include +#include #include +#include #include #include #include +#include #include #include "action.h" #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" #include "coordinates.h" -#include "dialogue.h" #include "debug.h" +#include "dialogue.h" #include "dialogue_helpers.h" +#include "effect.h" +#include "effect_on_condition.h" #include "enum_conversions.h" +#include "enum_traits.h" +#include "faction.h" #include "field.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "generic_factory.h" #include "global_vars.h" #include "item.h" #include "item_category.h" -#include "json.h" -#include "kill_tracker.h" +#include "item_location.h" +#include "json_error.h" #include "line.h" #include "map.h" +#include "map_iterator.h" #include "mapdata.h" #include "martialarts.h" #include "math_parser.h" @@ -41,6 +56,8 @@ #include "mtype.h" #include "mutation.h" #include "npc.h" +#include "options.h" +#include "output.h" #include "overmap.h" #include "overmapbuffer.h" #include "point.h" @@ -48,16 +65,24 @@ #include "profession.h" #include "ranged.h" #include "recipe_groups.h" +#include "rng.h" +#include "string_formatter.h" #include "talker.h" +#include "translation.h" +#include "translations.h" #include "type_id.h" #include "units.h" #include "vehicle.h" +#include "viewer.h" #include "vpart_position.h" +#include "weather.h" #include "widget.h" #include "worldfactory.h" +class Creature; class basecamp; class recipe; +struct mapgen_arguments; static const efftype_id effect_currently_busy( "currently_busy" ); diff --git a/src/condition.h b/src/condition.h index 6cd825bc3d49d..87d2eba8f87c5 100644 --- a/src/condition.h +++ b/src/condition.h @@ -3,15 +3,22 @@ #define CATA_SRC_CONDITION_H #include -#include +#include #include +#include #include -#include "dialogue.h" +#include "calendar.h" +#include "coordinates.h" #include "dialogue_helpers.h" -#include "mission.h" +#include "global_vars.h" class JsonObject; +class JsonValue; +class translation; +struct dialogue; +template struct enum_traits; + namespace dialogue_data { const std::unordered_set &simple_string_conds(); diff --git a/src/construction.cpp b/src/construction.cpp index 71fda59891469..4c60add16b5eb 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -20,21 +20,25 @@ #include "construction_category.h" #include "construction_group.h" #include "coordinates.h" +#include "creature.h" #include "cursesdef.h" #include "debug.h" #include "enums.h" #include "event.h" #include "event_bus.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "input.h" #include "input_context.h" #include "inventory.h" #include "item.h" -#include "iteminfo_query.h" #include "item_group.h" #include "item_stack.h" +#include "iteminfo_query.h" #include "iuse.h" +#include "json_error.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -50,9 +54,13 @@ #include "requirements.h" #include "rng.h" #include "skill.h" +#include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation_cache.h" +#include "translations.h" #include "trap.h" +#include "ui.h" #include "ui_manager.h" #include "uistate.h" #include "units.h" diff --git a/src/construction.h b/src/construction.h index 1a55e139babf8..5d96879fdc822 100644 --- a/src/construction.h +++ b/src/construction.h @@ -3,10 +3,8 @@ #define CATA_SRC_CONSTRUCTION_H #include -#include #include #include -#include #include #include #include @@ -16,7 +14,7 @@ #include "coordinates.h" #include "game_constants.h" #include "item.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class Character; @@ -30,7 +28,6 @@ class window; } // namespace catacurses class JsonObject; class nc_color; -struct tripoint; struct partial_con { int counter = 0; diff --git a/src/construction_category.cpp b/src/construction_category.cpp index 0bb2369835199..69ea3df4adefd 100644 --- a/src/construction_category.cpp +++ b/src/construction_category.cpp @@ -2,8 +2,11 @@ #include +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" namespace { diff --git a/src/construction_category.h b/src/construction_category.h index 80bb00ad2dd0f..67beb51009b13 100644 --- a/src/construction_category.h +++ b/src/construction_category.h @@ -3,10 +3,12 @@ #define CATA_SRC_CONSTRUCTION_CATEGORY_H #include -#include +#include +#include +#include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/construction_group.cpp b/src/construction_group.cpp index f2732d976b4ee..e063be848f391 100644 --- a/src/construction_group.cpp +++ b/src/construction_group.cpp @@ -2,8 +2,11 @@ #include +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" namespace { diff --git a/src/construction_group.h b/src/construction_group.h index 7b91a509a289a..c581d58a68ae4 100644 --- a/src/construction_group.h +++ b/src/construction_group.h @@ -3,10 +3,12 @@ #define CATA_SRC_CONSTRUCTION_GROUP_H #include -#include +#include +#include +#include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/consumption.cpp b/src/consumption.cpp index d8c71428b2642..2796a2039f47f 100644 --- a/src/consumption.cpp +++ b/src/consumption.cpp @@ -2,21 +2,29 @@ #include #include #include -#include +#include +#include +#include +#include #include +#include +#include #include #include +#include +#include #include "addiction.h" #include "avatar.h" -#include "bionics.h" +#include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" #include "color.h" #include "contents_change_handler.h" -#include "craft_command.h" +#include "creature.h" #include "debug.h" +#include "dialogue.h" #include "effect.h" #include "effect_on_condition.h" #include "enums.h" @@ -25,12 +33,16 @@ #include "flag.h" #include "flat_set.h" #include "game.h" +#include "game_constants.h" #include "item.h" #include "item_category.h" +#include "item_components.h" +#include "item_location.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" #include "line.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" #include "material.h" @@ -41,14 +53,18 @@ #include "npc.h" #include "options.h" #include "pickup.h" +#include "pimpl.h" #include "recipe.h" #include "recipe_dictionary.h" #include "requirements.h" +#include "ret_val.h" #include "rng.h" #include "stomach.h" #include "string_formatter.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" #include "units.h" #include "value_ptr.h" #include "visitable.h" diff --git a/src/contents_change_handler.cpp b/src/contents_change_handler.cpp index 468ef03afdae4..ccc6153812933 100644 --- a/src/contents_change_handler.cpp +++ b/src/contents_change_handler.cpp @@ -1,6 +1,15 @@ #include "character.h" #include "contents_change_handler.h" +#include + +#include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "item_pocket.h" +#include "json.h" +#include "json_error.h" + void contents_change_handler::add_unsealed( const item_location &loc ) { if( std::find( unsealed.begin(), unsealed.end(), loc ) == unsealed.end() ) { diff --git a/src/contents_change_handler.h b/src/contents_change_handler.h index 8b6ecd9935c2b..d38e421f9a412 100644 --- a/src/contents_change_handler.h +++ b/src/contents_change_handler.h @@ -2,11 +2,12 @@ #ifndef CATA_SRC_CONTENTS_CHANGE_HANDLER_H #define CATA_SRC_CONTENTS_CHANGE_HANDLER_H -#include #include #include "item_location.h" +class Character; +class JsonOut; class JsonValue; /** diff --git a/src/coordinates.cpp b/src/coordinates.cpp index 4d9032a53e1e3..e13fd8a9c8c60 100644 --- a/src/coordinates.cpp +++ b/src/coordinates.cpp @@ -1,5 +1,7 @@ #include "coordinates.h" +#include + void real_coords::fromabs( const point &abs ) { const point norm( std::abs( abs.x ), std::abs( abs.y ) ); diff --git a/src/coordinates.h b/src/coordinates.h index 1d4a58b7cdabf..71d7b143d0b2f 100644 --- a/src/coordinates.h +++ b/src/coordinates.h @@ -2,18 +2,23 @@ #ifndef CATA_SRC_COORDINATES_H #define CATA_SRC_COORDINATES_H -#include -#include +#include +#include #include +#include +#include +#include +#include +#include #include "coordinate_conversions.h" #include "cuboid_rectangle.h" -#include "enums.h" +#include "debug.h" #include "game_constants.h" -#include "line.h" +#include "line.h" // IWYU pragma: keep #include "point.h" -#include "debug.h" +class JsonOut; class JsonValue; enum class direction : unsigned; diff --git a/src/craft_command.cpp b/src/craft_command.cpp index f8b83f0cc4696..d67b60d3260cd 100644 --- a/src/craft_command.cpp +++ b/src/craft_command.cpp @@ -7,26 +7,39 @@ #include #include #include +#include #include "activity_actor_definitions.h" #include "character.h" #include "crafting.h" #include "debug.h" #include "enum_conversions.h" +#include "enum_traits.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game_constants.h" #include "inventory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" +#include "item_location.h" +#include "item_pocket.h" +#include "itype.h" #include "json.h" +#include "line.h" +#include "map.h" #include "map_iterator.h" #include "output.h" +#include "pocket_type.h" #include "recipe.h" #include "requirements.h" #include "translations.h" #include "type_id.h" #include "uistate.h" -#include "vpart_range.h" +#include "vehicle.h" #include "visitable.h" +#include "vpart_position.h" static const itype_id itype_candle( "candle" ); diff --git a/src/craft_command.h b/src/craft_command.h index 4a508ebf3eb9d..ea61a6741398c 100644 --- a/src/craft_command.h +++ b/src/craft_command.h @@ -2,20 +2,22 @@ #ifndef CATA_SRC_CRAFT_COMMAND_H #define CATA_SRC_CRAFT_COMMAND_H -#include -#include +#include #include +#include #include #include "point.h" #include "recipe.h" -#include "requirements.h" #include "type_id.h" class Character; +class JsonObject; class JsonOut; class item; class read_only_visitable; +struct item_comp; +struct tool_comp; template struct enum_traits; /** diff --git a/src/crafting.cpp b/src/crafting.cpp index 1c6cb2e2cd890..8062bac5dbade 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -6,32 +6,34 @@ #include #include #include -#include +#include #include #include #include -#include #include -#include #include -#include -#include #include #include #include "activity_actor_definitions.h" #include "activity_handlers.h" +#include "activity_type.h" #include "avatar.h" -#include "bionics.h" #include "calendar.h" #include "cata_assert.h" #include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "character_id.h" #include "colony.h" #include "color.h" +#include "coordinates.h" #include "craft_command.h" #include "crafting_gui.h" +#include "creature.h" #include "debug.h" +#include "dialogue.h" +#include "effect_on_condition.h" #include "enum_traits.h" #include "enums.h" #include "faction.h" @@ -42,11 +44,13 @@ #include "handle_liquid.h" #include "inventory.h" #include "item.h" +#include "item_components.h" #include "item_location.h" #include "item_stack.h" #include "itype.h" #include "iuse.h" #include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" #include "map_selector.h" @@ -69,6 +73,7 @@ #include "rng.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "talker.h" #include "translations.h" #include "type_id.h" #include "ui.h" diff --git a/src/crafting_gui.cpp b/src/crafting_gui.cpp index aa22408cf63f3..0b9aeb86ea176 100644 --- a/src/crafting_gui.cpp +++ b/src/crafting_gui.cpp @@ -7,9 +7,13 @@ #include #include #include +#include #include #include +#include #include +#include +#include #include #include @@ -17,18 +21,27 @@ #include "cata_utility.h" #include "catacharset.h" #include "character.h" +#include "character_id.h" #include "color.h" #include "crafting.h" +#include "cuboid_rectangle.h" #include "cursesdef.h" #include "debug.h" #include "display.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "game_constants.h" #include "game_inventory.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" +#include "inventory_ui.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "itype.h" #include "localized_comparator.h" #include "options.h" @@ -41,6 +54,8 @@ #include "skill.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" +#include "translation_cache.h" #include "translations.h" #include "type_id.h" #include "ui.h" diff --git a/src/crafting_gui.h b/src/crafting_gui.h index 14e393e300b2b..0e2039bbe1d85 100644 --- a/src/crafting_gui.h +++ b/src/crafting_gui.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_CRAFTING_GUI_H #define CATA_SRC_CRAFTING_GUI_H -#include #include +#include #include #include "type_id.h" diff --git a/src/creature.cpp b/src/creature.cpp index 553996dae0376..c7e2ace516fb7 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -13,11 +13,15 @@ #include #include "anatomy.h" -#include "avatar.h" +#include "body_part_set.h" #include "cached_options.h" #include "calendar.h" #include "cata_assert.h" +#include "cata_utility.h" +#include "cata_variant.h" #include "character.h" +#include "character_attire.h" +#include "character_id.h" #include "color.h" #include "creature_tracker.h" #include "cursesdef.h" @@ -28,20 +32,26 @@ #include "enums.h" #include "event.h" #include "event_bus.h" +#include "explosion.h" #include "field.h" #include "flat_set.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "item.h" -#include "json.h" +#include "item_location.h" +#include "json_error.h" #include "level_cache.h" #include "lightmap.h" #include "line.h" #include "localized_comparator.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "mattack_common.h" +#include "mdarray.h" #include "messages.h" #include "monster.h" #include "morale_types.h" @@ -52,11 +62,13 @@ #include "point.h" #include "projectile.h" #include "rng.h" +#include "sounds.h" #include "talker.h" #include "talker_avatar.h" #include "talker_character.h" -#include "talker_npc.h" #include "talker_monster.h" +#include "talker_npc.h" +#include "translation.h" #include "translations.h" #include "units.h" #include "value_ptr.h" diff --git a/src/creature.h b/src/creature.h index a56dd7ab96339..666fefab05d5a 100644 --- a/src/creature.h +++ b/src/creature.h @@ -4,62 +4,64 @@ #include #include -#include +#include +#include #include +#include +#include +#include #include +#include #include #include +#include #include #include -#include #include "bodypart.h" +#include "calendar.h" #include "compatibility.h" +#include "coordinates.h" #include "damage.h" #include "debug.h" #include "effect_source.h" #include "enums.h" -#include "field_type.h" #include "pimpl.h" +#include "point.h" #include "string_formatter.h" -#include "talker.h" #include "type_id.h" #include "units_fwd.h" #include "viewer.h" #include "weakpoint.h" -class monster; -class translation; -template struct enum_traits; - -enum game_message_type : int; -class effect; -class effects_map; -class nc_color; - -namespace catacurses -{ -class window; -} // namespace catacurses -class body_part_set; class Character; class JsonObject; class JsonOut; class anatomy; class avatar; +class body_part_set; +class character_id; +class effect; +class effects_map; class field; class field_entry; +class item; +class monster; +class nc_color; class npc; -class time_duration; -struct point; -struct tripoint; - -struct mon_flag; +class talker; +class translation; +namespace catacurses +{ +class window; +} // namespace catacurses struct dealt_projectile_attack; +struct field_immunity_data; struct pathfinding_settings; struct projectile; struct projectile_attack_results; struct trap; +template struct enum_traits; using anatomy_id = string_id; diff --git a/src/creature_tracker.cpp b/src/creature_tracker.cpp index 168953c289b80..55e0ae599e003 100644 --- a/src/creature_tracker.cpp +++ b/src/creature_tracker.cpp @@ -1,7 +1,10 @@ #include "creature_tracker.h" #include +#include #include +#include +#include #include #include "avatar.h" @@ -10,12 +13,15 @@ #include "flood_fill.h" #include "game.h" #include "map.h" +#include "mapdata.h" +#include "maptile_fwd.h" #include "mongroup.h" #include "monster.h" #include "mtype.h" #include "npc.h" +#include "point.h" #include "string_formatter.h" -#include "submap.h" +#include "submap.h" // IWYU pragma: keep #include "type_id.h" static const efftype_id effect_ridden( "ridden" ); diff --git a/src/creature_tracker.h b/src/creature_tracker.h index e4c1d6e8e1e31..82bc163d878cf 100644 --- a/src/creature_tracker.h +++ b/src/creature_tracker.h @@ -4,23 +4,22 @@ #include #include -#include #include -#include #include +#include +#include #include #include "coordinates.h" #include "creature.h" -#include "memory_fast.h" -#include "point.h" #include "type_id.h" -class game; class JsonArray; class JsonOut; +class game; class monster; class npc; +struct tripoint; class creature_tracker { diff --git a/src/damage.cpp b/src/damage.cpp index 138cbca410822..e6c5a569019d7 100644 --- a/src/damage.cpp +++ b/src/damage.cpp @@ -1,8 +1,8 @@ #include "damage.h" #include -#include #include +#include #include #include #include @@ -10,15 +10,21 @@ #include "bodypart.h" #include "cata_utility.h" #include "creature.h" -#include "effect_on_condition.h" #include "debug.h" +#include "dialogue.h" +#include "effect_on_condition.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" +#include "init.h" #include "item.h" #include "json.h" +#include "json_error.h" #include "make_static.h" #include "monster.h" #include "mtype.h" -#include "translations.h" +#include "subbodypart.h" +#include "talker.h" #include "units.h" static std::map> sorted_order_lists; diff --git a/src/damage.h b/src/damage.h index fceb3a04bbf98..7c8a4d9d9a502 100644 --- a/src/damage.h +++ b/src/damage.h @@ -2,27 +2,28 @@ #ifndef CATA_SRC_DAMAGE_H #define CATA_SRC_DAMAGE_H -#include -#include #include -#include #include +#include +#include +#include +#include #include #include "calendar.h" #include "color.h" #include "flat_set.h" +#include "translation.h" #include "type_id.h" #include "units.h" +class Creature; class JsonArray; class JsonObject; class JsonOut; class JsonValue; -class Creature; class item; class monster; -template struct enum_traits; struct damage_type { damage_type_id id; diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 837c377f45ad5..41efa1ea1b9d0 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -1,14 +1,12 @@ #include "debug_menu.h" -#include -// IWYU pragma: no_include -// IWYU pragma: no_include - #include #include #include +#include +#include +#include #include -#include // IWYU pragma: keep #include #include #include @@ -16,8 +14,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -25,25 +25,32 @@ #include "achievement.h" #include "action.h" +#include "activity_tracker.h" #include "avatar.h" #include "bionics.h" #include "bodypart.h" #include "calendar.h" #include "calendar_ui.h" +#include "cata_assert.h" #include "cata_path.h" #include "cata_utility.h" #include "catacharset.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "character_martial_arts.h" #include "city.h" #include "clzones.h" #include "color.h" +#include "coordinate_conversions.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" +#include "cursesdef.h" #include "debug.h" +#include "dialogue.h" #include "dialogue_chatbin.h" +#include "dialogue_helpers.h" #include "display.h" #include "effect.h" #include "effect_on_condition.h" @@ -52,7 +59,7 @@ #include "event.h" #include "event_bus.h" #include "faction.h" -#include "filesystem.h" // IWYU pragma: keep +#include "filesystem.h" #include "game.h" #include "game_constants.h" #include "game_inventory.h" @@ -64,16 +71,19 @@ #include "item_group.h" #include "item_location.h" #include "itype.h" +#include "json.h" #include "localized_comparator.h" #include "magic.h" #include "map.h" #include "map_extras.h" +#include "map_iterator.h" #include "mapgen.h" #include "mapgendata.h" #include "martialarts.h" #include "memory_fast.h" #include "messages.h" #include "mission.h" +#include "mongroup.h" #include "monster.h" #include "morale_types.h" #include "mtype.h" @@ -86,19 +96,24 @@ #include "overmap.h" #include "overmap_ui.h" #include "overmapbuffer.h" -#include "path_info.h" // IWYU pragma: keep +#include "path_info.h" #include "pimpl.h" #include "point.h" #include "popup.h" #include "recipe_dictionary.h" #include "relic.h" +#include "requirements.h" +#include "ret_val.h" #include "skill.h" #include "sounds.h" #include "stomach.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "talker.h" #include "tgz_archiver.h" +#include "timed_event.h" #include "trait_group.h" +#include "translation.h" #include "translations.h" #include "try_parse_integer.h" #include "type_id.h" @@ -145,7 +160,6 @@ static const trait_id trait_NONE( "NONE" ); #if defined(TILES) #include "sdl_wrappers.h" #endif -#include "timed_event.h" #define dbg(x) DebugLog((x),D_GAME) << __FILE__ << ":" << __LINE__ << ": " diff --git a/src/debug_menu.h b/src/debug_menu.h index b7816f8b41689..4c33c3aba4794 100644 --- a/src/debug_menu.h +++ b/src/debug_menu.h @@ -5,14 +5,13 @@ #include #include #include -#include -#include // IWYU pragma: keep +#include +#include +class Character; struct tripoint; template struct enum_traits; -class Character; - namespace debug_menu { diff --git a/src/dependency_tree.h b/src/dependency_tree.h index d99b60ce6cfd9..d635a4a8a0981 100644 --- a/src/dependency_tree.h +++ b/src/dependency_tree.h @@ -2,9 +2,9 @@ #ifndef CATA_SRC_DEPENDENCY_TREE_H #define CATA_SRC_DEPENDENCY_TREE_H -#include #include #include +#include #include #include "type_id.h" diff --git a/src/descriptions.cpp b/src/descriptions.cpp index 4073a1632c124..0b7ae1fa91f4b 100644 --- a/src/descriptions.cpp +++ b/src/descriptions.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "avatar.h" @@ -18,9 +19,11 @@ #include "mod_manager.h" #include "output.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "ui_manager.h" #include "viewer.h" +#include "vpart_position.h" static const skill_id skill_survival( "survival" ); diff --git a/src/dialogue_chatbin.h b/src/dialogue_chatbin.h index eb5bf702364c3..ebc9139a0eccc 100644 --- a/src/dialogue_chatbin.h +++ b/src/dialogue_chatbin.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_DIALOGUE_CHATBIN_H #define CATA_SRC_DIALOGUE_CHATBIN_H -#include +#include #include #include "translation.h" diff --git a/src/dialogue_helpers.cpp b/src/dialogue_helpers.cpp index 9a165f08aaa18..ab373b0e554d0 100644 --- a/src/dialogue_helpers.cpp +++ b/src/dialogue_helpers.cpp @@ -3,6 +3,8 @@ #include #include "dialogue.h" +#include "rng.h" +#include "talker.h" template std::optional maybe_read_var_value( diff --git a/src/dialogue_helpers.h b/src/dialogue_helpers.h index 8c060a40e3ba6..f9ce81fa70fbd 100644 --- a/src/dialogue_helpers.h +++ b/src/dialogue_helpers.h @@ -2,18 +2,26 @@ #ifndef CATA_SRC_DIALOGUE_HELPERS_H #define CATA_SRC_DIALOGUE_HELPERS_H +#include +#include #include +#include +#include +#include +#include #include +#include #include "calendar.h" +#include "debug.h" #include "global_vars.h" -#include "math_parser.h" -#include "rng.h" #include "translation.h" -#include "type_id.h" -struct dialogue; +class JsonArray; +class JsonObject; +class math_exp; class npc; +struct dialogue; using talkfunction_ptr = std::add_pointer_t; using dialogue_fun_ptr = std::add_pointer_t; diff --git a/src/dialogue_win.h b/src/dialogue_win.h index 42ca157aca668..9988af02bb7d2 100644 --- a/src/dialogue_win.h +++ b/src/dialogue_win.h @@ -2,22 +2,18 @@ #ifndef CATA_SRC_DIALOGUE_WIN_H #define CATA_SRC_DIALOGUE_WIN_H -#include -#include -#include +#include +#include +#include #include #include "color.h" -#include "cuboid_rectangle.h" #include "cursesdef.h" +#include "output.h" class input_context; -class multiline_list; -class scrolling_text_view; class ui_adaptor; -struct multiline_list_entry; - struct talk_data { nc_color color; std::string hotkey_desc; diff --git a/src/disease.cpp b/src/disease.cpp index ad6915cfa26eb..805f0e7865e37 100644 --- a/src/disease.cpp +++ b/src/disease.cpp @@ -1,8 +1,11 @@ #include "disease.h" #include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" namespace { diff --git a/src/disease.h b/src/disease.h index 4663b45adbee5..5f6961bb13bb4 100644 --- a/src/disease.h +++ b/src/disease.h @@ -2,10 +2,11 @@ #ifndef CATA_SRC_DISEASE_H #define CATA_SRC_DISEASE_H -#include -#include #include #include +#include +#include +#include #include #include "calendar.h" diff --git a/src/display.cpp b/src/display.cpp index 39f7bdfe90660..488f8eacd8543 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1,22 +1,48 @@ +#include "display.h" + +#include +#include +#include +#include +#include +#include +#include +#include + #include "avatar.h" #include "bodygraph.h" +#include "calendar.h" +#include "cata_utility.h" #include "character.h" -#include "display.h" +#include "creature.h" +#include "debug.h" +#include "effect.h" #include "game.h" -#include "options.h" -#include "overmap.h" -#include "overmapbuffer.h" +#include "game_constants.h" #include "make_static.h" #include "map.h" #include "mood_face.h" #include "move_mode.h" #include "mtype.h" #include "npc.h" +#include "omdata.h" +#include "options.h" +#include "output.h" +#include "overmap.h" +#include "overmapbuffer.h" +#include "string_formatter.h" +#include "subbodypart.h" +#include "tileray.h" #include "timed_event.h" +#include "translation.h" +#include "translations.h" +#include "type_id.h" +#include "units.h" #include "units_utility.h" #include "vehicle.h" #include "vpart_position.h" #include "weather.h" +#include "weather_type.h" static const efftype_id effect_bite( "bite" ); static const efftype_id effect_bleed( "bleed" ); diff --git a/src/display.h b/src/display.h index d6fc43a3945ba..dcd8f7e626e2d 100644 --- a/src/display.h +++ b/src/display.h @@ -2,10 +2,26 @@ #ifndef CATA_SRC_DISPLAY_H #define CATA_SRC_DISPLAY_H -#include - +#include +#include +#include +#include +#include + +#include "bodypart.h" +#include "color.h" +#include "coordinates.h" +#include "point.h" #include "widget.h" +class Character; +class Creature; +class avatar; +class mood_face; +class time_point; +class translation; +class vehicle; + // These are the supported data variables for coloring bodygraphs. enum class bodygraph_var : int { hp = 0, // hitpoints @@ -16,9 +32,6 @@ enum class bodygraph_var : int { last // END OF ENUMS }; -class avatar; -class Character; - struct disp_overmap_cache { private: tripoint_abs_omt _center; diff --git a/src/distraction_manager.cpp b/src/distraction_manager.cpp index 9476687030fc6..875889daa64ad 100644 --- a/src/distraction_manager.cpp +++ b/src/distraction_manager.cpp @@ -1,6 +1,8 @@ #include "distraction_manager.h" +#include #include +#include #include "color.h" #include "cursesdef.h" diff --git a/src/distribution.cpp b/src/distribution.cpp index 8704331d5c575..78f333e4081b8 100644 --- a/src/distribution.cpp +++ b/src/distribution.cpp @@ -1,10 +1,14 @@ #include "distribution.h" -#include +#include #include +#include -#include "json.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" +#include "memory_fast.h" #include "rng.h" +#include "string_formatter.h" struct int_distribution_impl { virtual ~int_distribution_impl() = default; diff --git a/src/distribution.h b/src/distribution.h index 7ea080cc572d4..4d97e4ff51551 100644 --- a/src/distribution.h +++ b/src/distribution.h @@ -2,9 +2,10 @@ #ifndef CATA_SRC_DISTRIBUTION_H #define CATA_SRC_DISTRIBUTION_H +#include #include -#include "memory_fast.h" +#include "memory_fast.h" // IWYU pragma: keep struct int_distribution_impl; class JsonValue; diff --git a/src/do_turn.cpp b/src/do_turn.cpp index 94b3737d8ea19..7bebbeaa6703a 100644 --- a/src/do_turn.cpp +++ b/src/do_turn.cpp @@ -4,38 +4,75 @@ #include #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "action.h" +#include "activity_type.h" #include "avatar.h" #include "bionics.h" #include "cached_options.h" #include "calendar.h" +#include "cata_variant.h" +#include "clzones.h" +#include "coordinates.h" +#include "debug.h" +#include "enums.h" +#include "event.h" #include "event_bus.h" #include "explosion.h" #include "game.h" +#include "game_constants.h" #include "gamemode.h" #include "help.h" #include "input.h" #include "input_context.h" +#include "line.h" #include "make_static.h" #include "map.h" +#include "map_iterator.h" #include "mapbuffer.h" +#include "mapdata.h" #include "memorial_logger.h" #include "messages.h" #include "mission.h" +#include "monster.h" #include "mtype.h" #include "music.h" #include "npc.h" #include "options.h" #include "output.h" #include "overmapbuffer.h" +#include "pimpl.h" +#include "player_activity.h" +#include "point.h" #include "popup.h" +#include "rng.h" #include "scent_map.h" #include "sdlsound.h" +#include "sounds.h" #include "stats_tracker.h" +#include "string_formatter.h" #include "timed_event.h" +#include "translations.h" +#include "type_id.h" +#include "ui.h" #include "ui_manager.h" +#include "units.h" #include "vehicle.h" #include "vpart_position.h" +#include "weather.h" +#include "weather_type.h" #include "worldfactory.h" static const activity_id ACT_AUTODRIVE( "ACT_AUTODRIVE" ); diff --git a/src/drawing_primitives.cpp b/src/drawing_primitives.cpp index 2b67f8784700f..8916c5adeef57 100644 --- a/src/drawing_primitives.cpp +++ b/src/drawing_primitives.cpp @@ -1,7 +1,7 @@ #include "drawing_primitives.h" #include -#include +#include #include #include "line.h" diff --git a/src/editmap.cpp b/src/editmap.cpp index 4d343c7556e98..7b9bc1ad03daa 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -1,6 +1,8 @@ #include "editmap.h" +#include #include +#include #include #include #include @@ -12,7 +14,6 @@ #include #include "avatar.h" -#include "cached_options.h" // IWYU pragma: keep #include "calendar.h" #include "cata_scope_helpers.h" #include "cata_utility.h" @@ -25,20 +26,24 @@ #include "cuboid_rectangle.h" #include "debug.h" #include "debug_menu.h" +#include "demangle.h" #include "field.h" #include "field_type.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "input_context.h" +#include "input_enums.h" #include "item.h" #include "level_cache.h" #include "line.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" +#include "mdarray.h" #include "memory_fast.h" #include "monster.h" -#include "mtype.h" +#include "mtype.h" // IWYU pragma: keep #include "npc.h" #include "omdata.h" #include "options.h" @@ -49,6 +54,7 @@ #include "string_formatter.h" #include "string_input_popup.h" #include "submap.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "ui.h" diff --git a/src/editmap.h b/src/editmap.h index 9811c859192a7..6f65bd86962df 100644 --- a/src/editmap.h +++ b/src/editmap.h @@ -3,16 +3,15 @@ #define CATA_SRC_EDITMAP_H #include -#include #include #include #include +#include #include #include "color.h" #include "coordinates.h" #include "cursesdef.h" -#include "memory_fast.h" #include "point.h" #include "type_id.h" diff --git a/src/effect.cpp b/src/effect.cpp index e8c9827b47d54..7c6e71de6bb5b 100644 --- a/src/effect.cpp +++ b/src/effect.cpp @@ -1,26 +1,35 @@ #include "effect.h" #include -#include #include +#include #include +#include #include #include "bodypart.h" -#include "color.h" +#include "cata_assert.h" +#include "cata_variant.h" #include "character.h" +#include "color.h" #include "debug.h" #include "effect_source.h" +#include "enum_conversions.h" #include "enums.h" #include "event.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" #include "json.h" +#include "json_error.h" +#include "magic_enchantment.h" #include "messages.h" #include "output.h" #include "rng.h" #include "string_formatter.h" #include "text_snippets.h" +#include "translations.h" #include "units.h" static const efftype_id effect_bandaged( "bandaged" ); diff --git a/src/effect.h b/src/effect.h index eb0bf0073e7cf..519bd4291bc36 100644 --- a/src/effect.h +++ b/src/effect.h @@ -2,11 +2,14 @@ #ifndef CATA_SRC_EFFECT_H #define CATA_SRC_EFFECT_H -#include +#include +#include +#include #include +#include #include #include -#include +#include #include #include #include @@ -14,17 +17,16 @@ #include "calendar.h" #include "color.h" #include "effect_source.h" +#include "enums.h" +#include "event.h" #include "flat_set.h" -#include "hash_utils.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -class effect_type; - -enum game_message_type : int; -enum class event_type : int; +class Character; class JsonObject; class JsonOut; +class effect_type; /** Handles the large variety of weed messages. */ void weed_msg( Character &p ); diff --git a/src/effect_on_condition.cpp b/src/effect_on_condition.cpp index dd687bb5d3acd..970303a79b3e4 100644 --- a/src/effect_on_condition.cpp +++ b/src/effect_on_condition.cpp @@ -1,14 +1,33 @@ #include "effect_on_condition.h" +#include +#include +#include +#include +#include +#include + #include "avatar.h" +#include "calendar.h" #include "cata_utility.h" +#include "cata_variant.h" #include "character.h" +#include "character_id.h" #include "condition.h" +#include "creature.h" +#include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "generic_factory.h" -#include "npctalk.h" +#include "init.h" +#include "mod_tracker.h" +#include "npc.h" +#include "output.h" #include "scenario.h" +#include "string_formatter.h" #include "talker.h" +#include "translations.h" #include "type_id.h" namespace io diff --git a/src/effect_on_condition.h b/src/effect_on_condition.h index 06742d03a8394..eb0208d9f538b 100644 --- a/src/effect_on_condition.h +++ b/src/effect_on_condition.h @@ -2,19 +2,30 @@ #ifndef CATA_SRC_EFFECT_ON_CONDITION_H #define CATA_SRC_EFFECT_ON_CONDITION_H +#include +#include +#include #include -#include -#include +#include +#include +#include +#include -#include "calendar.h" -#include "condition.h" #include "dialogue.h" +#include "dialogue_helpers.h" #include "event.h" -#include "json.h" +#include "event_subscriber.h" #include "type_id.h" -template -class generic_factory; +class Character; +class JsonObject; +class JsonValue; +class talker; +class time_duration; +struct effect_on_condition; +template struct enum_traits; +template class generic_factory; + enum eoc_type { ACTIVATION, RECURRING, diff --git a/src/effect_source.cpp b/src/effect_source.cpp index 4b8f77e549442..10b2004c8f80c 100644 --- a/src/effect_source.cpp +++ b/src/effect_source.cpp @@ -1,9 +1,10 @@ +#include "effect_source.h" + #include #include "character.h" #include "creature.h" #include "debug.h" -#include "effect_source.h" #include "faction.h" #include "game.h" #include "monster.h" diff --git a/src/effect_source.h b/src/effect_source.h index 0e3f3cd801a9c..4b7ba50abb4fb 100644 --- a/src/effect_source.h +++ b/src/effect_source.h @@ -2,10 +2,10 @@ #ifndef CATA_SRC_EFFECT_SOURCE_H #define CATA_SRC_EFFECT_SOURCE_H -#include #include #include "character_id.h" +#include "item.h" #include "type_id.h" class Character; diff --git a/src/emit.cpp b/src/emit.cpp index 37971d496d482..de611503beff6 100644 --- a/src/emit.cpp +++ b/src/emit.cpp @@ -5,7 +5,8 @@ #include #include "debug.h" -#include "json.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" static std::map emits_all; diff --git a/src/event.cpp b/src/event.cpp index 50d0440356848..ae050638c1aa1 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -2,6 +2,8 @@ #include +#include "debug.h" + namespace io { diff --git a/src/event.h b/src/event.h index 64620ef2664f7..6e2fb2990e07b 100644 --- a/src/event.h +++ b/src/event.h @@ -4,17 +4,15 @@ #include #include -#include #include #include -#include +#include #include #include +#include #include "calendar.h" #include "cata_variant.h" -#include "debug.h" -#include "enum_conversions.h" template struct enum_traits; diff --git a/src/event_bus.cpp b/src/event_bus.cpp index d1f42ab5d1f50..a1cf43a0d6cdb 100644 --- a/src/event_bus.cpp +++ b/src/event_bus.cpp @@ -1,11 +1,19 @@ #include "event_bus.h" #include - +#include +#include +#include +#include +#include + +#include "calendar.h" +#include "cata_variant.h" #include "creature.h" #include "debug.h" #include "event_subscriber.h" -#include "talker.h" +#include "item_location.h" +#include "talker.h" // IWYU pragma: keep event_subscriber::~event_subscriber() { diff --git a/src/event_bus.h b/src/event_bus.h index d11bdf0ee6587..a69eec4a1c195 100644 --- a/src/event_bus.h +++ b/src/event_bus.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_EVENT_BUS_H #define CATA_SRC_EVENT_BUS_H -#include +#include #include #include "event.h" @@ -10,7 +10,6 @@ class Creature; class event_subscriber; class item_location; -class talker; class event_bus { diff --git a/src/event_field_transformations.cpp b/src/event_field_transformations.cpp index 275b5acebb4d1..f91d0b9a41adc 100644 --- a/src/event_field_transformations.cpp +++ b/src/event_field_transformations.cpp @@ -1,13 +1,18 @@ #include "event_field_transformations.h" +#include +#include +#include #include #include +#include "coordinates.h" #include "itype.h" #include "mapdata.h" #include "mtype.h" #include "omdata.h" #include "overmapbuffer.h" +#include "point.h" #include "type_id.h" static std::vector flags_of_itype( const cata_variant &v ) diff --git a/src/event_field_transformations.h b/src/event_field_transformations.h index b8a0dda475109..e8c4362a88535 100644 --- a/src/event_field_transformations.h +++ b/src/event_field_transformations.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_EVENT_FIELD_TRANSFORMATIONS_H #define CATA_SRC_EVENT_FIELD_TRANSFORMATIONS_H -#include +#include #include #include diff --git a/src/event_statistics.cpp b/src/event_statistics.cpp index 0251b0299ebe7..5eee5840c7b61 100644 --- a/src/event_statistics.cpp +++ b/src/event_statistics.cpp @@ -1,27 +1,31 @@ #include "event_statistics.h" #include +#include #include #include -#include #include #include #include -#include #include #include +#include "cata_assert.h" #include "cata_variant.h" #include "debug.h" #include "enum_conversions.h" #include "enums.h" #include "event.h" #include "event_field_transformations.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" #include "output.h" #include "stats_tracker.h" #include "string_formatter.h" +#include "translations.h" // event_transformation and event_statistic are both objects defined in json // and managed via generic_factory. diff --git a/src/event_statistics.h b/src/event_statistics.h index 2d11323b4207e..57785b1e1cf2d 100644 --- a/src/event_statistics.h +++ b/src/event_statistics.h @@ -2,14 +2,15 @@ #ifndef CATA_SRC_EVENT_STATISTICS_H #define CATA_SRC_EVENT_STATISTICS_H -#include #include +#include +#include #include +#include #include #include "clone_ptr.h" -#include "string_id.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class cata_variant; diff --git a/src/explosion.cpp b/src/explosion.cpp index 53753ae020497..586b894b4e7dd 100644 --- a/src/explosion.cpp +++ b/src/explosion.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -21,7 +21,6 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "color.h" #include "creature.h" #include "creature_tracker.h" @@ -31,18 +30,21 @@ #include "fault.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "itype.h" -#include "json.h" #include "line.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "math_defines.h" +#include "mdarray.h" #include "messages.h" #include "mongroup.h" #include "monster.h" @@ -54,11 +56,11 @@ #include "rng.h" #include "shadowcasting.h" #include "sounds.h" -#include "string_formatter.h" #include "translations.h" #include "trap.h" #include "type_id.h" #include "units.h" +#include "value_ptr.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/explosion.h b/src/explosion.h index 2a7efd2832192..2d72ecbe8449d 100644 --- a/src/explosion.h +++ b/src/explosion.h @@ -4,16 +4,16 @@ #include #include -#include +#include #include #include "coordinates.h" -#include "point.h" #include "type_id.h" class Creature; class JsonObject; class nc_color; +struct tripoint; struct shrapnel_data { int casing_mass = 0; diff --git a/src/faction.cpp b/src/faction.cpp index f3ee30c8c9d1f..7a8e691efc2d6 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -1,5 +1,6 @@ #include "faction.h" +#include #include #include #include @@ -12,6 +13,7 @@ #include "avatar.h" #include "basecamp.h" +#include "calendar.h" #include "catacharset.h" #include "character.h" #include "coordinates.h" @@ -19,11 +21,15 @@ #include "debug.h" #include "display.h" #include "faction_camp.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "input_context.h" +#include "json_error.h" #include "line.h" #include "localized_comparator.h" +#include "mission_companion.h" #include "mtype.h" #include "npc.h" #include "output.h" @@ -31,10 +37,11 @@ #include "pimpl.h" #include "point.h" #include "skill.h" -#include "text_snippets.h" #include "string_formatter.h" +#include "text_snippets.h" #include "translations.h" #include "type_id.h" +#include "ui.h" #include "ui_manager.h" static const faction_id faction_no_faction( "no_faction" ); diff --git a/src/faction.h b/src/faction.h index f542f82b9f816..464918d46b379 100644 --- a/src/faction.h +++ b/src/faction.h @@ -3,8 +3,8 @@ #define CATA_SRC_FACTION_H #include -#include #include +#include #include #include #include @@ -14,9 +14,10 @@ #include "character_id.h" #include "color.h" +#include "generic_factory.h" #include "shop_cons_rate.h" #include "stomach.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "vitamin.h" @@ -40,8 +41,6 @@ class JsonValue; class faction; class npc; -struct dialogue; - using faction_id = string_id; namespace npc_factions diff --git a/src/fault.cpp b/src/fault.cpp index a64762ea7d669..e754b84fd275e 100644 --- a/src/fault.cpp +++ b/src/fault.cpp @@ -1,10 +1,14 @@ #include "fault.h" +#include #include +#include "assign.h" #include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "json_error.h" #include "requirements.h" static std::map faults_all; diff --git a/src/fault.h b/src/fault.h index bef284b9e8ba3..a0054375f1285 100644 --- a/src/fault.h +++ b/src/fault.h @@ -2,21 +2,19 @@ #ifndef CATA_SRC_FAULT_H #define CATA_SRC_FAULT_H -#include #include #include -#include -#include +#include #include #include #include "calendar.h" #include "memory_fast.h" -#include "translations.h" +#include "requirements.h" +#include "translation.h" #include "type_id.h" class JsonObject; -struct requirement_data; class fault_fix { diff --git a/src/field.h b/src/field.h index 8225ae3384b9e..f5755364384d9 100644 --- a/src/field.h +++ b/src/field.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_FIELD_H #define CATA_SRC_FIELD_H -#include #include +#include #include #include "calendar.h" diff --git a/src/flag.cpp b/src/flag.cpp index 656d90d885d16..4ead11c439f35 100644 --- a/src/flag.cpp +++ b/src/flag.cpp @@ -1,8 +1,11 @@ #include "flag.h" #include "debug.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "generic_factory.h" -#include "json.h" +#include "init.h" +#include "json_error.h" #include "type_id.h" const flag_id flag_ABLATIVE_LARGE( "ABLATIVE_LARGE" ); diff --git a/src/flag.h b/src/flag.h index a036b627e0348..2c0c7a4827488 100644 --- a/src/flag.h +++ b/src/flag.h @@ -2,12 +2,13 @@ #ifndef CATA_SRC_FLAG_H #define CATA_SRC_FLAG_H -#include #include #include +#include +#include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/flexbuffer_cache.cpp b/src/flexbuffer_cache.cpp index cc01311c33476..f506a5810106f 100644 --- a/src/flexbuffer_cache.cpp +++ b/src/flexbuffer_cache.cpp @@ -1,26 +1,28 @@ #include "flexbuffer_cache.h" #include +#include #include +#include #include -#include +#include #include -#include +#include +#include #include +#include +#include +#include +#include +#include -#include +#include #include -#include - -#include #include "cata_utility.h" #include "filesystem.h" #include "json.h" -#include "json_error.h" -#include "make_static.h" #include "mmap_file.h" -#include "path_info.h" namespace { From 2e783998d266f1768b588a0f9762a438f1b6e0eb Mon Sep 17 00:00:00 2001 From: Brambor Date: Mon, 15 Apr 2024 12:01:05 +0200 Subject: [PATCH 2/3] iwyu: snowball changes --- src/lightmap.cpp | 1 + src/magic.cpp | 1 + src/magic_enchantment.cpp | 1 + src/mapgen.cpp | 1 + src/martialarts.cpp | 1 + src/math_parser_diag.cpp | 1 + src/math_parser_diag_value.h | 1 + src/newcharacter.cpp | 1 + src/npc_class.cpp | 1 + src/shop_cons_rate.cpp | 1 + src/suffer.cpp | 1 + src/teleport.cpp | 1 + src/trap.cpp | 1 + src/vehicle.h | 1 + tests/act_build_test.cpp | 1 + tests/clzones_test.cpp | 1 + tests/enchantments_test.cpp | 1 + tests/item_pocket_test.cpp | 1 + tests/mapgen_place_vehicles_test.cpp | 1 + tests/vision_test.cpp | 1 + tests/zones_custom_test.cpp | 1 + 21 files changed, 21 insertions(+) diff --git a/src/lightmap.cpp b/src/lightmap.cpp index 5088a896c0941..256ce42bb104a 100644 --- a/src/lightmap.cpp +++ b/src/lightmap.cpp @@ -12,6 +12,7 @@ #include #include +#include "avatar.h" #include "cached_options.h" #include "calendar.h" #include "cata_utility.h" diff --git a/src/magic.cpp b/src/magic.cpp index dbe826cd8f1de..9386d0f677722 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -31,6 +31,7 @@ #include "item.h" #include "json.h" #include "line.h" +#include "localized_comparator.h" #include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index c73c98728a234..c1dc73e50ec7c 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -10,6 +10,7 @@ #include "condition.h" #include "creature.h" #include "debug.h" +#include "dialogue.h" #include "dialogue_helpers.h" #include "enum_conversions.h" #include "enums.h" diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 193cb91af1b6e..52dfd1fa566de 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -14,6 +14,7 @@ #include #include "all_enum_values.h" +#include "avatar.h" #include "calendar.h" #include "cata_assert.h" #include "catacharset.h" diff --git a/src/martialarts.cpp b/src/martialarts.cpp index 9bc38fc73f74f..2f1a892928e04 100644 --- a/src/martialarts.cpp +++ b/src/martialarts.cpp @@ -12,6 +12,7 @@ #include "character.h" #include "character_martial_arts.h" #include "color.h" +#include "condition.h" #include "cursesdef.h" #include "damage.h" #include "debug.h" diff --git a/src/math_parser_diag.cpp b/src/math_parser_diag.cpp index 146395375a472..48cecdb57cdbb 100644 --- a/src/math_parser_diag.cpp +++ b/src/math_parser_diag.cpp @@ -12,6 +12,7 @@ #include "magic.h" #include "map.h" #include "math_parser_diag_value.h" +#include "mongroup.h" #include "mtype.h" #include "options.h" #include "string_input_popup.h" diff --git a/src/math_parser_diag_value.h b/src/math_parser_diag_value.h index b9aae16c8a3f4..d30eb0bdfc7e3 100644 --- a/src/math_parser_diag_value.h +++ b/src/math_parser_diag_value.h @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index de128aa4c7100..3d94da0452c8d 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -40,6 +40,7 @@ #include "make_static.h" #include "mapsharing.h" #include "martialarts.h" +#include "mission.h" #include "mod_manager.h" #include "monster.h" #include "mutation.h" diff --git a/src/npc_class.cpp b/src/npc_class.cpp index 2065d07749125..2c9a39af5d8ea 100644 --- a/src/npc_class.cpp +++ b/src/npc_class.cpp @@ -12,6 +12,7 @@ #include "avatar.h" #include "condition.h" #include "debug.h" +#include "dialogue.h" #include "generic_factory.h" #include "item_group.h" #include "itype.h" diff --git a/src/shop_cons_rate.cpp b/src/shop_cons_rate.cpp index 79c6b9c009b48..1e8fc2128f7ea 100644 --- a/src/shop_cons_rate.cpp +++ b/src/shop_cons_rate.cpp @@ -2,6 +2,7 @@ #include "avatar.h" #include "condition.h" +#include "dialogue.h" #include "generic_factory.h" #include "item_category.h" #include "item_group.h" diff --git a/src/suffer.cpp b/src/suffer.cpp index ce6e3c60061da..684d128a79442 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -25,6 +25,7 @@ #include "debug.h" #include "display.h" #include "effect.h" +#include "effect_on_condition.h" #include "enums.h" #include "event.h" #include "event_bus.h" diff --git a/src/teleport.cpp b/src/teleport.cpp index 788bde891a0ad..e67fdac44dc9f 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -10,6 +10,7 @@ #include "creature.h" #include "creature_tracker.h" #include "debug.h" +#include "effect.h" #include "enums.h" #include "event.h" #include "event_bus.h" diff --git a/src/trap.cpp b/src/trap.cpp index 291dc4b65690d..5d327f79ec7c1 100644 --- a/src/trap.cpp +++ b/src/trap.cpp @@ -17,6 +17,7 @@ #include "line.h" #include "map.h" #include "map_iterator.h" +#include "messages.h" #include "point.h" #include "rng.h" #include "string_formatter.h" diff --git a/src/vehicle.h b/src/vehicle.h index eec829442e8d6..39947555a3be0 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -32,6 +32,7 @@ #include "item_location.h" #include "item_stack.h" #include "line.h" +#include "map.h" #include "point.h" #include "tileray.h" #include "type_id.h" diff --git a/tests/act_build_test.cpp b/tests/act_build_test.cpp index ed3780d7f87da..73296ca51f123 100644 --- a/tests/act_build_test.cpp +++ b/tests/act_build_test.cpp @@ -2,6 +2,7 @@ #include #include "activity_handlers.h" +#include "avatar.h" #include "avatar_action.h" #include "cata_catch.h" #include "activity_type.h" diff --git a/tests/clzones_test.cpp b/tests/clzones_test.cpp index aea3b52ebabbf..897705506c3eb 100644 --- a/tests/clzones_test.cpp +++ b/tests/clzones_test.cpp @@ -2,6 +2,7 @@ #include #include "activity_actor_definitions.h" +#include "avatar.h" #include "cata_catch.h" #include "clzones.h" #include "item.h" diff --git a/tests/enchantments_test.cpp b/tests/enchantments_test.cpp index 49b3c97020627..369b6a0f32f91 100644 --- a/tests/enchantments_test.cpp +++ b/tests/enchantments_test.cpp @@ -12,6 +12,7 @@ #include "npc.h" #include "player_helpers.h" #include "point.h" +#include "talker.h" #include "type_id.h" #include "units.h" diff --git a/tests/item_pocket_test.cpp b/tests/item_pocket_test.cpp index 6148c57fd937f..ea6be270971cd 100644 --- a/tests/item_pocket_test.cpp +++ b/tests/item_pocket_test.cpp @@ -9,6 +9,7 @@ #include #include "activity_actor_definitions.h" +#include "avatar.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" diff --git a/tests/mapgen_place_vehicles_test.cpp b/tests/mapgen_place_vehicles_test.cpp index 5f6f698129bae..d554a5e505230 100644 --- a/tests/mapgen_place_vehicles_test.cpp +++ b/tests/mapgen_place_vehicles_test.cpp @@ -1,3 +1,4 @@ +#include "avatar.h" #include "cata_catch.h" #include "game.h" #include "map.h" diff --git a/tests/vision_test.cpp b/tests/vision_test.cpp index a3130b19446d4..613576dc2b36b 100644 --- a/tests/vision_test.cpp +++ b/tests/vision_test.cpp @@ -7,6 +7,7 @@ #include #include +#include "avatar.h" #include "cached_options.h" #include "calendar.h" #include "cata_catch.h" diff --git a/tests/zones_custom_test.cpp b/tests/zones_custom_test.cpp index 76603d643c904..c4abe6b88a46a 100644 --- a/tests/zones_custom_test.cpp +++ b/tests/zones_custom_test.cpp @@ -1,5 +1,6 @@ #include "cata_catch.h" #include "clzones.h" +#include "map.h" #include "map_helpers.h" static const zone_type_id zone_type_LOOT_CUSTOM( "LOOT_CUSTOM" ); From 9091ace070900940c1639188c8da068b4cb09353 Mon Sep 17 00:00:00 2001 From: Brambor Date: Mon, 15 Apr 2024 12:02:14 +0200 Subject: [PATCH 3/3] iwyu: snowball changes (iwyu disagrees) --- src/math_parser_diag_value.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math_parser_diag_value.h b/src/math_parser_diag_value.h index d30eb0bdfc7e3..a80b54629f4a9 100644 --- a/src/math_parser_diag_value.h +++ b/src/math_parser_diag_value.h @@ -9,6 +9,7 @@ #include #include "dialogue_helpers.h" +#include "math_parser.h" class math_exp; struct dialogue;