[1.0.0] ghost_unit_number not set on LuaEntity

Bugs that are actually features.
Post Reply
banzai2004
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Sep 14, 2020 2:04 pm
Contact:

[1.0.0] ghost_unit_number not set on LuaEntity

Post by banzai2004 »

I'm trying to create a mod that uses "on_built_entity" events.
When this event is raised for a placed ghost, I understood that "event.created_entity" should have "ghost_unit_number" to show the number of the final entity.

But "ghost_unit_number" does not seem to exist:
screenshot of debugger
screenshot of debugger
2020-09-14 16_02_48-control.lua - Visual Studio Code.png (134.16 KiB) Viewed 276 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.0.0] ghost_unit_number not set on LuaEntity

Post by boskid »

Thanks for the report, i do not see anything wrong here. As far as i know, entity-ghost's inner entity is not assigned a unit number unless it is revived. When entity is destroyed and would leave entity ghost then ghost_unit_number would hold a unit number to be reused when ghost is revived.

Post Reply

Return to “Not a bug”