Skip to content

REQ: When a unit is not selected, 'zone unassign' should work like negated 'zone assign' #804

Description

@mwpher

If I'm missing something and this request is redundant, please tell me and I'll delete it ASAP!

I've encountered several instances where I need to mass unassign animals from a set zone - especially after using 'zone assign' and forgetting a filter! (。々°)

So it'd be great if there 'zone unassign' applied to your set zone when a unit isn't targeted

In awful pseudocode:

zone unassign:
if first argument == 'unassign' AND no unit selected AND 'zone set' was run THEN:
  $TO_REMOVE = all animals assigned to set zone # example pasture contains [SPOT, WHISKERS]
    # Keep in mind 'zone assign' starts with all animals in area
  if filter
    apply to list and redefine # filter "race CAT" means list to remove is now just [WHISKERS]
  for Animal in $TO_REMOVE:
    unpasture Animal from zone

# pasture now contains just [SPOT]

Something else that would help is an argument for 'assign' that makes it replace instead of add. For example, say I want to repurpose an pasture exclusively for horses. Without the zone unassign behavior I suggest, I'd have to unassign them all manually or delete/remake the zone. (not to mention that for me, deleting zones doesn't clear the pasture info somehow -- considering filing a bug report.) With the zone unassign behavior I suggested, I'd run something like

zone unassign all
zone assign all own race HORSE

but if there was a 'zone assign only' option, then I could just run

zone assign only all own race HORSE

and now the pasture only has horses and the other animals are removed.

I always feel guilty making feature requests -- I'd have tried implementing it myself, but I can't figure out the source code at all. I guess experience with C++ and lua would've helped. (。々°)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaSuggestions, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions