Closed NiftyManiac closed 7 years ago
on_preplayer_mined_item is fired when a note is destroyed via right-click. Nothing is fired if
Could probably be solved by not reviving the invis-note until after the entity it is placed with is revived.
This would also have an added benefit of indexing the note on the unit_number of the entity resulting in faster lookups
Not a fan of that idea... I don't like ghosts having invisible state that only shows up when they're built. Though I can't think of a better fix besides searching all nearby entities on every on_construction. Maybe I can use on_put_item to figure out what ghosts will be deleted by the placement.
Damn, ghosts disappearing via deconstruction planner seems completely undetectable.
Mostly fixed. Only time a note fails to be removed is if a ghost is deconstructed without the invis_note. Probably nothing I can do there, since no events are fired.
A ghost with a note is placed. If a new building is placed on top of the ghost, the ghost dies but the note stays alive.