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

Use pathability groups (thanks @myk002) to detect stranded citizens #833

Merged
merged 32 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9c331bd
Use pathability groups (thanks @myk002) to detect stranded citizens
azrazalea Sep 11, 2023
09a3431
Add documentation and enable warn-stranded in control panel
azrazalea Sep 11, 2023
97910b8
warn-stranded: Add GUI to allow persistently ignoring units in
azrazalea Sep 11, 2023
91ac082
Apply suggestions from code review
azrazalea Sep 11, 2023
fa39450
Manual fixes from review
azrazalea Sep 11, 2023
3850f58
Second round review fixes
azrazalea Sep 11, 2023
1e38a3a
Fix indentation
azrazalea Sep 11, 2023
d3b7828
Refactor: Main group is biggest group, lists all stranded groups
azrazalea Sep 12, 2023
07a2bfb
Bugfix: Use coherent method to determine if no stranded units
azrazalea Sep 12, 2023
f08f09e
Add command-line status command with ids and walkGroup options
azrazalea Sep 15, 2023
1580704
Flip order to be ascending by group size
azrazalea Sep 15, 2023
ceb7413
Refactor to better reuse code and organize
azrazalea Sep 15, 2023
e2cf30f
Add ignore and unignore command line commands
azrazalea Sep 18, 2023
453a842
Improve GUI, now decently happy with it
azrazalea Sep 19, 2023
f96cdfa
Add proper toggle group option to GUI only
azrazalea Sep 19, 2023
2f1a751
Update help
azrazalea Sep 19, 2023
6b78003
Fix minor display bug from self-review
azrazalea Sep 19, 2023
4b86576
Update help to match new usage/commands after review
azrazalea Oct 6, 2023
15d42a3
Implement remaining review changes
azrazalea Oct 6, 2023
b7ab411
Fix first round of testing bugs post review changes
azrazalea Oct 6, 2023
3609a8d
Fix typo in unignore group
azrazalea Oct 6, 2023
81a24a8
Remove jarring selection reset on every action
azrazalea Oct 6, 2023
3255e57
Update docs/warn-stranded.rst wording from review
azrazalea Oct 6, 2023
748bff5
Attempt to implement review refactors
azrazalea Oct 7, 2023
d1c1829
Remove attempt at using const
azrazalea Oct 7, 2023
f3befea
Fix post-review-change bugs
azrazalea Oct 7, 2023
5d3de5c
Remove debug prints
azrazalea Oct 7, 2023
60a9a3e
Apply easy fixes from code review
azrazalea Oct 7, 2023
5d11aa5
Update getIgnoredUnits and rename to loadIgnoredUnits
azrazalea Oct 9, 2023
da14516
Attempt at making a GUI layout that better uses space
azrazalea Oct 10, 2023
5dbbcf5
Apply suggestions from code review
myk002 Oct 16, 2023
d141a51
Update warn-stranded.lua
myk002 Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions docs/warn-stranded.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ warn-stranded
=============

.. dfhack-tool::
:summary: Reports citizens that are stranded and can't reach any other unit.
:summary: Reports citizens that are stranded and can't reach any other citizens.
:tags: fort units

If any (live) groups of units are stranded from the main (largest) group,
the game will pause and you'll get a warning dialog telling you which units are isolated.
If any (live) groups of fort citizens are stranded from the main (largest) group,
the game will pause and you'll get a warning dialog telling you which citizens are isolated.
This gives you a chance to rescue them before they get overly stressed or start starving.

Each unit will be put into a group with the other units stranded together.
Each ciitizen will be put into a group with the other citizens stranded together.
azrazalea marked this conversation as resolved.
Show resolved Hide resolved

There is a command line interface that can print status of units without pausing or bringing up a window.
There is a command line interface that can print status of citizens without pausing or bringing up a window.

The GUI and command-line both also have the ability to ignore units so they don't trigger a pause and window.
The GUI and command-line both also have the ability to ignore citizens so they don't trigger a pause and window.

You can enable ``warn-stranded`` notifications in `gui/control-panel` on the "Maintenance" tab.

Expand All @@ -30,20 +30,24 @@ Usage
Examples
--------

``warn-stranded``
Standard command that checks for standed citizens and causes a window to pop up with a warning if any are stranded.
azrazalea marked this conversation as resolved.
Show resolved Hide resolved
Does nothing when there are no unignored stranded citizens.

``warn-stranded status``
List all stranded units and all ignored units. Includes unit ids in the output.
List all stranded citizens and all ignored citizens. Includes citizen unit ids.

``warn-stranded clear``
Clear(unignore) all ignored units.
Clear(unignore) all ignored citizens.
azrazalea marked this conversation as resolved.
Show resolved Hide resolved

``warn-stranded ignore 1``
Ignore unit with id 1.
Ignore citizen with unit id 1.

``warn-stranded ignoregroup 2``
Ignore stranded unit group 2.
Ignore stranded citizen group 2.

``warn-stranded unignore 1``
Unignore unit with id 1.
Unignore citizen with unit id 1.

``warn-stranded unignoregroup 3``
Unignore stranded unit group 3.
Unignore stranded citizen group 3.
Loading