Skip to content

Commit cec5571

Browse files
authored
Merge pull request DFHack#1105 from myk002/myk_ghostly
reinstate ghostly
2 parents d0a2c0f + 14070e2 commit cec5571

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Template for new versions:
2828

2929
## New Tools
3030
- Updated for adventure mode: `gui/sandbox`, `gui/create-item`, `gui/reveal`
31+
- `ghostly`: (reinstated) allow your adventurer to phase through walls
3132
- `markdown`: (reinstated) export unit or item descriptions to a markdown text file
3233
- `adaptation`: (reinstated) inspect or set unit cave adaptation levels
3334
- `fix/engravings`: fix corrupt engraving tiles

docs/ghostly.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ghostly
33

44
.. dfhack-tool::
55
:summary: Toggles an adventurer's ghost status.
6-
:tags: unavailable
6+
:tags: adventure armok units
77

88
This is useful for walking through walls, avoiding attacks, or recovering after
99
a death.

ghostly.lua

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
-- Turns an adventurer into a ghost or back
2-
--[====[
3-
4-
ghostly
5-
=======
6-
Toggles an adventurer's ghost status. Useful for walking through walls, avoiding
7-
attacks, or recovering after a death.
8-
9-
]====]
10-
11-
if df.global.gamemode ~= df.game_mode.ADVENTURE then
1+
if not dfhack.world.isAdventureMode() then
122
qerror('This script must be used in adventure mode')
133
end
144

15-
local unit = df.global.world.units.active[0]
5+
local unit = dfhack.world.getAdventurer()
166
if unit then
177
if unit.flags1.inactive then
188
unit.flags1.inactive = false

0 commit comments

Comments
 (0)