233 Commits

Author SHA1 Message Date
Tektolnes 3015a27a34 Partial dodge and limb shielding/deflection (#89470)
Co-authored-by: Maya Granade <kevin.granade@gmail.com>
Co-authored-by: Thelis Stambolliu <110344314+FarFarLakeSea@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-17 21:10:30 +01:00
dobbry-vechur f0d0d940d7 Cache crafting inventory queries for craftable recipes in item info
- opened query_cache_scope around the applicable recipe loop
- added craftable recipe item info test
2026-10-04 03:29:28 +04:00
Antti Riikonen adbc2d35d2 Run tests in CI for multiple sets of mods (#83242)
* 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>
2026-08-26 19:54:43 -05:00
Johnson 1f918518cd Merge pull request #88315 from Relvl/performance/few-performance-fixes-1
Performance/Improve few per-turn performance bottlenecks
2026-08-17 12:55:16 -05:00
RenechCDDA 44a25cf115 Cordon off the remaining fake ammo types 2026-07-29 11:02:47 -04:00
np4Huk 46dc14516b Added immunity to burning and high heat resistance to ballistic kevlar and rigid kevlar (#87888)
* Added immunity to burning and high heat resistance to ballistic kevlar and rigid kevlar

* Updated tests
2026-07-07 23:13:18 -05:00
Tektolnes bfcddd67ac Air Filtration System CBM works with non-human mouths (#87282)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com>
2026-06-10 20:26:14 +02:00
GuardianDll 9ff60ca26d Sanify stats of copper wire and raw copper wire, adjust it's item spawn 2026-06-07 16:42:18 +02:00
Wind Shodow 6f4cdc0a94 Fix some translation issues (again) (#87017)
* translation patch

* styled

* extract practice result EOCs

* Add blank line

* Allow translation ":%s" format for armor info

* maybe right

* correct some item_info

* astyle again

* update test
2026-05-24 21:32:08 -05:00
dumb-kevin 3f34418730 Multimag: per-well labels, reload chain, iteminfo test
- Auto-queue follow-up reload for sibling wells on multimag finish
- Tighten ammo_capacity to keep zero capacity on single-well empties
- Prefer pocket display_name in reload picker and Ammunition line
- Pin gun_info battery-only render in iteminfo_test
2026-05-18 23:35:30 +04:00
RenechCDDA 571da61bf4 De-charge a bunch of stuff that should never have had charges (3) (#87008) 2026-05-16 10:00:30 +02:00
dobbry-vechur 97067ca137 Use Catch::Matchers:: namespace for all test matchers (#85907) 2026-03-18 08:04:02 -05:00
Standing-Storm ee583ad1ba Make bird wings limbs (#85730)
* Initial commit

* Increase weighting of pecking

* Remove unused flag

* Clarify power_efficiency description

* Update swat armor for wings

* Update tests/iteminfo_test.cpp

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

* Update tests/iteminfo_test.cpp

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

* Faux fur suit

* Update tests/iteminfo_test.cpp

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

* Update tests/iteminfo_test.cpp

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

* Restore old faux fur suit test

* Update tests/iteminfo_test.cpp

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>
2026-03-12 11:22:38 -07:00
Maleclypse ffdf43896f Merge pull request #85777 from dumb-kevin/fix/avg-coverage-phantom-limbs
Filter get_avg_coverage() by viewer anatomy
2026-03-11 20:37:32 -05:00
RenechCDDA a1755baabf Properly show materials for repair, not material type (#85772) 2026-03-11 09:21:20 +01:00
dumb-kevin d6eecb51a5 Filter get_avg_coverage() by viewer anatomy
Add filtered overload that skips body parts the viewer doesn't have.
Use it in armor inventory menu and ablative pocket info display.

Add test fixture and tests for phantom limb filtering.
2026-03-11 09:24:52 +04:00
dumb-kevin 9ef34d4142 Make iteminfo coverage/warmth test value-independent
The longshirt coverage/warmth string check hardcoded expected values
(90% coverage, 5 warmth) which broke whenever new body parts with
similar_bodypart links changed the average. The test is checking
that the UI renders the right markup, not that coverage equals any
particular number -- so query the actual values from the item and
build the expected string from those.
2026-03-10 02:17:54 +04:00
dumb-kevin 7a705a79b5 Filter item info body part display by viewer anatomy (#85707)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dumb-kevin <dumb-kevin@users.noreply.github.com>
2026-03-06 20:22:26 +01:00
BalthazarArgall c0ad7634ba Coconut audit (#84684)
* initial commit

* fix comsetible type

* fix recipes

* Fix test?
2026-01-20 09:23:56 -06:00
GuardianDll 90fb9eb2a0 Print better stat info in ammo 2025-12-31 21:26:47 +01:00
GuardianDll 2c59b54f51 Simplify gun stats in item info 2025-09-21 15:30:16 +02:00
Andrew Rosa ac4dab0d1b Present dispersion as MOA in item UI
The game runs all dispersion related attributes as "100th of MOA", and
this number is presented as-is on our UI. Presenting actual units is
nice, so convert all those numbers to actual decimal MOA and present
unit string.
2025-08-26 14:53:38 -03:00
mqrause fff594429b genericize iteminfo table drawing (#82558)
Co-authored-by: mqrause <martin@qrause.de>
2025-08-24 16:23:57 +02:00
RenechCDDA 749774d074 Update the tests for the string change 2025-08-20 04:31:19 -04:00
Holli 43bfdcc9f6 Merge pull request #82186 from Holli-Git/chitin_scale_mail
Chitin armor overhaul
2025-08-09 00:46:41 -05:00
Anton Simakov bd933f04bf Stop using pre-apoc price as a fallback for postapoc price (#82075)
* pre apoc price is not a fallback for post apoc price

* print the barter price even if it's same as pre-apoc price

* why would we need to enforce barter value is not shown if it's equal to price? why enforce price 0 is shown if none defined?
2025-07-28 22:24:03 -05:00
Procyonae 703cc90a71 Remove STATIC() macro (#81780)
* 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 >-<
2025-07-15 13:29:50 +02:00
PatrikLundell f9900fccc2 Merge pull request #79670 from PatrikLundell/mapify
mapify: split ammo remaining into link and non link
2025-02-16 14:49:56 -06:00
PatrikLundell 30b83d6c34 add needed includes 2025-02-13 09:15:16 +01:00
PatrikLundell 7bfa56fa99 Merge branch 'master' into mapify 2025-02-13 08:46:56 +01:00
PatrikLundell 0ac675121c mapified a little item prompting a lot of vehicle 2025-02-11 15:10:00 +01:00
moxian e2f7aaf95f Modernize c headers (stddef.h -> cstddef &co)
Code size:
includes:
$ cat obj/tiles/*.inc | wc
 278247  556494 17375710
$ cat tests/obj/tiles/*.inc | wc
 163745  327490 10307041

post-processed source (clang -E):
./make_preproc.sh src/
65903054 170378741 2049783477
./make_preproc.sh tests/
38434408 100326802 1215849078
2025-02-10 13:56:09 -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
Procyonae 049fc35bb9 Correct new int id order 2025-01-10 23:41:32 +00: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
PatrikLundell 26eb173d36 typified character.h + npc.h (#78623)
* typified character.h + npc.h

* demanded collateral change

* demanded collateral change
2024-12-18 20:03:41 -06:00
boyboytemp dee71b3a71 fix displaying of stats for ablative armor
Currently protection/coverage stats are not displayed in 'sort armor
screen' and 'body status screen'.

The issue was reported originally in #62126
2024-12-16 04:17:33 +03:00
Anton Burmistrov bb75c380cf Merge pull request #78311 from FauxNight/nuts
Merge peanut butter and imitation peanutbutter
2024-12-09 09:34:39 +04:00
Anton Burmistrov 1cdc9f2eeb Tiny acetylene tank, a new default magazine for acetylene lamps (#78323)
* Added a new tiny acetylene tank

Also changed id of "small acetylene tank" to `smallweldtank` instead of previous `tinyweldtank`.

* Added spawn of new tiny tank

* Acetylene tank, torch, and cooker now can use tiny tank too

* Added recipe for refilling the new tiny tank

* Acetylene lamps will now spawn with tiny tank by default

* Fix tests
2024-12-05 23:27:43 -06:00
FauxNight 0432f9a1b7 updated calorie and vitamin ranges for ice cream 2024-12-04 21:37:58 -06:00
Benjamin Mauer 5b99282195 Adjust Raw Butter recipes, Adds raw butter to recipes that use butter (#77245)
* Update dairy_products.json

Adjusts the recipes for creating raw milk to correct abnormal calorie outputs of raw butter, also adds salt to the recipe.

* Add raw butter to recipes that use butter

Changed the recipes for:
"condiment", Shillelagh, PBJ Toast, and Lobster Roll to allow for using raw butter as well as regular butter.  It seemed like oversight that these recipes lacked this option.

* Lint Changes

Whoops, forgot to lint, this commit fixes that.

* Fix Array Errors

Game was throwing array errors because I wasn't formatting the recipes correctly, this fixes that.

* Adjust Shake recipe for Raw butter to correct the output calories

Turns out food byproducts aren't counted when comparing recipe input vs output, or they are in the cases of making lard, and making raw butter.  This changes the recipe to magically make more butter, but at least it's within 2% of the nominal calories of raw butter now.

* Lint bread.json

Missed linting this, hopefully this makes the bot happy.

* Update iteminfo_test.cpp to adjust ice cream

Changes the minimum calorie range of ice cream from 52 to 56, so that the iteminfo_test for icecream won't fail.  This change is due to my butter changes.
2024-10-22 14:41:07 -05:00
Clarence "Sparr" Risher f46574436e numbered pockets in pocket description 2024-10-18 07:23:39 -04:00
ehughsbaird c740cce234 Check ordering of protection info in iteminfo test
Now that it's no longer checking the whole message, we can get back some
of the strictness that was lost by checking it's at least in increasing
order.
2024-07-28 00:16:37 +00:00
ehughsbaird 552cb162dc Stop iteminfo test from failing w/ mod damage type
When mods add additional damage types, additional data is added to the
iteminfo strings, making testing for the whole string fail. But we can
instead test for the specific damage types and the coverage header that
we're testing for, and the test will no longer fail with additional
damage types.

A Beak bodypart is also added by the test mod, changing the protection
of some items.
2024-07-28 00:16:35 +00:00
Anton Simakov d0a4db8cce more fixes 2024-07-20 17:56:56 +02:00
Anton Simakov 7d509e81f6 more test fixes 2024-07-20 15:41:45 +02:00
natsirt721 459ec63e90 [CR] Bionic multimeter (#73992)
* add multimeter bionic, item, and integrated tool

* s. fix tests

* s. fix test again
2024-05-27 00:02:54 -05:00
Karol1223 3fc92a1da8 Vegetable Audit (#71969)
* first half

* gherkins vs salads, you must choose

* oops gherkin recipes

* cabbage, lettuce + gherkin density fix

* tupperware max length

* lower the carrots in the sack

* spinach war I

* spinach war II

* beet sugar amount normalizing

* second half

* obsolete lentils

* language cleanup

* canned tomatoes + eggplant fix

* tomato and tomato accessories

* density

* V8

* fuck around and find what for

* is this progress

* lower it tf down

* mass conservation

* pumpkins

* final push?

---------

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
2024-05-07 20:16:30 -05:00
YuriNikolai 12148b4e0c Typos fixed (#72502)
* typos fixed

* typo fix

* tests fix
2024-03-26 14:55:13 -04:00
RenechCDDA 539c7db402 Merge branch 'master' into cannibalism_as_a_vitamin 2024-03-15 14:46:59 -04:00