Skip to content

Sync with Master - #3

Merged
b3brodie merged 261 commits into
selffrom
temp
Apr 17, 2026
Merged

b3brodie merged 261 commits into
selffrom
temp

Conversation

@b3brodie

Copy link
Copy Markdown
Owner

Summary

Category "Brief description"

Purpose of change

Describe the solution

Describe alternatives you've considered

Testing

Additional context

dumb-kevin and others added 30 commits April 5, 2026 06:53
- npc::do_reload: use reload_option::qty() instead of manually
  computing quantity via ammo_data()->ammo->type. Crashes when
  select_ammo returns a non-ammo item (e.g. food for containers).
- turret_data::can_reload: use remaining_ammo_capacity() > 0
  instead of raw ammo_data()->ammo->type dereference.
- item::remaining_ammo_capacity: guard against null ammo_data()
  and null islot_ammo, return 0 instead of crashing.
NPC camp workers would pick up the avatar's personal zones (both
source and destination) when the player stood nearby, delivering
items to the player's personal FOOD/etc zones instead of the camp's
static destinations.

- Add zone_manager::has_nonpersonal() to check whether a point is
  covered by at least one non-personal zone of a given type.
- Filter coord_set in stage_init so NPCs skip personal UNSORTED
  source tiles that have no backing static zone.
- Filter dest_set in stage_do so NPCs skip personal destination
  tiles that have no backing static zone.
- When a personal zone overlaps a static zone on the same tile,
  the static zone still works for NPCs.
- Three new tests covering personal dest, personal source, and
  overlap scenarios.
NPCs assigned to mop zones would always fail with "no required zone
was found" when they didn't have a mop in inventory, even when
moppable tiles and mops in loot zones were available.

- Add NEEDS_MOP to activity_reason_continue so the framework enters
  the fetch path instead of silently skipping moppable tiles.
- Add NEEDS_MOP to activity_reason_picks_up_tools so the NPC
  searches loot zones for a mop.
- Add mopping_standard requirement (MOP quality level 1) and
  multi_mop_activity_actor::multi_activity_requirements override
  to tell the fetch system what to look for.
…on-existing-road

Give rural church `"existing": true` in its overmap connections
The climb check in monster::move() blocked all non-flying creatures
from ascending any z-level, including regular staircases.

- Exempt regular stairs (GOES_UP without DIFFICULT_Z) from the climb
  check, matching what can_reach_to() already does. Ladders, ropes,
  and scaffolding still require climbing ability.
- Expand the try_to_move neighbor scan to include z-level neighbors
  so creatures on stairs are not falsely considered stuck.
- Add tests for stair ascent/descent with diverse creature types,
  and ladder blocking for non-climbers.
- Add font_size parameter to load_font(), load GUI font at 1.5x and 2x
  into the atlas alongside the regular gui and mono fonts
- Expose PushGuiFont1_5x() and PushGuiFont2x() helpers in cata_imgui.h
- Replace SetWindowFontScale(1.4f) in crafting GUI with PushGuiFont1_5x()
  for crisp text instead of blurry bitmap scaling
- Loop over all fonts for fallback callbacks and validation
…-cant-ascend-stairs

Allow creatures to ascend regular stairs
…d-crash-ammo-data

Fix null ammo_data dereferences in NPC reload and turret code
Step recipes called proficiency_time_malus() every turn via
step_budget_moves(), which pulled book bonuses from
crafting_inventory(). The inventory cache was always stale
(invalidated by set_moves(0) earlier in the same do_turn call),
causing a full O(N^2) inventory rebuild per turn -- the same bug
pattern that was previously fixed for batch_time().

- Add crafting_cost_context struct bundling book_proficiency_bonuses
  and tool_speeds; require it on batch_time, time_to_craft_moves,
  step_budget_moves -- no implicit fallback, no hidden scans
- Add for_recipe() and for_proficiencies() factories so callers
  compute the context once at the evaluation boundary
- Add Character::book_bonuses_nearby() -- lightweight spatial query
  that walks map tiles and vehicle cargo in-place without copying
  items or running stacking logic
- Add map::for_each_reachable_item() as shared primitive for
  reachability/accessibility/ownership/vehicle-cargo iteration,
  eliminating semantic duplication with form_from_map()
- Thread required book_proficiency_bonuses through
  proficiency_time_malus, proficiency_skill_malus, and their
  wrappers so they cannot silently trigger inventory scans
- Cache crafting_cost_context in craft_activity_actor, recomputed
  only on speed/assistant/proficiency changes (5% boundaries)
- Precompute context in crafting GUI paths (availability cache,
  step display, recipe sort) to avoid redundant per-recipe scans
…re-tiedown

Give `trunk` vehiclepart the `FURNITURE_TIEDOWN` flag
- Removed cache_data(false) call from vehicle::refresh_zones()
- Added regression test for personal zone position stability
…e-effort

[Sky Island] Require the player to examine the statue to receive warp shards
…6276)

* Persistent details expansion state

* Apply suggestions from code review

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>
…ma-flyer-blacklist

[Sky Island] Blacklist evacuation flyer
Add 'GLARE' tool quality to lowered PAPR Welding Mask.
…-no-newline

Improve expanded component view in new ImGui Crafting Menu
* If aenor_paddock.* is already whitelisted, I guess it makes sense to whitelist aenor_farm.*, since they are part of the same overmap special and the tests are failing?

* Revert "If aenor_paddock.* is already whitelisted, I guess it makes sense to whitelist aenor_farm.*, since they are part of the same overmap special and the tests are failing?"

This reverts commit f8b4831.

* Work in progress items for capturing embers from a balrog

* Glass jar component in recipe, small change to proficiency required

* Recipes and components!

* Add fading embers to Balrog death drops

* Add recipe book for crafting

* Formatting

* Plural of embers is embers

* Apply suggestion from @Maleclypse

* Apply suggestion

* It should not take you that long to seal some fire into a flask

* Apply suggestion from @Maleclypse

* Apply suggestion from @Maleclypse

* Apply suggestions from code review

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>

---------

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
NPC needs: executor system with BT integration
@b3brodie
b3brodie marked this pull request as ready for review April 17, 2026 21:36
@b3brodie
b3brodie merged commit eb2140e into self Apr 17, 2026
11 checks passed
@b3brodie
b3brodie deleted the temp branch April 17, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment