Skip to content

Commit

Permalink
Update crafting.cpp
Browse files Browse the repository at this point in the history
bugfix: added check to disassembly time to prevent instant disassembly of non-ammo items
  • Loading branch information
SeventhSandwich committed Feb 4, 2020
1 parent 30c5e24 commit 06c5177
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crafting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,8 @@ bool player::disassemble( item_location target, bool interactive )
}

if( activity.id() != ACT_DISASSEMBLE ) {
assign_activity( ACT_DISASSEMBLE, r.time * num_dis );
if (num_dis != 0) { assign_activity(ACT_DISASSEMBLE, r.time * num_dis); }
else { assign_activity(ACT_DISASSEMBLE, r.time); }
} else if( activity.moves_left <= 0 ) {
activity.moves_left = r.time;
}
Expand Down

0 comments on commit 06c5177

Please sign in to comment.