Skip to content

Guard Illness#11637

Open
armele wants to merge 2 commits intoldtteam:version/mainfrom
armele:guard_to_hospital
Open

Guard Illness#11637
armele wants to merge 2 commits intoldtteam:version/mainfrom
armele:guard_to_hospital

Conversation

@armele
Copy link
Copy Markdown
Contributor

@armele armele commented Apr 27, 2026

Closes #11597

I could not reliably reproduce the symptom (guards not going to the hospital when sick) in a consistent, repeatable pattern, so I am not 100% sure that these fixes completely resolve it - but they address the theories I have as to the root cause.

Changes proposed in this pull request

  • Adjusted EntityAISickTask to not stop the trip to the hospital until the entity is asleep in a hospital bed (not just asleep somewhere randomly, as guards are prone to do).
  • Adjusted CitizenAI to prioritize addressing illness as a higher priority than addressing hunger.
  • Adjusted AbstractEntityAIGuard to allow sickness to make them interruptable in their guard duties, and to wake them up (in case they become ill while sleeping).

Testing

I poisoned my entire barracks full of guards with rotten flesh and followed them first to their hut block (as is already the pattern), then to the hospital, where they found a bed until cured, then left and resumed their guard duties.

Review please

@github-actions
Copy link
Copy Markdown

In order for this pull request to be merged, make sure you test whether your changes work.

If the changes are working as intended, remove the https://github.com/ldtteam/minecolonies/labels/undefined label from the pull request.
As long as this label is on the pull request, it will not be merged.
If your pull request made no changes to the source code, the label will not be automatically added to the pull request.

Contributors, please review this pull request!

@armele
Copy link
Copy Markdown
Contributor Author

armele commented Apr 27, 2026

Please remove the "Untested" label. Tested as described above.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ill guards do not go to hospital

1 participant