diff --git a/graphics/rm_Overlay.png b/graphics/rm_Overlay.png deleted file mode 100644 index e9b4dc3..0000000 Binary files a/graphics/rm_Overlay.png and /dev/null differ diff --git a/prototypes/prototypes.lua b/prototypes/prototypes.lua index 68c9a6b..d88cc1c 100644 --- a/prototypes/prototypes.lua +++ b/prototypes/prototypes.lua @@ -43,31 +43,6 @@ data:extend( }, }, - { - type = 'container', - name = 'rm_overlay', - flags = { 'placeable-neutral', 'player-creation', 'not-repairable' }, - icon = '__YARM__/graphics/rm_Overlay.png', - icon_size = 32, - - max_health = 1, - order = 'z[resource-monitor]', - - collision_mask = { layers = { resource = true } }, - collision_box = { { -0.35, -0.35 }, { 0.35, 0.35 } }, - - selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, - inventory_size = 1, - picture = - { - filename = '__YARM__/graphics/rm_Overlay.png', - priority = 'extra-high', - width = 32, - height = 32, - shift = { 0.0, 0.0 } - } - }, - { type = 'font', name = 'yarm-gui-font', diff --git a/resmon.lua b/resmon.lua index 1c30dbe..9a5771d 100644 --- a/resmon.lua +++ b/resmon.lua @@ -422,12 +422,14 @@ function resmon.put_marker_at(surface, pos, player_data) return end - local overlay = surface.create_entity { name = "rm_overlay", - force = game.forces.neutral, - position = pos } - overlay.minable = false - overlay.destructible = false - overlay.operable = false + local overlay = rendering.draw_rectangle { + left_top = { math.floor(pos.x), math.floor(pos.y) }, + right_bottom = { math.floor(pos.x+1), math.floor(pos.y+1) }, + filled = true, + color = { 0, 0, 0.5, 0.4 }, + surface = surface, + draw_on_ground = true, + } table.insert(player_data.overlays, overlay) end