* move all crafting_inventory operations to temp_crafting_inventory class
* fix rebase errors
move some functions back to where they were
adjust operator=
use pseudo items and item_location in form_inventory
remove obsolete comment
* add pseudo item dedup
* check for empty item_location in visitable
* iterate over copies items as well
* pseudo item
* Update temp_crafting_inventory.cpp
* fix some compile errors
* Update craft_attention_test.cpp
* Update temp_crafting_inventory.cpp
* address clang_tidy
* dump non const
* Apply batched suggestions from code review
IWYU
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* IWYU
* IWYU
* clang
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- add ensure_synth_mod builder and a MOD pocket on synth hosts
- add matrix cases for gunmod mode override, consumption_mods, capacity_mods
- assert capacity_mult re-derives across an item save/load round-trip
- filter synth pocket counts to magazine pockets in existing matrix cases
- add islot_mod capacity_mods with pocket_capacity_mod multiply
- add non-serialized item_pocket capacity_mult with accessors
- scale ammo_capacity by capacity_mult, clamp remaining at zero
- route item ammo_capacity and remaining_ammo_capacity through the pocket
- restamp capacity_mult from installed mods in update_modified_pockets
- diagnose capacity_mods on non-integral-MAGAZINE pockets
- add capacity_mods test items and tests
- add islot_mod consumption_mods with pocket_consumption_mod set/multiply
- apply overrides in effective_qty, min set then product of multiplies
- add validate_mod_pocket_refs for unknown and duplicate pocket ids
- run validate_mod_pocket_refs from update_modified_pockets
- add consumption_mods test items and tests
- add islot_gunmod firing_requirements from key mode_firing_requirements
- add islot_gunmod hide_modes
- resolve firing cost from the gunmod owning the mode-def
- erase hidden modes from gun_all_modes, reselect on hide
- add firing_mode_blocked, guard shots_remaining, consume_shots, targeting
- guard gun_cycle_mode against an empty mode set
- validate gunmod mode keys against mode_modifier
- add multimag gunmod test items and tests
- guard find_template(ammo_default())->ammo deref in display_name
- skip max_amount when ammo template has null ammo slot
- add multimag SECTION covering bare robofac_gun display_name
- Drain live integral MAGAZINE pockets on multimag hosts in unload
- Merge wells and integral pockets into single unload picker
- Add regression test for dual-source unload
- Validate firing_requirements MAGAZINE_WELL has default_magazine
- Branch npc::pretend_fire on uses_firing_requirements via consume_one_shot
- Add reload-chain regression test for sibling well auto-queue
- Anchor ammo accessors and display per-pocket on multimag guns
- Skip CASING in pocket counts; pocket-scoped integral capacity math
- Add integral MAGAZINE as reload target; eject casings before reload
- Compact per-pocket sidebar; guard find_template/format_entry_name on empty id
- Add regression tests covering display, reload, fire, accessors
- Skip fire_wielded_weapon ammo-mismatch gate when uses_firing_requirements
- Add test_multimag_gun_integral_ammo fixture to TEST_DATA
- Add regression test for multimag fire path
- prepare_multimag_pockets skips tanks that cannot cover one shot
- aim panel runs multimag branch ahead of OUT OF AMMO catch
- short pocket rows render in red so player sees the deficit
- new SECTIONs: USE_UPS isolation, two-tank picker sufficiency
- split charges_of_internal into scan + apply_external_pools
- apply_external_pools branches LEGACY vs MULTIMAG semantics
- multimag aggregate delegates per-tool feasibility to feasible_uses
- legacy aggregate sums local raw charges, adds UPS / bionic once
- multimag external pool routes via main, includes ground UPS
- inventory::charges_of scans every match into one entry list
- expose item::feasible_tool_uses for arbitrary external budgets
- add test_multimag_vehicle_welder TEST_DATA fixture
- cover multimag external pool routing, ground UPS, inventory dedup
- cover legacy USE_UPS dedup at charges_per_use 1 and 20
- Switch direct drains to consume_tool_uses / consume_one_shot across activity / iuse / melee
- Switch insufficient-charge UI messages to format_consumption_requirements
- Switch item_action comparator to expected_cost_per_use
- Switch first-aid and AMMO_IN_NAMES gates to needs_charges_to_use
- Switch writing-tool page-capacity check to tool_uses_remaining
- Always label per-well ammo in multi-well tname
- Add multimag branch to visitable::charges_of_internal
- Match writing-tool precheck to local-only crafting drain
- Match hacksaw prompt to actual activity tick count
- Revert book_binder and multi_cooker to ammo_consume for raw-charge tools
- Cover the no-charges_per_use shape with a regression test
- add item::dress_magazine_wells walking base and gunmod wells
- iterate wells in item_group / mapgen / vehicle / npc dressing
- top up present-but-empty magazines on the ammo roll
- reject item-wide charges on multi-well items with debugmsg
- drop reliance on itype::magazine_default map in mondeath
- Add reload_option pocket_index field plus matching constructor
- Branch item::reload on pocket_index with per-pocket revalidation
- Plumb pocket_index through reload_activity_actor and serialization
- Add list_ammo per_well_targets flag with pocket-scoped compat filter
- Add per-well ammo_remaining/ammo_capacity/remaining_ammo_capacity overloads
- ammo_remaining sums across every loaded MAGAZINE_WELL pocket
- remaining_ammo_capacity reports first MAGAZINE_WELL fallback
- display_name builds per-well "(amount/max class, ...)" segments
- item_info pluralizes Magazine label via n_gettext
- Character::unload ejects every loaded magazine, not just the first
- rate_action_unload returns good when any well has a magazine
- wield-collision check rejects any loaded magazine, not just first
- ammo_consume: iterate all MAGAZINE_WELL pockets instead of
early-returning on the first empty well
- first_ammo: guard against empty wells (was UB via pocket.front()
on empty pocket), continue to next well instead of unconditional
return
- Add magazines_current() returning all loaded magazines
- Add const overloads for magazine_current at pocket/contents level
- Fix item::magazine_current() const to use proper const path
instead of const_cast
- Add test_multimag_gun fixture with two MAGAZINE_WELL pockets
- Add tests covering single-well, dual-well, and integral magazine
paths