This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- @param player LuaPlayer | |
local function quickghostentity(player) | |
-- Get The Area To Check For Ghosts | |
local area = { { player.position.x - player.reach_distance, player.position.y - player.reach_distance }, { player.position.x + player.reach_distance, player.position.y + player.reach_distance } } | |
-- Get The Entities In The Area | |
local ghostList = player.surface.find_entities_filtered { area = area, type = "entity-ghost" } | |
local markupgradeentityList = player.surface.find_entities_filtered { area = area, to_be_upgraded = true } | |
local playerInventory = player.get_main_inventory() | |
local cursorItemStack = player.cursor_stack | |
if not playerInventory then return end |