luaEntity.get_mining_results()
Returns a temporary buffer of items that would be received if the entity was mined similar to on_player_mined_entity.
This would save a lot of hassle from trying to get all the products and contents and doing stuff with them.
luaEntity.get_mining_results()
Re: luaEntity.get_mining_results()
What's the use case?
There's already an "entity_mined" event that contains all of the items (and the entity) in an inventory you can manipulate.
There's already an "entity_mined" event that contains all of the items (and the entity) in an inventory you can manipulate.
If you want to get ahold of me I'm almost always on Discord.
Re: luaEntity.get_mining_results()
Getting results from a script that destroys() the item.
Right now I run through a function to loop through prototype products and build simple item stacks. Then I add all of the items from all the inventorys, inserter_hand etc of the entity
With the buffer I would be able to check that everything fits and increment/decrement the entity stacks/player stacks before destroying() the entity.
Right now I run through a function to loop through prototype products and build simple item stacks. Then I add all of the items from all the inventorys, inserter_hand etc of the entity
With the buffer I would be able to check that everything fits and increment/decrement the entity stacks/player stacks before destroying() the entity.