Skip to content

Commit e6e8bc7

Browse files
committed
Namespace modules
1 parent e0782ee commit e6e8bc7

File tree

17 files changed

+364
-344
lines changed

17 files changed

+364
-344
lines changed

dist/library/modules/buildings.lua

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,96 +9,96 @@
99
---@field findPenPitAt function
1010
dfhack.buildings = {}
1111

12-
---@param building building
13-
---@param type general_ref_type
14-
---@return general_ref
12+
---@param building df.building
13+
---@param type df.general_ref_type
14+
---@return df.general_ref
1515
function dfhack.buildings.getGeneralRef(building, type) end
1616

17-
---@param building building
18-
---@param type specific_ref_type
19-
---@return specific_ref
17+
---@param building df.building
18+
---@param type df.specific_ref_type
19+
---@return df.specific_ref
2020
function dfhack.buildings.getSpecificRef(building, type) end
2121

22-
---@param bld building_civzonest
23-
---@param unit unit
22+
---@param bld df.building_civzonest
23+
---@param unit df.unit
2424
---@return boolean
2525
function dfhack.buildings.setOwner(bld, unit) end
2626

27-
---@param pos coord
28-
---@param type building_type
27+
---@param pos df.coord
28+
---@param type df.building_type
2929
---@param subtype integer
3030
---@param custom integer
31-
---@return building
31+
---@return df.building
3232
function dfhack.buildings.allocInstance(pos, type, subtype, custom) end
3333

34-
---@param pos coord
35-
---@param size coord2d
36-
---@param ext building_extents
34+
---@param pos df.coord
35+
---@param size df.coord2d
36+
---@param ext df.building_extents
3737
---@param createext boolean|nil
3838
---@param allowoccupied boolean|nil
3939
---@param allowwall boolean|nil
4040
---@param allowflow boolean|nil
4141
---@return boolean
4242
function dfhack.buildings.checkFreeTiles(pos, size, ext, createext, allowoccupied, allowwall, allowflow) end
4343

44-
---@param ext building_extents
44+
---@param ext df.building_extents
4545
---@param defval integer
4646
---@return integer
4747
function dfhack.buildings.countExtentTiles(ext, defval) end
4848

49-
---@param pos coord
50-
---@param size coord2d
49+
---@param pos df.coord
50+
---@param size df.coord2d
5151
---@return boolean
5252
function dfhack.buildings.hasSupport(pos, size) end
5353

54-
---@param bld building
54+
---@param bld df.building
5555
---@return boolean
5656
function dfhack.buildings.constructAbstract(bld) end
5757

58-
---@param bld building
59-
---@param items DFVector<item>
58+
---@param bld df.building
59+
---@param items df.DFVector<item>
6060
---@return boolean
6161
function dfhack.buildings.constructWithItems(bld, items) end
6262

63-
---@param bld building
64-
---@param items DFVector<job_item>
63+
---@param bld df.building
64+
---@param items df.DFVector<job_item>
6565
---@return boolean
6666
function dfhack.buildings.constructWithFilters(bld, items) end
6767

68-
---@param bld building
68+
---@param bld df.building
6969
---@return boolean
7070
function dfhack.buildings.deconstruct(bld) end
7171

72-
---@param bld building
72+
---@param bld df.building
7373
---@return nil
7474
function dfhack.buildings.notifyCivzoneModified(bld) end
7575

76-
---@param bld building
76+
---@param bld df.building
7777
---@return boolean
7878
function dfhack.buildings.markedForRemoval(bld) end
7979

80-
---@param building building
81-
---@param unit unit
80+
---@param building df.building
81+
---@param unit df.unit
8282
---@return string
8383
function dfhack.buildings.getRoomDescription(building, unit) end
8484

85-
---@param building building
85+
---@param building df.building
8686
---@return boolean
8787
function dfhack.buildings.isActivityZone(building) end
8888

89-
---@param building building
89+
---@param building df.building
9090
---@return boolean
9191
function dfhack.buildings.isPenPasture(building) end
9292

93-
---@param building building
93+
---@param building df.building
9494
---@return boolean
9595
function dfhack.buildings.isPitPond(building) end
9696

97-
---@param building building
97+
---@param building df.building
9898
---@return boolean
9999
function dfhack.buildings.isActive(building) end
100100

101-
---@param bld building
101+
---@param bld df.building
102102
---@return nil
103103
function dfhack.buildings.completeBuild(bld) end
104104

dist/library/modules/burrows.lua

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@ dfhack.burrows = {}
99

1010
---@param name string
1111
---@param ignorefinalplus boolean|nil
12-
---@return burrow
12+
---@return df.burrow
1313
function dfhack.burrows.findByName(name, ignorefinalplus) end
1414

15-
---@param burrow burrow
15+
---@param burrow df.burrow
1616
---@return nil
1717
function dfhack.burrows.clearUnits(burrow) end
1818

19-
---@param burrow burrow
20-
---@param unit unit
19+
---@param burrow df.burrow
20+
---@param unit df.unit
2121
---@return boolean
2222
function dfhack.burrows.isAssignedUnit(burrow, unit) end
2323

24-
---@param burrow burrow
25-
---@param unit unit
24+
---@param burrow df.burrow
25+
---@param unit df.unit
2626
---@param enable boolean|nil
2727
---@return nil
2828
function dfhack.burrows.setAssignedUnit(burrow, unit, enable) end
2929

30-
---@param burrow burrow
30+
---@param burrow df.burrow
3131
---@return nil
3232
function dfhack.burrows.clearTiles(burrow) end
3333

34-
function dfhack.burrows.isAssignedTile() end
34+
---@return unknown
35+
function dfhack.burrows.isAssignedTile(...) end
3536

36-
function dfhack.burrows.setAssignedTile() end
37+
---@return unknown
38+
function dfhack.burrows.setAssignedTile(...) end
3739

dist/library/modules/constructions.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
---@field findAtTile function
77
dfhack.constructions = {}
88

9-
---@param pos coord
10-
---@param type construction_type
11-
---@param item item_type
9+
---@param pos df.coord
10+
---@param type df.construction_type
11+
---@param item df.item_type
1212
---@param matindex integer
1313
---@return boolean
1414
function dfhack.constructions.designateNew(pos, type, item, matindex) end
1515

16-
---@param constr construction
16+
---@param constr df.construction
1717
---@return boolean
1818
function dfhack.constructions.insert(constr) end
1919

dist/library/modules/designations.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
---@field getPlantDesignationTile function
66
dfhack.designations = {}
77

8-
---@param plant plant
8+
---@param plant df.plant
99
---@return boolean
1010
function dfhack.designations.markPlant(plant) end
1111

12-
---@param plant plant
12+
---@param plant df.plant
1313
---@return boolean
1414
function dfhack.designations.unmarkPlant(plant) end
1515

16-
---@param plant plant
16+
---@param plant df.plant
1717
---@return boolean
1818
function dfhack.designations.canMarkPlant(plant) end
1919

20-
---@param plant plant
20+
---@param plant df.plant
2121
---@return boolean
2222
function dfhack.designations.canUnmarkPlant(plant) end
2323

24-
---@param plant plant
24+
---@param plant df.plant
2525
---@return boolean
2626
function dfhack.designations.isPlantMarked(plant) end
2727

dist/library/modules/dfhack.lua

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,37 @@
1717
dfhack = {}
1818

1919
---@return string
20-
function dfhack.getOSType() end
20+
function dfhack.getOSType(...) end
2121

2222
---@return integer
23-
function dfhack.getArchitecture() end
23+
function dfhack.getArchitecture(...) end
2424

2525
---@return string
26-
function dfhack.getArchitectureName() end
26+
function dfhack.getArchitectureName(...) end
2727

2828
---@return string
29-
function dfhack.getDFVersion() end
29+
function dfhack.getDFVersion(...) end
3030

3131
---@return string
32-
function dfhack.getDFPath() end
32+
function dfhack.getDFPath(...) end
3333

3434
---@return integer
35-
function dfhack.getTickCount() end
35+
function dfhack.getTickCount(...) end
3636

3737
---@return string
38-
function dfhack.getHackPath() end
38+
function dfhack.getHackPath(...) end
3939

4040
---@return boolean
41-
function dfhack.isWorldLoaded() end
41+
function dfhack.isWorldLoaded(...) end
4242

4343
---@return boolean
44-
function dfhack.isMapLoaded() end
44+
function dfhack.isMapLoaded(...) end
4545

4646
---@return boolean
47-
function dfhack.isSiteLoaded() end
47+
function dfhack.isSiteLoaded(...) end
4848

49-
function dfhack.TranslateName() end
49+
---@return unknown
50+
function dfhack.TranslateName(...) end
5051

5152
---@param s string
5253
---@return string

dist/library/modules/filesystem.lua

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
dfhack.filesystem = {}
88

99
---@return string
10-
function dfhack.filesystem.getcwd() end
10+
function dfhack.filesystem.getcwd(...) end
1111

1212
---@return boolean
13-
function dfhack.filesystem.restore_cwd() end
13+
function dfhack.filesystem.restore_cwd(...) end
1414

1515
---@return string
16-
function dfhack.filesystem.get_initial_cwd() end
16+
function dfhack.filesystem.get_initial_cwd(...) end
1717

1818
---@param path string
1919
---@return boolean
@@ -43,9 +43,12 @@ function dfhack.filesystem.isfile(path) end
4343
---@return boolean
4444
function dfhack.filesystem.isdir(path) end
4545

46-
function dfhack.filesystem.atime() end
46+
---@return unknown
47+
function dfhack.filesystem.atime(...) end
4748

48-
function dfhack.filesystem.ctime() end
49+
---@return unknown
50+
function dfhack.filesystem.ctime(...) end
4951

50-
function dfhack.filesystem.mtime() end
52+
---@return unknown
53+
function dfhack.filesystem.mtime(...) end
5154

0 commit comments

Comments
 (0)