Skip to content

Commit fdfa646

Browse files
committed
replace hardcoded hack with getHackPath()
1 parent 70460d4 commit fdfa646

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

gui/biomes.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ local guidm = require('gui.dwarfmode')
99
local INITIAL_LIST_HEIGHT = 5
1010
local INITIAL_INFO_HEIGHT = 15
1111

12-
local texturesOnOff8x12 = dfhack.textures.loadTileset('hack/data/art/on-off.png', 8, 12, true)
12+
local texturesOnOff8x12 = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/on-off.png', 8, 12, true)
1313
local LIST_ITEM_HIGHLIGHTED = dfhack.textures.getTexposByHandle(texturesOnOff8x12[1]) -- yellow-ish indicator
1414

15-
local texturesOnOff = dfhack.textures.loadTileset('hack/data/art/on-off_top-left.png', 32, 32, true)
15+
local texturesOnOff = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/on-off_top-left.png', 32, 32, true)
1616
local TILE_HIGHLIGHTED = dfhack.textures.getTexposByHandle(texturesOnOff[1]) -- yellow-ish indicator
1717
if TILE_HIGHLIGHTED < 0 then -- use a fallback
1818
TILE_HIGHLIGHTED = 88 -- `X`
1919
end
2020

21-
local texturesSmallLetters = dfhack.textures.loadTileset('hack/data/art/curses-small-letters_top-left.png', 32, 32, true)
21+
local texturesSmallLetters = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/curses-small-letters_top-left.png', 32, 32, true)
2222
local TILE_STARTING_SYMBOL = dfhack.textures.getTexposByHandle(texturesSmallLetters[1])
2323
if TILE_STARTING_SYMBOL < 0 then -- use a fallback
2424
TILE_STARTING_SYMBOL = 97 -- `a`

gui/design.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ function Design:init()
341341
local DESIGN_ICON_ROW_COUNT = 2
342342
local DESIGN_CHAR_WIDTH = 8
343343
local DESIGN_CHAR_HEIGHT = 12
344-
local shape_tileset = dfhack.textures.loadTileset('hack/data/art/design.png', DESIGN_CHAR_WIDTH, DESIGN_CHAR_HEIGHT, true)
344+
local shape_tileset = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/design.png', DESIGN_CHAR_WIDTH, DESIGN_CHAR_HEIGHT, true)
345345

346346
local STRIDE = DESIGN_ICONS_WIDTH / DESIGN_CHAR_WIDTH
347347
local CHARS_PER_ROW = DESIGN_ICONS_HEIGHT / (DESIGN_ICON_ROW_COUNT * DESIGN_CHAR_HEIGHT)

gui/mass-remove.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
--@ module = true
44

5-
local toolbar_textures = dfhack.textures.loadTileset('hack/data/art/mass_remove_toolbar.png', 8, 12)
5+
local toolbar_textures = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/mass_remove_toolbar.png', 8, 12)
66

77
local gui = require('gui')
88
local guidm = require('gui.dwarfmode')

gui/sitemap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local utils = require('utils')
55
local widgets = require('gui.widgets')
66
local overlay = require('plugins.overlay')
77

8-
local toolbar_textures = dfhack.textures.loadTileset('hack/data/art/sitemap_toolbar.png', 8, 12)
8+
local toolbar_textures = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/sitemap_toolbar.png', 8, 12)
99

1010
function launch_sitemap()
1111
dfhack.run_script('gui/sitemap')

gui/tiletypes.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ local UI_COLORS = {
3434
INVALID_OPTION= COLOR_RED,
3535
}
3636

37-
local TILESET = dfhack.textures.loadTileset('hack/data/art/tiletypes.png', 8, 12, true)
37+
local TILESET = dfhack.textures.loadTileset(dfhack.getHackPath()..'/data/art/tiletypes.png', 8, 12, true)
3838
local TILESET_STRIDE = 16
3939

4040
local DEFAULT_OPTIONS = {

notes.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local note_manager = reqscript('internal/notes/note_manager')
66

77
textures = {
88
green_pin = dfhack.textures.loadTileset(
9-
'hack/data/art/note_green_pin_map.png',
9+
dfhack.getHackPath()..'/data/art/note_green_pin_map.png',
1010
32,
1111
32,
1212
true

0 commit comments

Comments
 (0)