From 3311df49c44b74db227b82dcd67fc4ba7207c005 Mon Sep 17 00:00:00 2001 From: Christian Doczkal <20443222+chdoc@users.noreply.github.com> Date: Sat, 21 Mar 2026 14:08:28 +0100 Subject: [PATCH] replace hardcoded `hack` with `getHackPath()` --- assign-profile.lua | 2 +- gui/launcher.lua | 2 +- internal/quickfort/aliases.lua | 2 +- internal/quickfort/set.lua | 2 +- quickstart-guide.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assign-profile.lua b/assign-profile.lua index d1207a44bf..70ce2ac600 100644 --- a/assign-profile.lua +++ b/assign-profile.lua @@ -92,7 +92,7 @@ local scripts = { FACETS = reqscript("assign-facets"), } -local default_filename = "/hack/scripts/dwarf_profiles.json" +local default_filename = dfhack.getHackPath().."/scripts/dwarf_profiles.json" -- ------------------------------------------------- APPLY PROFILE -------------------------------------------------- -- --- Apply the given profile to a unit, erasing or resetting the unit characteristics as requested. diff --git a/gui/launcher.lua b/gui/launcher.lua index 2ba8246ab1..70d85621de 100644 --- a/gui/launcher.lua +++ b/gui/launcher.lua @@ -26,7 +26,7 @@ local SCROLLBACK_CHARS = 2^18 local PERSISTED_SCROLLBACK_CHARS = 2^15 config = config or json.open('dfhack-config/launcher.json') -base_freq = base_freq or json.open('hack/data/base_command_counts.json') +base_freq = base_freq or json.open(dfhack.getHackPath()..'/data/base_command_counts.json') user_freq = user_freq or json.open('dfhack-config/command_counts.json') -- track whether the user has enabled dev mode diff --git a/internal/quickfort/aliases.lua b/internal/quickfort/aliases.lua index 7f09922c7a..27f63d11e7 100644 --- a/internal/quickfort/aliases.lua +++ b/internal/quickfort/aliases.lua @@ -11,7 +11,7 @@ local quickfort_reader = reqscript('internal/quickfort/reader') local log = quickfort_common.log -common_aliases_filename = 'hack/data/quickfort/aliases-common.txt' +common_aliases_filename = dfhack.getHackPath()..'/data/quickfort/aliases-common.txt' user_aliases_filename = 'dfhack-config/quickfort/aliases.txt' -- special keycode shortcuts inherited from python quickfort. diff --git a/internal/quickfort/set.lua b/internal/quickfort/set.lua index 8bc33df5b5..531503f247 100644 --- a/internal/quickfort/set.lua +++ b/internal/quickfort/set.lua @@ -7,7 +7,7 @@ end local settings = { blueprints_user_dir={default_value='dfhack-config/blueprints'}, - blueprints_library_dir={default_value='hack/data/blueprints'}, + blueprints_library_dir={default_value=dfhack.getHackPath()..'/data/blueprints'}, force_marker_mode={default_value=false}, stockpiles_max_barrels={default_value=-1}, stockpiles_max_bins={default_value=-1}, diff --git a/quickstart-guide.lua b/quickstart-guide.lua index e5352ce6ca..4194dc0a59 100644 --- a/quickstart-guide.lua +++ b/quickstart-guide.lua @@ -3,7 +3,7 @@ local gui = require('gui') local widgets = require('gui.widgets') -local GUIDE_FILE = 'hack/docs/docs/Quickstart.txt' +local GUIDE_FILE = dfhack.getHackPath()..'/docs/docs/Quickstart.txt' local function add_section_widget(sections, section) if #section == 0 then return end