Skip to content

Commit

Permalink
Also rename the seed variable to make it clear
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Jan 4, 2025
1 parent 9ce75ee commit 548d4aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,13 +1323,14 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara

if( here.has_flag_furn( ter_furn_flag::TFLAG_GROWTH_HARVEST, src_loc ) ) {
map_stack items = here.i_at( src_loc );
const map_stack::iterator seed = std::find_if( items.begin(), items.end(), []( const item & it ) {
const map_stack::iterator seed_iter =
std::find_if( items.begin(), items.end(), []( const item & it ) {
return it.is_seed();
} );
if( seed == items.end() ) {
if( seed_iter == items.end() ) {
debugmsg( "Missing seed item at %s", src_loc.to_string() );
return activity_reason_info::fail( do_activity_reason::ALREADY_DONE );
} else if( seed->has_flag( json_flag_CUT_HARVEST ) ) {
} else if( seed_iter->has_flag( json_flag_CUT_HARVEST ) ) {
// The plant in this location needs a grass cutting tool.
if( you.has_quality( quality_id( qual_GRASS_CUT ), 1 ) ) {
return activity_reason_info::ok( do_activity_reason::NEEDS_CUT_HARVESTING );
Expand Down

0 comments on commit 548d4aa

Please sign in to comment.