Skip to content

Commit

Permalink
Remove unnecessary code that was manually handling wielded items
Browse files Browse the repository at this point in the history
  • Loading branch information
prutschman committed Dec 24, 2018
1 parent 8bf35d3 commit 7f40e06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/iexamine.cpp
Expand Up @@ -1861,13 +1861,20 @@ void iexamine::harvest_plant(player &p, const tripoint &examp)
void iexamine::fertilize_plant(player &p, const tripoint &tile, const itype_id &fertilizer)
{
std::list<item> planted = p.use_charges( fertilizer, 1 );

// I don't think this is actually needed, since use_charges should
// check the weapon via the implementation of visitable<Character>. In
// testing, charges are used from weapon-wielded fertilizer without this code.
/*
if (planted.empty()) { // nothing was removed from inv => weapon is the SEED
if (p.weapon.charges > 1) {
p.weapon.charges--;
} else {
p.remove_weapon();
}
}
*/

// Reduce the amount of time it takes until the next stage of the plant by
// 20% of a seasons length. (default 2.8 days).
const time_duration fertilizerEpoch = calendar::season_length() * 0.2;
Expand Down

0 comments on commit 7f40e06

Please sign in to comment.