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

Construct a grave and bury your fallen companions or pets. #30281

Merged
merged 9 commits into from May 12, 2019

Conversation

@nexusmrsep
Copy link
Contributor

commented May 6, 2019

SUMMARY: Content "Construct a grave and bury your fallen companions or pets"

Purpose of change

Follow-up after #28803, a highly requested feature.

Describe the solution

New construction type: Dig Grave and Bury Sealed Coffin

  • this constructs a new terrain type: (fresh) grave
  • requires sealed coffin, so the full burial procedure is: Construct Coffin, Seal Coffin, Dig Grave, Bury Sealed Coffin
  • requires 20 rocks and two 2x4s
  • whatever you put in the coffin will be buried (includes corpses and items - lost your buddy's corpse? bury his favored belongings instead)
  • if you dig out a preexisting fresh grave you can exhume whatever you buried there (corpse will rot in time though), but coffin is destroyed in the process (mainly for mechanics reasons). Impossible for now, because you can't dig in a place where items are located. @Night-Pryanik if its ok for mechanical reasons, can I exclude this terrain from being empty in can_dig_here check?
  • this terrain can be constructed only by the player (at least for now), so exhuming will not give any debuffs or morale penalties, since I'm assuming that player is exhuming his fallen brethren for a good reason, like moving their grave somewhere safer etc. in other words: if you buried someone, you can exhume someone, no strings attached - in contrary to exploratory gravedigging on cemeteries.

Describe alternatives you've considered

Couple of other ways of implementation, but this was quite convenient and also fits my goal for this feature.

Additional context

I've reordered construction menu, since it doesn't sort by name, so options are now placed in following order for convenience:

  • Build Coffin
  • Seal Coffin
  • Dig Grave and Bury Sealed Coffin
@Night-Pryanik

This comment has been minimized.

Copy link
Member

commented May 6, 2019

if its ok for mechanical reasons, can I exclude this terrain from being empty in can_dig_here check?

I guess there could be all sorts of weird things happening if one will try to dig a tile with items on it. Maybe add a special case for graves?

@nexusmrsep

This comment has been minimized.

Copy link
Contributor Author

commented May 6, 2019

If by special case you mean adding graves as exception from the need of being empty then I'd be happy to do so. Or do you mean adding some extra special code handling grave contents during digging action handler?

@Rail-Runner

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

Maybe give a morale bonus to spiritual characters for doing that (but only in case actual corpse is buried)?

@nexusmrsep

This comment has been minimized.

Copy link
Contributor Author

commented May 6, 2019

@Rail-Runner good idea, I'll try to implement it tomorrow.

@Night-Pryanik

This comment has been minimized.

Copy link
Member

commented May 6, 2019

If by special case you mean adding graves as exception from the need of being empty then I'd be happy to do so.

This.

@codemime

This comment has been minimized.

Copy link
Member

commented May 6, 2019

I guess there could be all sorts of weird things happening if one will try to dig a tile with items on it. Maybe add a special case for graves?

This is a pretty recent addition (added for consistency in #29259). Before that, digging in presence of items was entirely possible. So I assume nothing terrible would happen if graves were excluded from this rule.

@codemime

This comment has been minimized.

Copy link
Member

commented May 6, 2019

It would be nice to also be able to inscribe last words or/and an epitaph.

EDIT: Oh yes, and a log entry (kind of "buried someone").

@nexusmrsep

This comment has been minimized.

Copy link
Contributor Author

commented May 6, 2019

Added the exemption for digging up / exhuming a new grave. Done a live test and nothing bad happend.

It would be nice to also be able to inscribe last words or/and an epitaph.

Great idea. Will look into it tomorrow.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 6, 2019

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/tips-tricks-and-newb-questions-reborn/16870/715

@nexusmrsep

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

Added morale bonus for spiritual characters when burying a proper body, some extra messages to indicate that, and a memorial log of the event. Needs some extra testing. Run out of time to do the epitaphs but tomorrow is also a day, so I'll get back to it.

for( item it : its ) {
if( it.is_corpse() ) {
if( it.get_corpse_name().empty() ) {
if( it.get_mtype()->has_flag( MF_HUMAN ) ) {

This comment has been minimized.

Copy link
@Night-Pryanik

Night-Pryanik May 8, 2019

Member

It seems that if it's not human corpse, then do nothing? We were supposed to bury pets too, but in this case there's no morale changes nor sad words.

This comment has been minimized.

Copy link
@nexusmrsep

nexusmrsep May 8, 2019

Author Contributor

Actually if your pet animal was named, it falls under further check, that does not check if corpse was a human. I double checked if pet names carry on to their corpses and if it is recognized by the bury code. It is. Will fix the descriptions of morale gain to more general though.

image

So mourn all you want, but name your pet first.
I wish I could say that no in-game dog was harmed in making this feature but... c'est la vie.

Show resolved Hide resolved src/construction.cpp Outdated

@ZhilkinSerg ZhilkinSerg self-assigned this May 8, 2019

nexusmrsep added some commits May 8, 2019

@nexusmrsep

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

It would be nice to also be able to inscribe last words or/and an epitaph.

Done. Reused graffiti code for it.

Show resolved Hide resolved .gitignore Outdated
Show resolved Hide resolved .gitignore Outdated
Show resolved Hide resolved .gitignore Outdated
Show resolved Hide resolved .gitignore Outdated
Show resolved Hide resolved .gitignore Outdated
Show resolved Hide resolved src/construction.cpp Outdated
Show resolved Hide resolved src/construction.cpp Outdated
Show resolved Hide resolved src/construction.cpp Outdated
Show resolved Hide resolved src/construction.cpp Outdated
Show resolved Hide resolved data/json/terrain.json Outdated
@paulenka-aleh

This comment has been minimized.

Copy link

commented May 10, 2019

I wonder what could emerge from this grave when / if #28787 is implemented :)

Apply suggestions from code review
Co-Authored-By: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>

@kevingranade kevingranade merged commit 30e867f into CleverRaven:master May 12, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg removed their assignment May 12, 2019

@nexusmrsep nexusmrsep deleted the nexusmrsep:rave_in_the_grave branch May 12, 2019

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.