Skip to content

Commit 01c74ad

Browse files
committed
Cleanup some Lua Diagnostics issues
1 parent fff071a commit 01c74ad

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

scripts/camera.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ local Camera = {}
3535
--- @field screenshotIntervalRealtime number Interval (game ticks) between two screenshots for realtime transitions (calculated from frameRate)
3636
--- @field screenshotIntervalTransition number Interval (game ticks) between two screenshots during transitions (calculated from frameRate)
3737
--- @field speedGain number Amount (factor) that the timelapse movie should speed up compared to the game.
38-
--- @field surfaceName string
38+
--- @field surfaceName SurfaceIdentification
3939
--- @field trackers Tracker.tracker[]
4040
--- @field chartTags table Chart tags used to render viewfinder boxes on the map
4141
--- @field width number

scripts/gui.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,13 @@ function GUI.onSelected(event)
500500
elseif event.element.name == "camera-surface" then
501501
playerSettings.cameras[playerSettings.guiPersist.selectedCamera].surfaceName = event.element.get_item(event
502502
.element
503-
.selected_index)
503+
.selected_index) --[[@as SurfaceIdentification]]
504504

505505
GUI.createCameraTrackerList(playerSettings)
506506
elseif event.element.name == "tracker-surface" then
507507
playerSettings.trackers[playerSettings.guiPersist.selectedTracker].surfaceName = event.element.get_item(event
508508
.element
509-
.selected_index)
509+
.selected_index) --[[@as SurfaceIdentification]]
510510

511511
GUI.createCameraTrackerList(playerSettings)
512512
end

scripts/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ end
185185
---@field minPos MapPosition.0
186186
---@field maxPos MapPosition.0
187187

188-
---@param surface string
188+
---@param surface SurfaceIdentification
189189
---@return BaseBBox|nil
190190
function Main.getBaseBBox(surface)
191191
local entities = game.surfaces[surface].find_entities_filtered { force = "player" }

scripts/tracker.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ local Tracker = {}
77
--- @field name string
88
--- @field realtimeCamera boolean
99
--- @field smooth boolean When true, smooth transitions are enabled/required for this tracker
10-
--- @field surfaceName string
10+
--- @field surfaceName SurfaceIdentification
1111
--- @field type string
1212
--- @field untilBuild boolean
13-
--- @field userCanEnable boolean When true, the user can enabled/disable the tracker, otherwise the tracker is controlled by TBLE
13+
--- @field userCanEnable boolean When true, the user can enabled/disable the tracker, otherwise the tracker is controlled by TLBE
1414
--- @field moveToNextTracker boolean|nil Disables the tracker after the cameras are processed (end of game tick)
1515
--- @field changeId integer Incremented on each position/size change of the tracker
1616
--- @field centerPos MapPosition.0|nil Center position of the tracker area (Calculated from minPos and maxPos)
@@ -87,7 +87,7 @@ end
8787

8888
---find the city block containing the position and relocate to that one
8989
---@param tracker Tracker.tracker
90-
---@param pos MapPosition.0|MapPosition.1
90+
---@param pos MapPosition
9191
function Tracker.focusCityBlock(tracker, pos)
9292
local cityBlock = tracker.cityBlock
9393
if cityBlock == nil then

0 commit comments

Comments
 (0)