Skip to content

Units::teleport does not correctly handle Wagons #5797

@quietust

Description

@quietust

The gui/teleport script uses the Units::teleport(df::unit *, df::coord) function to move units, and it appears to be capable of teleporting caravan wagons. However, it does not have the necessary logic to adjust occupancy flags for EQUIPMENT creatures, which means it will leave the map's occupancy flags in an inconsistent state afterwards.

DF's own functions unitst::do_largeocc() and unitst::undo_largeocc() are responsible for handling this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions