Skip to content

Commit

Permalink
Cleanup some Lua Diagnostics issues
Browse files Browse the repository at this point in the history
  • Loading branch information
veger committed Oct 22, 2024
1 parent fff071a commit 01c74ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local Camera = {}
--- @field screenshotIntervalRealtime number Interval (game ticks) between two screenshots for realtime transitions (calculated from frameRate)
--- @field screenshotIntervalTransition number Interval (game ticks) between two screenshots during transitions (calculated from frameRate)
--- @field speedGain number Amount (factor) that the timelapse movie should speed up compared to the game.
--- @field surfaceName string
--- @field surfaceName SurfaceIdentification
--- @field trackers Tracker.tracker[]
--- @field chartTags table Chart tags used to render viewfinder boxes on the map
--- @field width number
Expand Down
4 changes: 2 additions & 2 deletions scripts/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@ function GUI.onSelected(event)
elseif event.element.name == "camera-surface" then
playerSettings.cameras[playerSettings.guiPersist.selectedCamera].surfaceName = event.element.get_item(event
.element
.selected_index)
.selected_index) --[[@as SurfaceIdentification]]

GUI.createCameraTrackerList(playerSettings)
elseif event.element.name == "tracker-surface" then
playerSettings.trackers[playerSettings.guiPersist.selectedTracker].surfaceName = event.element.get_item(event
.element
.selected_index)
.selected_index) --[[@as SurfaceIdentification]]

GUI.createCameraTrackerList(playerSettings)
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ end
---@field minPos MapPosition.0
---@field maxPos MapPosition.0

---@param surface string
---@param surface SurfaceIdentification
---@return BaseBBox|nil
function Main.getBaseBBox(surface)
local entities = game.surfaces[surface].find_entities_filtered { force = "player" }
Expand Down
6 changes: 3 additions & 3 deletions scripts/tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ local Tracker = {}
--- @field name string
--- @field realtimeCamera boolean
--- @field smooth boolean When true, smooth transitions are enabled/required for this tracker
--- @field surfaceName string
--- @field surfaceName SurfaceIdentification
--- @field type string
--- @field untilBuild boolean
--- @field userCanEnable boolean When true, the user can enabled/disable the tracker, otherwise the tracker is controlled by TBLE
--- @field userCanEnable boolean When true, the user can enabled/disable the tracker, otherwise the tracker is controlled by TLBE
--- @field moveToNextTracker boolean|nil Disables the tracker after the cameras are processed (end of game tick)
--- @field changeId integer Incremented on each position/size change of the tracker
--- @field centerPos MapPosition.0|nil Center position of the tracker area (Calculated from minPos and maxPos)
Expand Down Expand Up @@ -87,7 +87,7 @@ end

---find the city block containing the position and relocate to that one
---@param tracker Tracker.tracker
---@param pos MapPosition.0|MapPosition.1
---@param pos MapPosition
function Tracker.focusCityBlock(tracker, pos)
local cityBlock = tracker.cityBlock
if cityBlock == nil then
Expand Down

0 comments on commit 01c74ad

Please sign in to comment.