Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[reveal-hidden-sites] adjust code to use new field names #918

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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