Open ryanbennitt opened 4 years ago
Squads appear to be stored in the world, not in individual forts. I suspect you'd be able to find the relevant squad in world.squads.all
, e.g. with df.squad.find(unit.squad_id)
.
I'm not sure how to determine which fort a squad is part of, although squads do have an entity_id
field that refers to a historical_entity. Units::getSquadName()
, which manipulator uses, doesn't check it. I assume viewing these dwarves with the v
menu doesn't show a squad name at all, right?
Actually under view unit, it does indeed list the old squad from the previous fort. Curiouser and curiouser...
Sounds similar to https://www.bay12games.com/dwarves/mantisbt/view.php?id=10718 (and https://www.bay12games.com/dwarves/mantisbt/view.php?id=5259, which is older).
Yep, sounds like it's a general DF issue.
To clarify, I think it depends on whether squad IDs are intended to be cleared on migrants. If they're intentionally not cleared, then both this and the DF issue are related display issues (i.e. both places need to actually check the squad and see if it's relevant before displaying it). I don't actually know what the intended behavior is, though - there may be a reason on DF's end that squad IDs can't be automatically cleared that I'm unaware of.
I retired my fort, started a new fort in same world and some of my old dwarfs from the retired fort turn up as migrants. When you look at them in Manipulator it shows the name of the squad they were assigned to in the retired fort. My new fort doesn't even have any squads configured yet.