Skip to content

Graveyard Quality of Life - #11794

Open
armele wants to merge 4 commits into
ldtteam:version/mainfrom
armele:undertaker_qol
Open

Graveyard Quality of Life#11794
armele wants to merge 4 commits into
ldtteam:version/mainfrom
armele:undertaker_qol

Conversation

@armele

@armele armele commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and accept the Contributing Guidelines
  • I have tested and confirmed my changes are working on the most recent commit of this pull request
  • I have used AI in the creation of this pull request
    AI was used for code review.

Related issues

Closes Discord Feedback

Changes proposed in this pull request

  • Add a "X of Y Plots Full" label on the graveyard module.
image
  • Add min stock module to graveyard (for shovels, really)
  • Add a burial event when a citizen is successfully buried. (Anticipation here is of future add-on mod use of this event.)
  • During testing noticed that a body recovered at the end of the day would not be buried if a sleep cycle interrupted the burial. Fixed this.

Testing

  • Verified undertaker buried dead citizens successfully.
  • Verified X of Y Plots Full label was updated correctly on burial.
  • Verified min stock module worked as expected.

Review please

}

// Graveyard burial plots.
if (building instanceof BuildingGraveyard graveyard)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is always BuildingGRaveyard, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be, agreed. I have been getting in this habit to protect against the case where some add-on author puts the module on another building for some reason...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbf, the grave positions should probably live inside the module just, then we don't care at all, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good idea, but I wonder if the risk of making that change for an existing colony introduces too much complexity or risk for migrating the data upon the upgrade.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should be fine. It's long term more stable instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored and retested - including a one-time migration from the building-owned graveyard positions.

visualGravePositions.add(new Tuple<>(graveLocation, graveFacing));
}
// Safely migrate grave positions from the building to the module
getModule(GraveyardManagementModule.class).migrateLegacyGravePositions(compound);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can simplify the migration logic, we just call from here the module "loadfromnbt" method, and we give it the compound where it can load it from, so it doesn't need a special method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to call the whole loadfromNBT - that's why I did the targeted migration of just the plot positions, because we're merging the plot positions from the building into the module data that already exists. If you are open to retaining the targeted migration I'd prefer that as safer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants