5066 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
Anton Simakov 7d2228f85a use item_location in use actions instead of item * (#89473) 2026-11-17 12:07:16 -06:00
Maleclypse fc6dce35b6 Merge pull request #89519 from CleverRaven/weariness-display-fix
Weariness display fix
2026-11-16 23:13:07 -06:00
Fris0uman 06fbf8717c Obsolete and migrate cash cards (#89166)
* cash card empty, no money

remove money from cash cards in vanilla

* remove unused flags

* preserve cash card stacking test

* obsoletion and migration of cash cards

* Preserve money ammo type for aftershock

* no free threads sorry

* put money in the test data

* don't duplicate money ammo in aftershock

* fix unloading non empty components test

* fix for clang

---------

Co-authored-by: Fris0uman <fris0uman@users.noreply.github.com>
2026-11-16 23:11:50 -06:00
ShnitzelX2 77e3be9bf3 remove "tty" test from #89339 (#89521) 2026-11-14 12:28:54 -08:00
Maya Granade 1010ece1b2 Make data memebers of activity_tracker private 2026-11-14 09:50:06 -08:00
ShnitzelX2 d91ffc3018 CI 2026-11-10 22:57:43 -05:00
ShnitzelX2 b1f8d667ca remove Character+outfit::i_at(int)
along with Character::use(int), Character::takeoff(int), Character::wear(int)
2026-11-10 21:54:47 -05:00
ShnitzelX2 acf4fa9865 remove most uses of Character::get_item_position
including migration for longsalvage_activity_actor, modification of item_location_impl::item_on_person
2026-11-10 21:54:45 -05:00
Anton Simakov 315a018a79 Merge pull request #89469 from CleverRaven/combat-weariness-2
Combat weariness 2
2026-11-10 22:17:45 +01:00
Maleclypse bfcdfb1504 repair_item_activity_actor (#89451) 2026-11-09 22:05:16 -06:00
Maya Granade 8057017f39 Add a weariness test modelling a boxing match 2026-11-09 16:18:23 -08:00
Michael Basala a65401424e Minor change updating a var name in the npc_test.cpp file. Windows defines a macro called far, so the variable name far causes a namespace collision. 2026-11-09 12:31:56 -05:00
ShnitzelX2 9dad7e7027 repair_item_activity_actor 2026-11-06 17:45:13 -05:00
Anton Simakov 06be12f988 Merge pull request #89274 from CleverRaven/top-level-game-metrics
performance metrics report
2026-11-06 11:16:43 +01:00
Maleclypse 57cf429e84 More support for C++20: char8_t (#89339)
* Add char8_t-remediation

Source: https://github.com/tahonermann/char8_t-remediation

Made the last three functions inline to avoid link duplication

* Use U8 macro

* Add a test to print u8

* Fix cata_path::generic_u8string() and shorten its callers

* Add u8string and fs::path to fmt. Update callers

* Spread from_u8string everywhere

* Use the more matching overload

* Replace with some fmt::format

* Fix using aggregate initializer

> https://en.cppreference.com/cpp/language/aggregate_initialization#Aggregate
> no user-declared or inherited constructors

"= default" counts as user-declared

* Fix gcc getting confused with fs::path

* Apply IWYU reccomendations

* Fix missing template

* Fix linters
2026-11-02 14:43:50 -06:00
Maleclypse e63207ef31 Merge pull request #89397 from KorGgenT/fix-test-compile-error
avoid near and far #define s
2026-11-01 18:25:15 -06:00
Kevin Granade cdc443cbd1 Expand metrics object and add to top level code 2026-11-01 13:43:37 -08:00
Curtis Merrill c57bad4075 avoid near and far #define s 2026-11-01 15:19:04 -05:00
alef 404abb85b2 Fix linters 2026-11-01 16:31:22 +01:00
alef 91c5b8477c Add a test to print u8 2026-11-01 15:08:08 +01:00
alef d44be6e049 Use U8 macro 2026-11-01 15:08:08 +01:00
dobbry-vechur 19af8ac510 Send builders to a free construction site before a busy one
- the construction scan tries sites no other builder works on, the avatar included, before busy ones
- a builder joins a busy site only when no free site is workable
- a builder whose site another builder finishes ends that step quietly and keeps scanning
2026-10-31 23:03:40 +04:00
dobbry-vechur 469902361e Fetch components stored inside containers on loot tiles
- requirements_map plans items inside containers on loot tiles, skipping roots that hold reserved items
- fetch_activity takes the planned amount out of a container and unseals that pocket for every task
2026-10-31 23:03:40 +04:00
Maleclypse a1a646d6ed Merge pull request #89375 from dobbry-vechur/fix/npc-assorted-bugs
Fix a batch of small NPC, camp and zone task bugs
2026-10-31 13:04:33 -05:00
dobbry-vechur f628fb50c5 Zone task scans report missing items once per scan
- print the find-items and items-not-available pair for the first skipped site of a scan only
- keep the reported flag in the scan cache, so a scan spread over turns reports once
2026-10-31 02:09:36 +04:00
dobbry-vechur 800fb1dd06 Followers pushed aside keep their task when no door is behind them
- start the close-door activity on the left tile only when it holds a door or vehicle part to close
- a builder shoved off plain ground keeps its build and its construction task in the backlog
2026-10-31 02:09:36 +04:00
dobbry-vechur d5e428146c Zone fetch planning ignores debug hammerspace
- add craft_flags::ignore_hammerspace and honor it in the requirement checks that grant hammerspace
- pass it from are_requirements_nearby, the requirements_map met check and open_fetch_lines
2026-10-31 02:09:36 +04:00
dobbry-vechur 5c21b4c359 Set minus thirty Celsius in NPC cold weather tests
- -30_C negates an absolute temperature and gives -303.15 K, far below minus thirty Celsius
- use units::from_celsius( -30 ) in the behavior tree score test and four preemption sections
2026-10-31 02:09:36 +04:00
dobbry-vechur 19a0792a38 Camp item collection leaves the items it does not take
- erase only the items the chance roll takes in om_harvest_itm
- declare om_harvest_itm and mass_volume in faction_camp.h under talk_function
2026-10-31 02:09:36 +04:00
dobbry-vechur 8a34eed64e NPCs check the hearth again before their fire takes
- run npc::check_fire_spot for an NPC in fire_start_activity_actor::finish before lighting
- end the activity unlit on a failed hearth check and tell a player who sees the NPC
2026-10-31 01:34:54 +04:00
dobbry-vechur da40eac4f2 Harvesting finishes on its own tile after the map shifts or a save loads
- store the harvest target as an absolute position and save it under a new key
- read a bubble position from older harvest saves against the map loaded at its origin
2026-10-31 01:34:54 +04:00
dobbry-vechur 0e09347cff NPCs rank sleep spots by comfort, then shade, warmth and distance
- spots rank by the game's own comfort, so beds and hammocks beat chairs and stools
- equal comfort falls back to the sun penalty, then to floor warmth, which rest quality counts for every sleeper
- the nearest spot wins among equal ranks in the free scan around the NPC
2026-10-31 01:34:54 +04:00
kuutekitty 7f225f5c66 remove body part bleed and add it back to afs and iso protocol (#89300)
do the removal

add to iso protocol

remove current test

remove unused variable

iwyu

attempt to do tests

iwyu?

fix something that shouldnt have been removed

Update tests/effect_test.cpp

Update tests/effect_test.cpp

points for test mutation

actually give them the mutation in the test

change body part to test torso

fix body_part_test_torso error

style and fix torso?

another attempt to fix test_torso

remove connected to, recommended by snup

revert recommendation

fix typo pointed out by candleburry

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mqrause <38702195+mqrause@users.noreply.github.com>
Co-authored-by: John Candlebury <johncandlebury@gmail.com>
Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
2026-10-30 14:36:44 +01:00
Maleclypse b187dc4c40 Camp members ordered to guard keep guarding after a reload (#89319)
Co-authored-by: dobbry-vechur <dobbry-vechur@users.noreply.github.com>
2026-10-27 22:39:26 -05:00
dobbry-vechur 8375b6aa9c Zone tasks fetch what they lack and clear what they mark
- a fetch takes only what its requirements lack, counted with what is already there
- a fetch that cannot bring or hold what the task needs ends the task
- fetch marks clear at task end and on pickup by a picker with no backlog or destination activity
2026-10-28 01:44:53 +04:00
dobbry-vechur 7aed0ed4f2 Camp members ordered to guard keep guarding after a reload 2026-10-28 00:21:58 +04:00
dobbry-vechur fac09a7ca0 Zone tasks survive a failed fetch and an unreachable work spot
- a fetch that cannot take its item ends its task and the work scan at once
- a zone task skips a work spot it cannot reach
2026-10-27 10:50:12 +04:00
dobbry-vechur 6cdf4b5ddf A started construction leaves one task to come back to
- a construction step queues the zone task that started it once, with its state
- the backlog gains no empty construction entry per step
2026-10-26 23:00:21 +04:00
dobbry-vechur 129cb28c77 Test characters start without a walk an earlier test left
- clear_character drops the auto-move route, the destination and its activity
- a destination activity one test leaves cannot start in the next
2026-10-26 23:00:12 +04:00
dobbry-vechur 4cf6dc8245 Followers and guards keep to their obligations when getting food
- food options judged against obligations when found and when started
- an NPC that overrides its obligations for food says why
- a hungry follower whose obligations keep it from food says it is hungry
2026-10-25 10:58:47 +04:00
dobbry-vechur 8f731cf178 Item sources are judged alike when found and when taken
- food scans and the meal that takes an item share one filter and one access check
- a faction that shares public goods lets others pour a drink from its containers
- meal checked against NPC diet before it starts
2026-10-25 10:58:47 +04:00
dobbry-vechur 8cf54df3ec The trip bench measures hunger and cold beside thirst and sleep
- each round tops up one named need for every NPC in the case
- cases: hungry follower, forbidden or unreachable food, cold guard, boxed-in NPC
- each line also counts decisions, executor calls, and turns ending fed or indoors
2026-10-25 10:58:47 +04:00
dobbry-vechur 4450eb2b74 Intake stops when more is of no use
- every intake stops at a full stomach, food also at a meal already eaten
- drinks stop at the full line, before the engorged one
- a harvest is eaten later, like carried food
2026-10-25 10:58:47 +04:00
dobbry-vechur 07910a5d8c Meals take real time and give way to harm and orders
- a decision that acted keeps its move surplus or debt into the next turn
- dropped meals are never resumed
- a meal or fire cut short by harm or an order hands back to its task
2026-10-25 10:58:47 +04:00
dobbry-vechur c1d0852084 Drinking from terrain and putting on clothes take time
- a drink from a water source comes a sip per turn
- putting on clothes costs the time wearing them takes
2026-10-25 10:41:21 +04:00
dobbry-vechur 1931de1008 Camp meals report only what is eaten and take time
- a hungry NPC at a healthy weight gets a routine camp meal
- a camp meal the NPC would refuse is never served
- camp food and camp water take the time eating and drinking them takes
2026-10-25 10:41:21 +04:00
dobbry-vechur 30ddeaa935 Option costs name what holds the NPC and what was checked
- an option names its walk and the stay that holds the NPC at its spot
- an option names what its judgment rests on: assumption, own tile, destination or route
- stay on its own tile and walk with no route have named forms
2026-10-25 10:41:21 +04:00
dobbry-vechur 5f669eb1e7 The warmth need is named temperature regulation
- need, goal, executor, plan use temperature name
- behavior tree nodes, predicates and test goals use the same name
2026-10-25 10:41:21 +04:00
dobbry-vechur e20bd74d70 Only tests set a committed goal directly
- tests commit a goal without ending the old pursuit
- the game commits a goal only through arbitration
2026-10-25 10:41:20 +04:00