Skip to content

Commit

Permalink
Remove unnecesaary comments and update PLAYER_ACTIVITY.doc to mention
Browse files Browse the repository at this point in the history
activity_actor::can_resume_with_internal
  • Loading branch information
rsulli55 committed May 5, 2020
1 parent 076e637 commit 8f1cb97
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion doc/PLAYER_ACTIVITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ functions. Don't forget to add the deserialization function of your new
activity actor to the `deserialize_functions` map towards the bottom of
`activity_actor.cpp`.

4. `player_activity.cpp` Optionally update `can_resume_with`.
4. If this activity is resumable, `override`
`activity_actor::can_resume_with_internal`

5. Construct your activity actor and then pass it to the constructor for
`player_activity`. The newly constructed activity can then be assigned
Expand Down
2 changes: 0 additions & 2 deletions src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ void dig_channel_activity_actor::finish( player_activity &act, Character &who )
calendar::turn ) );
}

//TODO: Should we consider helpers like in dig_activity_actor::finish?
// And should we use mod_stored_nutr instead of mod_hunger?
who.mod_hunger( 5 );
who.mod_thirst( 5 );
who.mod_fatigue( 10 );
Expand Down
4 changes: 0 additions & 4 deletions src/player_activity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ cata::optional<std::string> player_activity::get_progress_message( const avatar
type == activity_id( "ACT_CHOP_LOGS" ) ||
type == activity_id( "ACT_CHOP_PLANKS" )
) {

const int percentage = ( ( moves_total - moves_left ) * 100 ) / moves_total;

extra_info = string_format( "%d%%", percentage );
Expand Down Expand Up @@ -298,9 +297,6 @@ bool player_activity::can_resume_with( const player_activity &other, const Chara
// Should be used for relative positions
// And to forbid resuming now-invalid crafting

// TODO: Once activity_handler_actors exist, the less ugly method of using a
// pure virtual can_resume_with should be used

if( !*this || !other || type->no_resume() ) {
return false;
}
Expand Down

0 comments on commit 8f1cb97

Please sign in to comment.