* 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
* 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>
This was causing a failure on one of my PRs. As best I can tell, the
player had the same local position after teleporting due to a map shift.
Use absolute points so it's not vulnerable to map shift issues like
this.
Reproduces with tests/cata_test --rng-seed=1698113342
'show_available_recipes_with_item_as_an_ingredient,remove_field_fd_fatigue'
before this change.
* add visibility update
* vis update when peeking
* fix autodrive visibility
* revert visibility optimization
* only cache tile visibility on access
* use apparent_light_at to handle visibility cache
* Revert "use apparent_light_at to handle visibility cache"
This reverts commit 37f66fda9e.
* Revert "only cache tile visibility on access"
This reverts commit b52cd59827.
* pos and time visibility invalidation
Co-Authored-By: andrei <68240139+andrei8l@users.noreply.github.com>
* fix peek and look around
* fix tests
---------
Co-authored-by: andrei <68240139+andrei8l@users.noreply.github.com>
This test suffered from a rare failure case. When removing one of the
fd_fatigue fields, the player is teleported. This teleport could move
the map over by one or more submaps, which could bring more fd_fatigue
fields into the map, causing a test failure.
Work around the problem by not checking the entire map for fields; only
check the area where we expect them to be. This entailed quite a lot of
refactoring of the test case.
Also tweak a few other things to make the test more reliable, such as
controlling light levels, and added more messages on test failure to
help with debugging.
* Added monster support and Slime Ocularium
Currently the Ocularium cannot be created, this is intentional - Slimewave is still useful through slime minions from Omnicellular
* Large camera and rendering changes
Makes cameras independent from player vision radius limits, dirties vision cache while cameras are active, and adds better vision falloff to cameras.
In addition, removes recalculation of seen_cache during long activities except on refresh frames - an optimization that arose from camera needs.
* Updates tests, bugfixes player half-seeing monsters
Player was able to detect a monster existed, especially on the compass, but not see their location, when the mosnter was outside of sight_max range (usually 9999, but sometimes much smaller for certain mutations and effects)
* Vision lightcasting now checks sightmax first
Also upped MYOPIC vision radius, preventing an adverse effect of excessive blindness - and somehow making a much nicer vision effect for short-sighted characters.
Mirrors were giving inaccurate vision ranges - also I nerfed mirrors because its now possible to nerf mirrors.
Co-authored-by: bombasticSlacks <dillon.matchett@gmail.com>
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
* Add spell to remove fields, artifact to close tears and artifact spawn
Attempt to re-add functionality to close tear in reality
references #26226, references #42971
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++
* bugfix_line_spell: prevent narrow line spells from being stopped early
Line attack spells with narrow AOE (0 or 1) were being prevented from
actually working as intended. The exception added to the condition
prevents exiting early if the spell is a line attack.
* bugfix_line_spell: Split `spell_effect_area` for testability
Splits spell effect area calculation out of `spell_effect_area` to
allow independent testing without calling the drawing function
`explosion_handler::draw_custom_explosion`
* bugfix_line_spell: Generate test to ensure narrow beam spell consistency