* Tests are run once for each mod set
* Remove the --mods from build matrix param and add it to test invocation
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* In tests, eoc_selector cancels or selects 1st item
* Return a simpler lambda early instead if we're in test mode
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* Update .github/workflows/matrix.yml
* Add custom event send function support to check_memorial
* Fix npc_talk_test sender
* Fix stats_tracker_test sender
* astyle
* May it please the IWYU
* stats_tracker_count_events test: clean up any existing mobs before test
* stats_tracker_count_events test: well why don't we clean the whole map instead
* stats_tracker_count_events test: just nuke the world
* Apply suggestion from @Maleclypse
* Apply suggestion from @Maleclypse
* I guess spawn_test_monster lives in map_helpers_tests.h now
* Wy u iwyu
* Update matrix.yml
* Update matrix.yml
* More XE test fixes: golem weight, remove plantkin_parchment from known bad uncrafts
* Nutrition info and repair info tests use their own test items
* Appease clang-tidy
* Replace nether cult cabin headless corpse with headful due to mystery test failures
* Strix talons don't need NAILS as prerequisite
* Add Xedra field office to terrain coverage test whitelist
---------
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
Split the 364 day year up into months as so:
The seasons are
Dec, Jan, Feb, Mar -> Winter
Mar, Apr, May, Jun -> Spring
Jun, Jul, Aug, Sep -> Summer
Sep, Oct, Nov, Dec -> Autumn
The first month of each season has 31 days, and the first day of each
season is on the 20th of the first month (the last day on the 19th of
the last month).
For season settings other than 364 days, season display is broken and I
need to consider how to implement this correctly.
Some additional logic was needed for the year transition correctly on
Dec 31 -> Jan 1, because turn_zero is the first day of Spring.
The calendar code isn't too gross, but is still gross.
* Change u_profession to f_has_profession, update EOCs, remove redundant context val
Remove a couple of other unused redundant context variables while I'm here
* Update /tests events
* Added UI element to select and return time point
+ utilized it in debug menu
* Reworked scenario calendar
- removed `random` calendar entries from scenarion definitions
- allowed free selection of cataclysm and game start dates in new character menu
- updated UI in new character menu
- fixed start date related tests
- updated docs
It is useful for event_transformations to be able to check for a value
which is in a given set. Previously it could only check for one
specific value.
Allow this via a new constraint type "equals_any".
Use this to expand the "What are they hiding?" achievement to also count
the central lab finale (previously it only counted the hardcoded lab
finale).
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.
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.
Most instances of deserialize instantly convert from JsonIn to the
object oriented interface, usually JsonObject. Using the improved
interface on JsonIn we can change the signatures on these to more
accurately reflect what they're doing. Also help get rid of JsonIn
which is not supported in the binary json refactor this unblocks.
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.
event_field_transformation functions shouldn't need to be written
defensively against invalid inputs. So, pre-check the arguments and
don't call the function if an argument is invalid and non-empty.
We're already relying on them supporting empty arguments, so we can't
filter those out. Maybe in the future those empty arguments should be
replaced by null instead.
When building achievements_trackers for past_games_info, these
achievements_trackers were setting up their full-featured infrastructure
of watchers. This serves no purpose, because no new events will occur
for these past games, and we only really want these
achievements_trackers for their info about already-completed
achievements.
Add a new options to achievements_tracker to disable these watchers and
use it in this case.
* Make scent_map private in game
* Make timed events private in game.
* Make achievements tracker private in game
* Make memoial tracker private in game
* Make scenario variable private in game
Previously we kept only counts of events (partitioned by field values).
Convert that int to a new class event_summary, which also contains
time_points for the oldest and newest events in each partition.
We want the game_start event to record everything relevant about the
starting character (the sorts of things people expect to see in a
memorial log).
This adds some of those things:
* Name
* Grammatical gender
* Profession
* Game version
Centralizing this data in move modes makes maintenance and changes
easier.
Also, it cleans up the code (see avatar::set_movement_mode).
Move mode switching restrictions could use some more nuance, instead of
just being restricted to running.
The `movement_mode_is` function may seem redundant with the `is_x`
functions, but it returns true only if the move mode is the exact
provided move mode, where the `is_running` function returns true based
on type - this means a theoretical new sprinting mode satisfies
is_running, but fails `movement_mode_is( move_mode_running )`.
The move_mode_color function in panels was odd - it returned light_gray
if the mode was walking, but in the only place it was used, it wasn't
called if the move mode was walking, and white was used instead.
The vehicle follow distance was previously just 400 times the move speed
multiplier of the move mode. Let's future proof it and make it like
that, so that we don't get caught by it in the future adding a new move
mode.