- scan_tool_charges checks the type before the filter
- amount_of_internal checks the type before ITEM_BROKEN
- added charges_of_in_tools_counts_ammo_loaded_in_a_tool test
stash starting inv that doesn't fit
fix save load order
initialize string hint in android build to none
reuse free assigned invlet and move it
Update npc.cpp
Update character_inventory.cpp
Update src/avatar.cpp
Update src/npc.cpp
Update src/avatar.cpp
Co-Authored-By: dobbry-vechur <dumbkevin@proton.me>
* typified a bit of map.h/cpp + dependents
* demanded changes
* demanded master changes drawn to its conclusion
* second int should be in corresponding location
* typified a bit of map.h/cpp + some dependents
* Macro crasher found by one compiler!
* demanded changes
* stupid wokaround for demanded changes
* Sort out conflict mess
This test would sometimes fail because the avatar was underground and
couldn't find a suitable spot. clear_avatar ensures that the avatar is
on z-level zero.
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.
* Make `weapon` private
* Update tests
* Rebase
* Appley suggestions
* Fix weapon dorping
* fix weapon saving
* Rename to get_wielded_item
* rename to set_wielded_item
* fixes
* Post rebase fixes
* fixes
* fix weapon saving
* fixes
* more rebase and fixes
* Apply suggestions
* post rebase fixes
* Port code to emplace_back
This is clang-tidy making automated changes to convert push_back into
emplace_back whenever the argument to push_back is either a constructor
call for the type in question of an expression of a type implicitly
convertible to the type in question.
This should eliminate one move-construction of the inserted object for
each call.
* Enable clang-tidy modernize-use-emplace
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++
* Add units::angle and port various code to use it
Add a typesafe angle type. Partly for general type safety but also to
avoid confusion between different measures of angle (radians, degrees,
and arcmin are all used in this codebase.
Convert tileray to use the new type, and deal with the fallout from
other things that depend on tileray.
Most of the changes relate to changing vehicle facing to the new type.
Note that this changes vehicle facing from an integer to a floating
point type, which could cause some behavioural change.
* Include math_defines.h for Window build
Previously we had separate functions closest_points_first and
closest_tripoints_first. We'd like to extend this functionality to
coord_point, but it's easier to do if both the raw underlying functions
have the same name (so the generic wrapper can be the same).
To that end, rename closest_tripoints_first to closest_points_first
(they are chosen between based on overload resolution), and add a
wrapper to allow coord_point to be used similarly.