Skip to content

Commit

Permalink
ajust code to use new field names
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Jan 3, 2024
1 parent 3d79df3 commit 8f561a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/reveal-hidden-sites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ reveal-hidden-sites

.. dfhack-tool::
:summary: Reveal all sites in the world.
:tags: adventure fort armok map
:tags: adventure embark fort armok map

This tool reveals all sites in the world that have yet to be discovered by the
player (camps, lairs, shrines, vaults, etc), making them visible on the map.

It is usable in both fortress and adventure mode.
It is usable in both fortress and adventure mode, or on the embark map.

Please see `reveal-adv-map` if you also want to expose hidden world map tiles in
adventure mode.
Expand Down
23 changes: 2 additions & 21 deletions reveal-hidden-sites.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
-- Expose all undiscovered sites.
-- author: Atomic Chicken

--[====[
reveal-hidden-sites
===================
This script reveals all sites in the world
that have yet to be discovered by the player
(camps, lairs, shrines, vaults, etc)
thus making them visible on the map.
Usable in both fortress and adventure mode.
See `reveal-adv-map` if you also want to expose
hidden world map tiles in adventure mode.
]====]

local count = 0
for _, site in ipairs(df.global.world.world_data.sites) do
if site.flags.Undiscovered then
site.flags.Undiscovered = false
if site.flag.HIDDEN then
site.flag.HIDDEN = false
count = count + 1
end
end
Expand Down

0 comments on commit 8f561a9

Please sign in to comment.