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

Option to auto pulp or butcher corpses #22229

Merged
merged 5 commits into from Oct 28, 2017

Conversation

Projects
None yet
4 participants
@OzoneH3
Copy link
Member

commented Oct 22, 2017

OzoneH3 added some commits Oct 22, 2017

}
}
} else if ( pulp_butcher == "pulp" || pulp_butcher == "pulp_adjacent" ) {
static auto pulp = [&]( const tripoint &pos ) {

This comment has been minimized.

Copy link
@Coolthulhu

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 Coolthulhu self-assigned this 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.

Copy link
@Coolthulhu

Coolthulhu Oct 23, 2017

Contributor

Would be cleaner as pulp( u.pos() + direction_XY( elem ) ).

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2017

  • It automatically starts pulping acidic corpses when the player is not immune. This is dangerous and must be fixed.
  • There is no way to quickly turn it off and on. You want it off whenever you can quickly lose the sight of enemies and don't want to suddenly start pulping after cutting a corner. Could be tied to safe mode.
  • The adjacent autopulp needs some more info - currently it's hard to tell what was pulped, how many corpses were pulped and so on. Would be useful for it to say "Finished pulping the Zombie corpse (NW)".
  • Styling
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.

Copy link
@Coolthulhu

Coolthulhu Oct 23, 2017

Contributor

item::can_revive()

@Coolthulhu Coolthulhu removed their assignment Oct 23, 2017

@kevingranade

This comment has been minimized.

Copy link
Member

commented Oct 23, 2017

@OzoneH3

This comment has been minimized.

Copy link
Member Author

commented Oct 24, 2017

@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.

@Coolthulhu

There is no way to quickly turn it off and on. You want it off whenever you can quickly lose the sight of enemies and don't want to suddenly start pulping after cutting a corner. Could be tied to safe mode.

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.
Would also require another option entry and a keybinding thats better used for other things.

The adjacent autopulp needs some more info - currently it's hard to tell what was pulped, how many corpses were pulped and so on. Would be useful for it to say "Finished pulping the Zombie corpse (NW)".

I'm not sure this is possible since the assigned activity is actually printing the pulp messages.

@cainiaowu

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2017

Unrelated but could we have auto harvest mode like this as next step? It could share lots code like safemode etc. just different activity.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Oct 25, 2017

Is this really neccesary?

Imagine the following situations:

  • Fighting shady zombies, trying to relocate, no zombies in sight but multiple ones close by.
  • Got boomer bile'd, trying to relocate, but forced into pulping every step.
  • Just fought off a smoker and stepping from a smoke tile off to a smoke-free one,

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.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Oct 25, 2017

@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.

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?

@OzoneH3

This comment has been minimized.

Copy link
Member Author

commented Oct 25, 2017

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?

Yes, somehow ignored the long action interrupt part and yes with that in mind it's just pointless.

Fixed and changed:

  • Removed the safe mode option. (Always off as long an enemy is in sight)
  • Added an on/off toggle keybinding/action.
  • No longer pulps acidic zombies.

Things I don't know how to adress properly because it's in a long action:

The adjacent autopulp needs some more info - currently it's hard to tell what was pulped, how many corpses were pulped and so on. Would be useful for it to say "Finished pulping the Zombie corpse (NW)".

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.

@Coolthulhu Coolthulhu self-assigned this Oct 28, 2017

@Coolthulhu Coolthulhu merged commit 3ef431b into CleverRaven:master Oct 28, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.2%) to 22.207%
Details
gorgon-ghprb Build finished.
Details

@OzoneH3 OzoneH3 deleted the OzoneH3:auto_pulp_butcher branch Oct 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.