Event after an entity is mined, with no item produced

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Event after an entity is mined, with no item produced

Post by sparr »

When on_*_mined_entity fires, the entity still exists in the world.

on_*_mined[_item] only fires if an item is produced, I think.

I need an event that fires at the same time on_*_mined[_item] would, but for cases where the entity has no minable.result
Bilka
Factorio Staff
Factorio Staff
Posts: 3320
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Event after an entity is mined, with no item produced

Post by Bilka »

What would that event contain? If the entity is no longer there it cannot contain the entity and since there are no items created when mining it, there are also no items it could contain. The only thing the game could provide you is the player/robot.

Furthermore, what would you use this for?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Event after an entity is mined, with no item produced

Post by sparr »

It would contain the identifier from my other feature request (viewtopic.php?f=28&t=69088) to link it to the previous entity_mined event.

I want to use this to do things to the game state after the entity has disappeared, possibly with some information about the entity saved from the past if there's no linking information.
Bilka
Factorio Staff
Factorio Staff
Posts: 3320
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Event after an entity is mined, with no item produced

Post by Bilka »

What would be the point of this event if your other request is accepted? What would be the point of it, if not?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Event after an entity is mined, with no item produced

Post by sparr »

If accepted, it would be for all the same purposes listed there, but for entities that don't produce an item when mining.

If not accepted, ditto, but with my script having to keep track of recently-mined entities separately and probably error-prone-ly.
Post Reply

Return to “Modding interface requests”