* move all crafting_inventory operations to temp_crafting_inventory class
* fix rebase errors
move some functions back to where they were
adjust operator=
use pseudo items and item_location in form_inventory
remove obsolete comment
* add pseudo item dedup
* check for empty item_location in visitable
* iterate over copies items as well
* pseudo item
* Update temp_crafting_inventory.cpp
* fix some compile errors
* Update craft_attention_test.cpp
* Update temp_crafting_inventory.cpp
* address clang_tidy
* dump non const
* Apply batched suggestions from code review
IWYU
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* IWYU
* IWYU
* clang
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- replaced the avatar fallback in quality_requirement::has with the passed actor
- gave can_make_with_inventory, check_enough_materials and the folded lists an actor
- classified the camp stock queries as actorless and the rest as actor-aware
- read the debug hammerspace trait from the actor rather than the player
- covered provider counting and intrinsic occurrences
* Remove STATIC macro a-f
Fixes a typo in character_armor where a damage type was somehow being implicitly cast to a bool?
* Remove STATIC macro g-i
Trusts a post 0.H todo comment to do with cables, the PR was huge so I'm just hoping this got migrated properly
* Remove STATIC macro j-z
* Remove make_static.h includes
* Cleanup
* Remove STATIC macro /tests
* Remove comments yesterday me left for today me
* Update clang for STATIC macro removal
* Cleanup round 2
* Cleanup round 2
The A-Z before a-z thing gets me every time >-<
The static string_id collections at the start of each cpp file should
have a consistent ordering. This is in particular to permit new ones to
be added automatically by clang-tidy checks.
We've added a check to automatically sort them all. Apply it across the
codebase.
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.
We have some specializations in stringmaker.h, but this feature was only
working intermittently. I finally figured out that was due to an ODR
violation. The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.
Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.
I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
* Change _ctype.h and __locale to cctype and clocale
* Change _wctype.h to cwctype in game.cpp
* Change __functional_base to functional
* Remove libcxx internal headers
* Remove UNIX system headers
* Fix clang-tidy error with -nostdinc++
* Chemistry Recipe fixes (goodbye, concentrated acid!)
* obsoleting LSD and neoprene sheet recipes
* removing the generic acid from the item json, obsoleting the recipes to make them, and adding a migration entry for each of them
this will 100% cause conflicts with the acid rain weather effect and I hope someone will be able to help me out with that tomorrow
itype_id is (presumably) one of the oldest type ids in the game. In
particular, it predates string_id, and was simply a typedef of
std::string.
This is bad for type safety.
Make it be a string_id specialization instead, and update the rest of
the code accordingly.
* Helper script to run IWYU
* Run IWYU
* Update deprecated headers
* Run IWYU again
* Re-suppress cxxabi.h
This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.
* Remove extra SDL header includes
* Fix ime.cpp headers
Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.
* Update game.h
* Move new point.h includes inside #ifdef
* Re-add platform_win.h to mapsharing.cpp
* Apply suggestions from code review
Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>
Fixes#32311.
Fixes#32554.
Each recipe now has a deduped_requirements() in addition to its
requirements, now accessed via simple_requirements().
Each caller has been ported to one or the other as appropriate.
Refactor craftability checks so that the "only needs 5% of charge"
property can now be specified via a flag, to obviate the need to
reconstruct an entire requirements object just for that change.
Limited in-game testing is promising so far.
This is a new class intended to permit refactoring requirement_data to
avoid duplicated items which cause various issues, such as difficulty in
determining whether an item is possible to craft.
This just ads the class and some tests related to it. As yet, it is not
being put to use.