Skip to content

Commit

Permalink
Merge pull request #76143 from PatrikLundell/craft
Browse files Browse the repository at this point in the history
Fix inconsistent crafting range
  • Loading branch information
Maleclypse authored Sep 5, 2024
2 parents 7c664e1 + bcc2eed commit 94b346a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara
if( p ) {
item_location to_craft = p->get_item_to_craft();
if( to_craft && to_craft->is_craft() ) {
const inventory &inv = you.crafting_inventory( src_loc.raw(), PICKUP_RANGE - 1, false );
const inventory &inv = you.crafting_inventory( src_loc.raw(), PICKUP_RANGE, false );
const recipe &r = to_craft->get_making();
std::vector<std::vector<item_comp>> item_comp_vector =
to_craft->get_continue_reqs().get_components();
Expand All @@ -1390,7 +1390,7 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara
} else if( act == ACT_MULTIPLE_DIS ) {
// Is there anything to be disassembled?
// TODO: fix point types
const inventory &inv = you.crafting_inventory( src_loc.raw(), PICKUP_RANGE - 1, false );
const inventory &inv = you.crafting_inventory( src_loc.raw(), PICKUP_RANGE, false );
requirement_data req;
for( item &i : here.i_at( src_loc ) ) {
// Skip items marked by other ppl.
Expand Down Expand Up @@ -2812,8 +2812,8 @@ static requirement_check_result generic_multi_activity_check_requirement(
loot_zone_spots.emplace_back( elem );
combined_spots.emplace_back( elem );
}
for( const tripoint_bub_ms &elem : here.points_in_radius( src_loc, PICKUP_RANGE - 1,
PICKUP_RANGE - 1 ) ) {
for( const tripoint_bub_ms &elem : here.points_in_radius( src_loc, PICKUP_RANGE,
PICKUP_RANGE ) ) {
combined_spots.push_back( elem );
}
add_basecamp_storage_to_loot_zone_list( mgr, src_loc, you, loot_zone_spots, combined_spots );
Expand Down

0 comments on commit 94b346a

Please sign in to comment.