* 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>
- creature_names_sorted comparator in debug_menu now takes pairs by const reference
- enumerate_as_string iterator pair stays by value with NOLINT; idiomatic for STL-style templates
- use_amount_stack template in map.cpp is only used inside the TU
- npc_pickup_from_stack template in npcmove.cpp is only used inside the TU
- silences misc-use-internal-linkage
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.
* 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 >-<
* 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
* fix unobtainable alchemy 5
* initial commit
* finished bits
* make EOC_XE_ALLOW_GIVING_CLASS has a proper id
* add exp gain to perpetual spells
* Thank you, Mal
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
* Update data/mods/Xedra_Evolved/snippets/dreams.json
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
* more magic potential conducts, redo the EoC for small performance win (i hope so)
* wtf why riddles are in vanilla
* better riddles
* comparing instead of assigning
* satisfy analyze-text-changes
* move EOC_NONE from examples to generalized EoCs
* update math syntax
* magic potential from tainted mind
* fix improperly given dreamsmith sequence
* prevent constant grow of magic potential from ps
* tweaks tweaks tweaks to make it work
* fix some stuff, make few failsaves
* update formula, simplify thing a bit
* document code changes
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Make it less easy to obtain the spell
* Update doc/EFFECT_ON_CONDITION.md
* Update doc/NPCs.md
* syntax error fix
---------
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Several of the top-level save files were not providing filenames with
their JSON error messages, because the filename was never passed to the
JsonIn constructor. Arrange for it to be so passed, to improve those
errors and assist with debugging.
* 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++
The mutation_category_trait objects have ids, but they were just
std::strings. Make them be a string_id<mutation_category_trait>
instead.
This is a general move towards type safety, although the specific goal I
wanted to achieve was better validity checking of cata_variants.
* clear achievement tracker
* Guard against rounding errors with Approx()
* Add requirements to wield test.
* Manually set margins for comparison
* Just accept minor variation in results
* Verify that behavioral needs are needed
* Fix oracle checks
* Clear temperature cache in behavior test
* 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
* 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.
Change the intermediate form of the memorial logs (the thing that's
saved in the save directory, not the memorial directory) from plain text
to json.
Primary reason is to allow easier access to the timestamps from the log
as time_points, but also to reduce the amount of custom parsing code we
have in the game (eventually, once we can remove the legacy format).
* blood types
* new items distribution tables
* items: band-aids, IFAK, tourniquet and bleeding stopping power adjustments
* json: obsolete BLEED flag
* docs: update info on effect on bleeding and vitamin counters
* debug menu tool for bleeding self
* obsolete BLOOD flag - more instances
* tourniquet and new bleeding interactions and UI
* unlock damage type bleeding
* allow negative vitamin rates
* blood and redcells loss pools as vitamin counters
* effects: hypovolemia, anemia, redcell_anemia, refurbished bleeding
* cbm: nanobots updated effect on bleeding
* new events for death from bleeding, hypovolemia or fatal loss of red cells
* pause will trigger putting pressure on bleeding wound
* hardcoded effects of hypovolemia, anemias, updated bleeding
* bleeding monsters lose hp, lost staunches bleeding
* obsolete monster melee bleeding, taken over by damage type bleeding
* update for special monster attacks in regard to updated bleeding
* updated NPC reactions to bleeding, hypovolemia
* debug menu bleed self update to upstream/master
* pressure on wound includes wield/broken/encumbered status
* iron deficiency anemia compromises redcells
* make hypovolemia pull water from body
* compact hypovolemia effects
Depending on test ordering, the broke an arm event test could fail, because it would ALSO trigger a message reporting that the "Maintain Structural Integrity" conduct was lost.
These events are intended to flesh out the future game history browser
with useful information, including:
* Which versions of CDDA were used for a game.
* How much real-world time was spent on a game.
* What debug menu options were used during the game.
These seem like things people would be interested to see about their
past games.
When Magiclysm is enabled some of the tests in memorial_test would have
unwanted side-effects which caused the test to fail, such as triggering
achievements. Send some additional events prior to the test events to
flush out those side-effects and make the tests more reliable.
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
* Helper script to run IWYU
* Run IWYU
* Update deprecated headers
* Run IWYU again
* Re-suppress cxxabi.h
This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.
* Remove extra SDL header includes
* Fix ime.cpp headers
Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.
* Update game.h
* Move new point.h includes inside #ifdef
* Re-add platform_win.h to mapsharing.cpp
* Apply suggestions from code review
Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>