Fix issue with MapPosition.energy

This commit is contained in:
Cooldude2606
2026-08-08 21:58:46 +01:00
parent d495a345d6
commit 1e861c5c0b
10 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -326,7 +326,7 @@ local function vlayer_gui_list_refresh(player)
for i = 1, vlayer.get_interface_counts()[vlayer_control_type_list[target]], 1 do
local entity = assert(interface[i])
local entity_position = entity.position --[[@as MapPosition.struct]]
local entity_position = entity.position
table.insert(full_list, i .. " X " .. entity_position.x .. " Y " .. entity_position.y)
end
+1 -1
View File
@@ -799,7 +799,7 @@ Event.on_nth_tick(math.floor(60 / config.update_smoothing), function()
end
-- Check if the player is within range
local warp_pos = warp.position --[[@as MapPosition.struct]]
local warp_pos = warp.position
if warp.surface == surface then
local dx, dy = px - warp_pos.x, py - warp_pos.y
local dist = (dx * dx) + (dy * dy)