Read access for createdByCorpse on entity ghosts

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 108
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Read access for createdByCorpse on entity ghosts

Post by Cooldude2606 »

I want to be able to get all entity ghosts in an area that were created by an entity being destroyed and not from a blueprint or other player created ghost. In 1.1 I would use "ghost.time_to_live ~= 4294967295" to test if the ghost would expire; ghosts no longer expire in 2.0 so I can not use this logic.

In game when an entity is destroyed it will create a ghost that renders as a marker, at first I thought I could test if there was a ghost and remnant in the same position but this same setup could be created by a player so was not useful. I asked around and was informed that "createdByCorpse" exists internally and is used to indicate that it should be drawn as a marker. I would like read access to this property, my use case only requires a boolean but others may want the reference to the corpse entity.

(It would be great if it chould also be an EntitySearchFilter to reduce iteration on the lua side, but that sounds complex for this limited use case)
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
Post Reply

Return to “Modding interface requests”