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

emigrate nobles #1382

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
973b5e8
Add emigrate-nobles.lua and rst
ong-yinggao98 Jan 26, 2025
7a8f07e
Add logic for finding noble's sites
ong-yinggao98 Jan 27, 2025
414111e
Add monarch handling logic
ong-yinggao98 Jan 28, 2025
16f5939
Add emigration logic
ong-yinggao98 Jan 28, 2025
c110f25
Add announcement
ong-yinggao98 Jan 28, 2025
2d6e588
Add options handling
ong-yinggao98 Jan 29, 2025
fe549d9
Add documentation
ong-yinggao98 Jan 29, 2025
9777b1a
Attempt to fix units stuck in social activities
ong-yinggao98 Jan 29, 2025
16544b2
Fix title underline
ong-yinggao98 Jan 30, 2025
537af8e
Simplify logic
ong-yinggao98 Jan 30, 2025
ebc3976
Update docs/emigrate-nobles.rst
ong-yinggao98 Jan 30, 2025
4272ee7
Update docs/emigrate-nobles.rst
ong-yinggao98 Jan 30, 2025
8de561e
Update docs/emigrate-nobles.rst
ong-yinggao98 Jan 30, 2025
18a28d5
Update docs/emigrate-nobles.rst
ong-yinggao98 Jan 30, 2025
3b40700
Add functionality to remove from squad
ong-yinggao98 Jan 30, 2025
c521f5f
Remove squad removal logic
ong-yinggao98 Feb 7, 2025
fdb1698
Remove unused function
ong-yinggao98 Feb 7, 2025
c4ac1d6
Move emigrate-nobles into emigration
ong-yinggao98 Feb 7, 2025
b2ad9d1
Move emigrate-nobles.rst into emigration.rst
ong-yinggao98 Feb 7, 2025
07e6330
Update docs/emigration.rst
ong-yinggao98 Feb 8, 2025
39dac77
Update internal/emigration/emigrate-nobles.lua
ong-yinggao98 Feb 8, 2025
a6d65e4
Remove module globals
ong-yinggao98 Feb 8, 2025
b1cefb2
Fix pair iteration
ong-yinggao98 Feb 8, 2025
ecd42a5
Refactor logic
ong-yinggao98 Feb 8, 2025
ec335cb
Refactor emigration logic
ong-yinggao98 Feb 8, 2025
32afe4e
Fix stupid typo
ong-yinggao98 Feb 8, 2025
4fefcfb
Fix stupid typo
ong-yinggao98 Feb 8, 2025
4419093
Fix import error
ong-yinggao98 Feb 8, 2025
2b42b13
Add support for current unit
ong-yinggao98 Feb 8, 2025
64c5b64
Disable cancelling special jobs
ong-yinggao98 Feb 8, 2025
16ff909
Add mandate removal logic
ong-yinggao98 Feb 9, 2025
1fa7b04
Add check for fort admins
ong-yinggao98 Feb 9, 2025
5501751
Add signposts for navigation
ong-yinggao98 Feb 9, 2025
dd2718e
Change isAdministrator
ong-yinggao98 Feb 9, 2025
23728b8
Add support for other civ monarchs, change print messages
ong-yinggao98 Feb 9, 2025
161207e
Add support for evicting noble mayors
ong-yinggao98 Feb 10, 2025
fb8d15e
Add symbol dropping logic
ong-yinggao98 Feb 10, 2025
5569bb0
Update TODO
ong-yinggao98 Feb 10, 2025
16b4fe9
Update docs/emigration.rst
ong-yinggao98 Feb 10, 2025
bce191d
Fix bad mayor assignment logic
ong-yinggao98 Feb 10, 2025
3c71aeb
Update for new structures, add missing event
ong-yinggao98 Feb 11, 2025
bd58a05
Fix incorrect history event
ong-yinggao98 Feb 11, 2025
a69dc66
Update styling of new links and events
ong-yinggao98 Feb 11, 2025
5049178
Merge branch 'master' into noble-emigration
myk002 Feb 22, 2025
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
Prev Previous commit
Next Next commit
Add documentation
ong-yinggao98 committed Jan 29, 2025
commit fe549d99d170ef31bc66a4ba9c7c6faafd8dff1e
28 changes: 24 additions & 4 deletions docs/emigrate-nobles.rst
Original file line number Diff line number Diff line change
@@ -2,15 +2,35 @@ emigrate-nobles
==========

.. dfhack-tool::
:summary: Allow inherited nobles to emigrate from fort for their rightful land.
:summary: Allow inherited nobles to emigrate from fort to their site of governance.
:tags: fort units

Tired of inherited nobility freeloading off your fortress making inane demands? Use this tool
to find them and have them (willingly) emigrate to their rightful land.
to have them (willingly) emigrate to their rightful lands.

The unit must not be assigned to a squad.

Warning! Nobles will not surrender any assigned items, be sure to unassign your artefacts before
using this tool.

Usage
-----

::
``emigrate-nobles --list``
List all nobles that do not rule your fortress
``emigrate-nobles --all``
Emigrate all nobles that do not rule your fortress
``emigrate-nobles --unit <id>``
Emigrate a noble matching the specified unit ID that does not rule your fortress

Options
-------

emigrate-nobles [-h]
``-h``, ``--help``
View help
``-l``, ``--list``
List all nobles that do not rule your fortress
``-a``, ``--all``
Emigrate all nobles do not rule your fortress
``-u <id>``, ``--unit <id>``
Emigrate noble matching specified unit ID that does not rule your fortress
2 changes: 1 addition & 1 deletion emigrate-nobles.lua
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ function main()
if noble.military.squad_id ~= -1 then
local squadName = dfhack.military.getSquadName(noble.military.squad_id)
local nobleName = dfhack.units.getReadableName(noble)
print("[x] "..nobleName.." is a soldier of "..squadName..". Unassign him from the squad and try again.")
print("[-] "..nobleName.." is a soldier of "..squadName..". Unassign him from the squad and try again.")
else
emigrate(noble, site)
end