28 Commits

Author SHA1 Message Date
dumb-kevin e4bb943d3b Fix CI skip-detection job refs, Makefile parallel safety, and test tag syntax
- matrix.yml SKIP condition referenced non-existent job names
  (skip-duplicates, skip-duplicates-mods); corrected to match declared
  jobs (skip-duplicates-code, skip-duplicates-data). Same fix for the
  commented emscripten block.
- tests/Makefile batch runs now use --user-dir with a unique PID-based
  path so parallel shard execution doesn't collide on filesystem state.
- Normalized comma-separated TEST_CASE tags to space-separated across
  9 test files (25 declarations). Comma syntax is deprecated in Catch2
  v2 and removed in v3. Also fixed a missing space between adjacent
  tags in throwing_test.cpp.
2026-02-24 21:24:24 +04:00
moxian c44d65a8ae Run IWYU again to pick up the changes 2025-02-11 13:02:19 -08:00
moxian 2ee44002fd Mechanically IWYU the tests
python3 ~/github/include-what-you-use/iwyu_tool.py -j5 -p build $( find
src/ tests/ -maxdepth 1 -name '*.cpp' | grep -v -f
tools/iwyu/bad_files.txt )  --  -Xiwyu --comment_style=long -Xiwyu -
-max_line_length=1000 -Xiwyu --cxx17ns -Xiwyu
--mapping_file=../tools/iwyu/cata.imp   | tee out/iwyu/f-a-01.txt >
/dev/null

followed by

cat out/iwyu/f-a-02.txt | python3
~/github/include-what-you-use/fix_includes.py --reorder --nosafe_headers

followed by manual fixups of <stddef.h> -> <cstddef> and similar.

tests/generic_factory_test.cpp gets mangled very badly (IWYU bug) so
it's excluded from the list.

Code size:
includes:
$ cat obj/tiles/*.inc | wc
 288068  576136 17898260
$ cat tests/obj/tiles/*.inc | wc
 167044  334088 10465766

post-processed source (clang -E):
./make_preproc.sh src/
68567896 177775140 2134075721
./make_preproc.sh tests/
39341957 102891720 1243323710
2025-02-10 00:46:57 -08:00
PatrikLundell 99aeb7b990 Load npcs and deal with their bodies 2025-01-25 09:49:42 +01:00
osuphobia 818c74388a shot dispersion refactor 2025-01-17 23:33:31 +08:00
Procyonae 020dce728d Post rebase astyle 2025-01-10 17:19:45 +00:00
Procyonae 40f0b39e62 Merge branch 'master' into RemoveStringInitialisingItems 2025-01-10 17:00:48 +00:00
osuphobia 60c265e76d Refactor ammo_effect_BOUNCE (#79035)
* make projectile_attack void,
add targets_hit to dealt_projectile_attack, and
record hit data in it

* tweak BOUNCE

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* clang

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-10 17:48:30 +01:00
Procyonae 982df19d0f Change /tests remaining uses of raw string item initialisation to use itype_id s
"remaining uses" being somewhat of an understatement -_-
2025-01-10 15:31:15 +00:00
osuphobia e94fcc1bbd test case adjustment 2025-01-01 01:16:44 +08:00
PatrikLundell c380147ab2 typified creature.h and monster.h (#78565)
* typified creature.h and monster.h

* Update src/monmove.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update src/monster.h

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-16 22:16:00 -06:00
Karol1223 61f58dcb49 Moose audit (#74554)
* default moose

* tusked + calves + anger triggers for normal

* wowee more description edits

* nerf calf health a lil

* give the moose a ribcage for health benefits

* more more more

* Update quadruped_weakpoints_animal.json

* I love arbitrary numbers !!!

* Update mammal.json

* Update data/json/monster_weakpoints/quadruped_weakpoints_animal.json

* Update quadruped_weakpoints_animal.json

* rename lungs to vitals

* HP recalculations

* Update mammal.json

* disable it

thank you Guardian

* Update monsters.json

---------

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
2024-12-15 15:27:38 -06:00
Clarence "Sparr" Risher 8b27b967ae Replace point constants with static class members 2024-11-26 10:14:26 -05:00
ShnitzelX2 e6781b6a0a archery_damage_test resets attack.missed_by
should fix CI
2024-11-18 03:21:50 -05:00
mqrause 4c69e47b2a change target_handler::trajectory to std::vector<tripoint_bub_ms> and then fix errors until it compiles again (#76671)
Co-authored-by: mqrause <martin@qrause.de>
2024-09-27 12:10:50 -07:00
PatrikLundell 4ba6a9f7a8 Typified parts of map.h/map.cpp + usages 2024-07-18 00:23:02 +02:00
PatrikLundell 38267e0b54 Typified a bit of map.h/cpp (#74963)
* Typified a bit of map.h/cpp

* demanded changes
2024-07-10 21:45:20 -04:00
John Bytheway ebd549b300 Fix StringMaker ODR violations in tests
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.
2021-07-03 07:42:06 -07:00
Binrui Dong 9fdb7ef59c Run IWYU
* 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++
2021-02-06 00:18:41 -05:00
Kevin Granade c5ccf0c2c7 IWYU for tests (#42806) 2020-08-09 09:46:57 +03:00
Kevin Granade 6d1841ac67 Precompiled Catch2 header (#42453)
* Hoist catch.hpp include to the top of files

* Precompile the catch header in tests
2020-07-29 01:28:26 +03:00
Kevin Granade 8185212260 Map reference migration part eight 2020-06-28 22:21:07 +00:00
ZhilkinSerg 7264a72dfa Use constant references in function parameters 2020-05-29 11:01:28 +03:00
John Bytheway b83fc88b9e Convert itype_id to string_id<itype>
itype_id is (presumably) one of the oldest type ids in the game.  In
particular, it predates string_id, and was simply a typedef of
std::string.

This is bad for type safety.

Make it be a string_id specialization instead, and update the rest of
the code accordingly.
2020-05-19 21:07:40 -04:00
Kevin Granade 7ef732f858 Drop archery damage by 5x and increase archery crit damage by 5x 2020-04-11 06:45:25 +00:00
John Bytheway e189957ff2 Run IWYU 20200408 (#39364)
* 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>
2020-04-10 12:16:19 +03:00
Kevin Granade 4fad6b314b Add archery vs wall damage test. 2020-03-23 01:31:15 +00:00
Kevin Granade 5d392c0d6b Rebalance archery take... 5? (#37241)
* Rebalance archery take... 5?

* Require a ranged weapon to break a damage threshold in order to inflict a critical hit.

* Re-audit strength requirements.

* Apply suggestions from code review

Co-Authored-By: Isaac Freund <ifreund@ifreund.xyz>

* Outline archery balance guidelines.

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2020-03-02 09:39:49 +03:00