- Update all tracked OMTs per tick, not just the player's
- Seed new OMTs from nearest neighbor instead of starting at 0
- Normalize z to 0 everywhere (lookup, storage, save/load)
- Handle old saves with "z" field gracefully
- Add snow_depth_desc widget to default sidebar layout
- Add debug overlay for snow depth (Info -> key 'W')
- Add tests for multi-OMT accumulation, seeding, z-normalization
.. as suggested by the comment in cata_catch.h:
// To avoid ODR violations, it's important that whenever a file includes
// catch.hpp it also includes stringmaker.h, so that all specializations of
// StringMaker match. Therefore, all test code should include catch.hpp via
// this file.
Honestly, i'm not exactly sure how valuable this is, given that we've
been running with the current odr-violating(?) setup for a while nand
not had many issues, but sure, why not.
On the overmap, there is either no information about a tile, or full
information. This is limited, and makes scouting a fairly boring affair
of going to high places with binoculars for full map information, and it
gives a lot of meta information.
Replace that with five levels of vision:
unseen, vague, outlines, details, full.
This just does the grunt work of adding the levels, and working them
through all the various places they're needed.
* Rename fatigue to sleepiness
I feel like this is going to break some stuff?
* seems my upstream was not up to date. fun.
* A few more I missed
* astyle, json style
gangnam style? Is that still a thing?
* docs
* rename fatigue.json
also catches a few bad f+r I missed
* Update itemgroups.json
* fd_fatigue --> fd_reality_tear
* Update data/mods/MindOverMatter/mapgen/microlab_rooms.json
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* missed some fd_sleepiness
* fd_sleepines in tests
I really thought I got these already gr.
* Update doc/MAGIC.md
* some clang fizes
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* remove weakness_to_water, add WEAKNESS_TO_WATER as replacement, fix it not working with negative values
* remove fat_to_max_hp, make FAT_TO_MAX_HP as replacement
* remove healthy_rate, create HEALTHY_RATE as a replacement
* remove scent_mask, adds SCENT_MASK to replace it
* remove consume_time_modifier, make CONSUME_TIME_MOD as replacement
* remove reading_speed_multiplier
* remove overmap_sight and overmap_multiplier
* remove sweat_multiplier, add SWEAT_MULTIPLIER as replacement
* remove vomit_multiplier
* remove stamina_regen_modifier, make STAMINA_REGEN_MOD as replacement
* remove fatigue_regen_modifier, make FATIGUE_REGEN as replacement
* remove fatigue_modifier
* remove noise_modifier
* remove crafting_speed_multiplier
* remove casting_time_multiplier
* remove bionic_mana_penalty
* remove mana_regen_multiplier
* remove mana_multiplier
* remove mana_modifier
* refine water damage to allow float values, make it tick once per second instead of once per minute
* lintin and fixin
* Astyle
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* clang tidy
* Astyle
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* more
* more
* data types are hard
* ill squash it in the future, believe me
* Astyle
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* refine crafting speed calculations
* update tests
* Update tests/mutation_test.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* add identifier to enchantment
* int to double?
* refine mutation OM vision test to check actual OM vision
* Update src/character.cpp
Co-authored-by: mqrause <38702195+mqrause@users.noreply.github.com>
* the last bist of sight test
* final test tweaks
* fix widget test mismatch
* add escape character to fix test
* fix two nocturnal trait
* fix multiple errors
* make new overmap sight test use test mutations, that work all the time (eagleeyed doesn't work at night)
* fix field duplication
* more fixes after merge
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mqrause <38702195+mqrause@users.noreply.github.com>
* Replace the arbitrary body tempurature ints with units::temperature. This does not affect save files or JSON in order to be forwards/backwards compatible, and non-debug displays also use the old format.
* Fix the BMI heat bonus.
* Fix one constant, and remove some uses of auto/default constructor that I missed.
* Replace a C-style cast with a static_cast.
* Refactor the convergence code to be easier to understand, and remove another use of auto I had missed.
* Remove yet more uses of auto. Maybe I have a problem.
* Change ambient temperature calculation be to be closer to the original. Only do the bugged scaling on the delta, not the original ambient temperature.
* 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)
We had this enabled before but it's expanded in the update to LLVM 16,
so this is a bunch more changes.
Mostly these are removing unnecessary temporary objects created for
emplace calls.
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.
These are mostly automated changes. My automation tries to be
conservative, but I did have to do manual fixup of a few things.
I plan to PR the clang-tidy check that automates these changes later,
but I think more changes may be needed before that.
Some of the manual changes:
- Added svto<T> where T is an integer type, which parses integers in
string_views. This is our first use of the low-level C++17 int
conversion functions.
- Added a shortcut to lcmatch for empty queries, to allow for
refactoring overmapbuffer searches.
- Fixed an apparent bug in overmapbuffer::get_notes and get_extras,
where it was inverting the match result. As far as I can tell, these
functions aren't actually used anywhere, so I guess this bug wasn't
breaking anything.
- Allow use of string_view in JSON serialization. Previously these were
misidentified as sequences and appeared as a list of integers rather
than a string.
This clang-tidy check looks for potentially-expensive-to-copy value
parameters which are only used as const values.
If they are only used once, in an assignment or initialization, then
their use will be converted to std::move. This can save a copy in some
cases.
Otherwise, the parameter will be converted to a const reference, which
can also save a copy in some cases.
* I MISSED THE COMPACT SIDEBAR AAAAA
* More work. Added a spacer that crashes the game. Investigating the crash.
* Fixed the crashes with an undocumented flag
* I _said_ JSON tested and linted!
* Text widget string field documented and fixed
* Fixed the compile issue. Remove affected arguments
* Fixed last-resort condition and sidebar issue.
* Astyled widget.cpp
* Clarified docs
* more clarity