Skip to content

Commit

Permalink
basecamps: fix NPCs disappearing when crafting in expansions
Browse files Browse the repository at this point in the history
NPCs would disappear into the ether when crafting in an expansion
if the basecamp had a copy of the same recipe.  The basecamp
craft function would dispatch the NPC, but with the wrong companion
mission information, making it impossible to recall them.

Make the basecamp craft mission start check for the basecamp
direction before running.

Notes: this will conflict with Qrox's basecamp refactor from CleverRaven#34058
but the conflict resolution should be obvious.
  • Loading branch information
mlangsdorf committed Sep 17, 2019
1 parent 571a3b9 commit a5e9d2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,9 @@ bool basecamp::handle_mission( const std::string &miss_id, const std::string &mi
survey_return();
}

start_crafting( miss_id, miss_dir, "BASE", "_faction_camp_crafting_", by_radio );
if( miss_dir == base_dir ) {
start_crafting( miss_id, miss_dir, "BASE", "_faction_camp_crafting_", by_radio );
}
if( miss_id == base_dir + " (Finish) Crafting" ) {
const std::string msg = _( "returns to you with something..." );
mission_return( "_faction_camp_crafting_" + miss_dir, 1_minutes, true, msg,
Expand Down Expand Up @@ -1851,6 +1853,7 @@ void basecamp::start_crafting( const std::string &cur_id, const std::string &cur
comp->companion_mission_inv.add_item( results );
}
}
return;
}
}

Expand Down

0 comments on commit a5e9d2c

Please sign in to comment.