Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upOption to auto pulp or butcher corpses #22229
Conversation
OzoneH3
added some commits
Oct 22, 2017
Coolthulhu
reviewed
Oct 23, 2017
| } | ||
| } | ||
| } else if ( pulp_butcher == "pulp" || pulp_butcher == "pulp_adjacent" ) { | ||
| static auto pulp = [&]( const tripoint &pos ) { |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Oct 23, 2017
Contributor
As far as I recall, lambdas should be declared constant where possible, otherwise they may be treated differently by the compiler or fail to compile on older compilers.
Coolthulhu
self-assigned this
Oct 23, 2017
Coolthulhu
reviewed
Oct 23, 2017
| if( pulp_butcher == "pulp_adjacent" ) { | ||
| static const direction adjacentDir[8] = { NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, NORTHWEST }; | ||
| for( auto &elem : adjacentDir ) { | ||
| pulp( tripoint( direction_XY( elem ), 0 ) + u.pos() ); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Coolthulhu
reviewed
Oct 23, 2017
| static auto pulp = [&]( const tripoint &pos ) { | ||
| for( const auto &maybe_corpse : m.i_at( pos ) ) { | ||
| if ( maybe_corpse.is_corpse() && maybe_corpse.damage() < maybe_corpse.max_damage() && | ||
| maybe_corpse.get_mtype()->has_flag( MF_REVIVES ) ) { |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
removed their assignment
Oct 23, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm sceptical that an option to auto-pulp when safe mode is on is
necessary. If you've turned safe mode on, that's a pretty clear signal that
sporadically triggering long-duration actions isnt desired.
|
This comment has been minimized.
This comment has been minimized.
|
@kevingranade The pulp safe-mode is not tied to the '!' safemode directly. It works the same way the autopickup safemode. If there are enemies in safemode proximity distance it just won't pulp anything.
Is this really neccesary? You have the auto pulp safemode option explained above and the normal zombie interrupting activity prompt when you spot an enemie while perfoming pulping or butchering.
I'm not sure this is possible since the assigned activity is actually printing the pulp messages. |
This comment has been minimized.
This comment has been minimized.
|
Unrelated but could we have auto harvest mode like this as next step? It could share lots code like safemode etc. just different activity. |
This comment has been minimized.
This comment has been minimized.
Imagine the following situations:
It certainly deserves a quick toggle option more than autopickup does. I can't think of a situation where I'd like one off and one on, so maybe tying those two together would work. |
This comment has been minimized.
This comment has been minimized.
This doesn't address my question, do we really need to support auto-pulping when there are monsters nearby? Is that a remotely sensible thing to do? |
This comment has been minimized.
This comment has been minimized.
Yes, somehow ignored the long action interrupt part and yes with that in mind it's just pointless. Fixed and changed:
Things I don't know how to adress properly because it's in a long action:
Most of the time it will be only one corpse and pretty obvious where it was considering blood and bile flying around. Other than that I don't think a direction would be all that useful if there is a ton of corpses. |
OzoneH3 commentedOct 22, 2017
•
edited