* typified a bit of map.h/cpp + dependents
* demanded changes
* demanded master changes drawn to its conclusion
* second int should be in corresponding location
This check looks for unused return values on a variety of C library
functions.
I resolved most of the warnings by printing out some kind of error
message in the event that the function failed.
Many of them are low-level things whose failure indicates some sort of
serious problem, so the errors are simply printed to stderr, because our
usual error reporting infrastructure might not be available.
* energy_consumption as energy
* units::energy fuel
* units::energy material
* item fuel adjustments
* bionuc reload window
* bionic reload window
* typo
* bionic power from pedaling
* adjust electric vehicle tests
* mods
* mods
* rename some variables
* cleanup
* temp fix bionic
* temp fix treshold
* fuel tests
* adjust mod
* adjust mod
* adjust mod
* rename variable
* migration
* migration
* consumption_per_hour
* fuel does not need to count by charge
* actually is sort of has to
* Density - various object Pt 1
Jewelry, fuel, electric motors, vehicle batteries, bedding, mutagen, tool_armors, clown nose
* Revert battery changes
Revert battery changes for another pull request
* Jewelry, fuel, and test fixes
Added material portions to jewelry, corrected jewelry and fuel to match materials.json, fixed tests
* Implemented suggestions
Reverted enhanced motor weight and added copper material, re-added lead to car battery materials, fixed tests
* Change vehicle batteries
Slight change to lead-acid batteries, buff storage batteries, rename storage and large storage battery, tweak crafting and disassembly of storage batteries, fix radio tower battery requirement
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++
Resolves a TODO on that constructor, and one more TODO elsewhere due to
the resulting refactoring.
time_point was implicitly convertible from int. This led to unclear
code. In particular, the item constructor took a time_point and a
quantity, and these two ints appeared adjacent with no obvious way to
see what they meant at call sites.
Make the constructor explicit, so the conversion is no longer implicit.
Update the rest of the code accordingly.
In most cases switched from 0 to calendar::turn_zero, which is
equivalent. In a couple of places, used start_of_cataclysm instead,
when it seemed more appropriate (such as birthday of toilet water).
It's possible there are more cases which should have been something
other than turn_zero.
* 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
Use the new clang-tidy check to convert a bunch of declarations to
static.
In a few cases, there were 'secret' dependencies being exposed without
headers. Convert those to work via headers instead.
Add test cases for vehicles in reverse, and make sure that vehicles
moving in reverse are not dramatically more efficient than the same
vehicle moving forward.
As part of that, reduce the target speed from 70 mph to 50 mph.
Rework the engine load calculation so that vehicles moving in
reverse apply load based on the effective slowdown, and do not
suddenly become impossibly efficient.