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
@@ -67,7 +67,7 @@ SelectArea:on_selection(function(event)
for _, entity in ipairs(entities) do
local skip = false
local entity_position = entity.position --[[@as MapPosition.struct]]
local entity_position = entity.position
for _, pos in ipairs(hits) do
local x = abs(entity_position.x - pos.x)
local y = abs(entity_position.y - pos.y)
@@ -51,7 +51,7 @@ local function show_protected_entity(player, entity)
if renders[player.index][key] then return end
local selection_box = entity.selection_box --[[@as ExpUtil_AABB.Box]]
local rb = selection_box.right_bottom
local position = entity.position --[[@as MapPosition.struct]]
local position = entity.position
renders[player.index][key] = rendering.draw_sprite{
sprite = "utility/notification",
target = entity,