Units::teleport(): set idle_area

develop
lethosor 2022-09-04 23:08:56 -04:00
parent 65500e6069
commit e6336e769a
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
2 changed files with 2 additions and 0 deletions

@ -80,6 +80,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- Removed ``Windows`` module (C++-only) - unused. - Removed ``Windows`` module (C++-only) - unused.
- ``Constructions`` module (C++-only): removed ``t_construction``, ``isValid()``, ``getCount()``, ``getConstruction()``, and ``copyConstruction()``. Access ``world.constructions`` directly instead. - ``Constructions`` module (C++-only): removed ``t_construction``, ``isValid()``, ``getCount()``, ``getConstruction()``, and ``copyConstruction()``. Access ``world.constructions`` directly instead.
- ``Gui::getSelectedItem()``, ``Gui::getAnyItem()``: added support for the artifacts screen - ``Gui::getSelectedItem()``, ``Gui::getAnyItem()``: added support for the artifacts screen
- ``Units::teleport()``: now sets ``unit.idle_area``
## Lua ## Lua
- History: added ``dfhack.getCommandHistory(history_id, history_filename)`` and ``dfhack.addCommandToHistory(history_id, history_filename, command)`` so gui scripts can access a commandline history without requiring a terminal. - History: added ``dfhack.getCommandHistory(history_id, history_filename)`` and ``dfhack.addCommandToHistory(history_id, history_filename, command)`` so gui scripts can access a commandline history without requiring a terminal.

@ -174,6 +174,7 @@ bool Units::teleport(df::unit *unit, df::coord target_pos)
// move unit to destination // move unit to destination
unit->pos = target_pos; unit->pos = target_pos;
unit->idle_area = target_pos;
// move unit's riders (including babies) to destination // move unit's riders (including babies) to destination
if (unit->flags1.bits.ridden) if (unit->flags1.bits.ridden)