* 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 >-<
* sanify electronic
* more
* more
* fix few errors
* fix itemgroups after changes, fix battery test
* more test fixes
* add missed comment on heavy flashlight
* add shoulder strap because it's cool and it's part of irl item
* more test fixes
* Update tests/item_autopickup_test.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* and more
* and more
* more
* more
* more
* further tweaks of heavy-duty flashlight
* more
* more
* more
* more
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* update batteries
* migrate all removed batteries, clean up
* sprinkle occasional batteries in boxes around the world
* fix density test fail
* fix wrong chemistry on some batteries
* obsolete medium_disposable_cell, replace current medium_battery_cell(D battery) with modern 18650 battery
* fix redefinition of 'itype_medium_battery_cell'
* remove light_disposable_cell, change the names and descriptions of baterries to match what they are
* migrate light_disposable_cell, astyle battery density test
* fix test failures
* swap battery to please ups crafting test
* swap ids for tool batteries to make more sense (and not replace all ids in the entire game)
* migrate removed vehicle parts, fix unreachable cell recipe
* fix missed afs battery
* Reword some insertion errors
Volume error to "item is too big" to match the others, ammo error to the more gramatically correct "item is not ammunition"
* Show insertion errors in `put_into_container`
* Make plastic beverage bags start sealed
* Adjust bucket-handling in `pick_one_up`
* Don't use bucket-style containers in `character_best_pocket` test
* Show insert failure reasons by giving ret_val to all `can_contain` functions
* Show un-insertable items in insert menu, with denial reasons
* Remove `move_content`
I kept this outdated function around after my first AIM revision, worried it would be needed for something. I'm more confident now - it's unnecessary.
* Declaration order
* Reword parent pocket failures
* Protect against infinite loop when adding items
* Prompt player to remove bucket contents in drop action and AIM move
* Update src/advanced_inv.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Double spaces
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Convert integer parsing test to use normal TEST_CASEs
* Rename test name too similar to another
* Test to enforce normalized test names
* Normalize TEST_CASE names (scripted)
ret_val<T> is supossed to be a T value *and also* a bool (and optionally
a string message). However, all uses of ret_val<bool> were setting the
two bool values to the same thing. Really they wanted ret_val<void>,
but that didn't compile.
Make it so that ret_val<void> does work, and replace all uses of
ret_val<bool> with it. I found zero instances of 'true' ret_val<bool>
where a bool was being conveyed in addition to the success/failure info.
* use item instead of item_id
* watertight containers are reloadable
* mods are reloadable, same_contents checks contents of contents
* add large number of new tests
Our string_id constants were a mixture of temporaries, locals, and
globals. Pull them all out as globals, for consistency and efficiency.
The efficiency comes from the fact that each string_id instance caches
its respective int_id, and sharing one instance means that value need
not be recomputed.
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++
When a modded tool is turned on, ensure the battery remains installed,
and the tool remains modded to accept that kind of battery.
Covers issues #42764 and #42854
* Don't compare bool to int
This was giving a warning on Visual Studio.
* Make memorial test platform-independent
It failed on platforms with a different newline character.