Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CR] [WIP] Optimize generic activities using stages #33864

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions data/json/player_activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@
"type": "activity_type",
"activity_level": "MODERATE_EXERCISE",
"verb": "sorting out the loot",
"suspendable": false,
"based_on": "neither",
"no_resume": true
"based_on": "neither"
},
{
"id": "ACT_TILL_PLOT",
Expand All @@ -351,18 +349,14 @@
"type": "activity_type",
"activity_level": "MODERATE_EXERCISE",
"verb": "fetching components",
"suspendable": false,
"based_on": "neither",
"no_resume": true
"based_on": "neither"
},
{
"id": "ACT_MULTIPLE_FARM",
"type": "activity_type",
"activity_level": "ACTIVE_EXERCISE",
"verb": "farming",
"suspendable": false,
"based_on": "neither",
"no_resume": true
"based_on": "neither"
},
{
"id": "ACT_PLANT_PLOT",
Expand Down
4 changes: 0 additions & 4 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3177,10 +3177,6 @@ void activity_handlers::churn_finish( player_activity *act, player *p )
// Go back to what we were doing before
// could be player zone activity, or could be NPC multi-farming
act->set_to_null();
if( !p->backlog.empty() ) {
p->activity = p->backlog.front();
p->backlog.pop_front();
}
}

void activity_handlers::churn_do_turn( player_activity *act, player *p )
Expand Down
7 changes: 4 additions & 3 deletions src/activity_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ enum do_activity_reason : int {
NEEDS_HARVESTING, // For farming - tile is harvestable now.
NEEDS_PLANTING, // For farming - tile can be planted
NEEDS_TILLING, // For farming - tile can be tilled
BLOCKING_TILE, // Something has made it's way onto the tile, so the activity cannot proceed
BLOCKING_TILE, // Something has made it's way onto the tile, so the activity cannot proceed
NEEDS_CHOPPING, // There is wood there to be chopped
NEEDS_TREE_CHOPPING, // There is a tree there that needs to be chopped
NEEDS_BIG_BUTCHERING, // There is at least one corpse there to butcher, and it's a big one
NEEDS_BUTCHERING, // THere is at least one corpse there to butcher, and theres no need for additional tools
ALREADY_WORKING, // somebody is already working there
NEEDS_VEH_DECONST, // There is a vehicle part there that we can deconstruct, given the right tools.
NEEDS_FISHING // This spot can be fished, if the right tool is present.
NEEDS_VEH_DECONST, // There is a vehicle part there that we can deconstruct, given the right tools.
NEEDS_FISHING, // This spot can be fished, if the right tool is present.
NEEDS_FETCHING // Generic fetching required
};

struct activity_reason_info {
Expand Down
Loading