Skip to content

Commit

Permalink
Workaround issue where activity is invalidated during complete_craft().
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Feb 8, 2015
1 parent 454ac63 commit ccedab9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/player_activity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,13 @@ void player_activity::finish( player *p )
type = ACT_NULL;
break;
case ACT_LONGCRAFT:
p->complete_craft();
type = ACT_NULL;
{
int batch_size = values.front();
if( p->making_would_work( p->lastrecipe, batch_size ) ) {
p->complete_craft();
// Workaround for a bug where longcraft can be unset in complete_craft().
if( type == ACT_LONGCRAFT &&
p->making_would_work( p->lastrecipe, batch_size ) ) {
type = ACT_NULL;
p->make_all_craft(p->lastrecipe, batch_size);
}
}
Expand Down

0 comments on commit ccedab9

Please sign in to comment.