diff --git a/src/iuse.cpp b/src/iuse.cpp index fcdb48a7c5337..9f0c5b491ee87 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -490,12 +490,6 @@ cata::optional iuse::can_smoke( const Character &you ) return cata::nullopt; } -/* iuse methods return the number of charges expended, which is usually "1", or no value. - * Returning 0 indicates the item has not been used up, though it may have been successfully activated. - * 0 may also mean that the consumption and time progress was handled within iuse action. - * If the item is destroyed here the return value must be 0. - * A return of cata::nullopt means it was not used at all. - */ cata::optional iuse::sewage( Character *p, item *, bool, const tripoint & ) { if( !p->query_yn( _( "Are you sure you want to drinkā€¦ this?" ) ) ) { @@ -5456,7 +5450,8 @@ cata::optional iuse::unfold_generic( Character *p, item *it, bool, const tr } p->moves -= it->get_var( "moves", to_turns( 5_seconds ) ); - return 1; + p->i_rem( it ); + return 0; } cata::optional iuse::adrenaline_injector( Character *p, item *it, bool, const tripoint & ) diff --git a/src/iuse.h b/src/iuse.h index dead619ad815f..5753bb6285d3a 100644 --- a/src/iuse.h +++ b/src/iuse.h @@ -21,7 +21,11 @@ struct iteminfo; struct tripoint; template class ret_val; -// iuse methods returning a bool indicating whether to consume a charge of the item being used. +// iuse methods return the number of charges expended, which is usually "1", or no value. +// Returning 0 indicates the item has not been used up, though it may have been successfully activated. +// 0 may also mean that the consumption and time progress was handled within iuse action. +// If the item is destroyed here the return value must be 0. +// A return of cata::nullopt means it was not used at all. namespace iuse { diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 07eff119730fd..b2ab8a99e062a 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -4426,8 +4426,8 @@ cata::optional deploy_tent_actor::use( Character &p, item &it, bool, const player_activity new_act = player_activity( tent_placement_activity_actor( to_moves ( 20_minutes ), direction, radius, it, wall, floor, floor_center, door_closed ) ); get_player_character().assign_activity( new_act, false ); - - return 1; + p.i_rem( &it ); + return 0; } bool deploy_tent_actor::check_intact( const tripoint ¢er ) const