Dont return inventory contents when destroyed
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Dont return inventory contents when destroyed
I am creating infinite chest and I dont want to get items that are in chest when destroyed. I am using defines.events.on_player_mined_entity but that buffer inventory only contains chest itself and I cannot clear items that was in chest.
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Re: Dont return inventory contents when destroyed
Thanks, but its strange that buffer does not contain items from inventory
Re: Dont return inventory contents when destroyed
AndMineGame159 wrote:Thanks, but its strange that buffer does not contain items from inventory
https://lua-api.factorio.com/latest/Con ... nityFilter
https://lua-api.factorio.com/latest/Lua ... ity_filter
https://lua-api.factorio.com/latest/Lua ... ty_filters
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Re: Dont return inventory contents when destroyed
What there are infinity filters?darkfrei wrote:AndMineGame159 wrote:Thanks, but its strange that buffer does not contain items from inventory
https://lua-api.factorio.com/latest/Con ... nityFilter
https://lua-api.factorio.com/latest/Lua ... ity_filter
https://lua-api.factorio.com/latest/Lua ... ty_filters
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Re: Dont return inventory contents when destroyed
Whooohoo. I had it working fine with lot of events but thats a lot easier thanks.darkfrei wrote:AndMineGame159 wrote:Thanks, but its strange that buffer does not contain items from inventory
https://lua-api.factorio.com/latest/Con ... nityFilter
https://lua-api.factorio.com/latest/Lua ... ity_filter
https://lua-api.factorio.com/latest/Lua ... ty_filters
Re: Dont return inventory contents when destroyed
Can you show some examples?MineGame159 wrote:Whooohoo. I had it working fine with lot of events but thats a lot easier thanks.
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Re: Dont return inventory contents when destroyed
Code? Or finished chest? For code i just grabbed steel-chest prototype modified picture and added one property to it.darkfrei wrote:Can you show some examples?MineGame159 wrote:Whooohoo. I had it working fine with lot of events but thats a lot easier thanks.
Edit: ohh you meant my old code. I will try to get it back because i deleted it but maybe
Re: Dont return inventory contents when destroyed
Have you looked at the "infinity-container" entity type? It's a chest that can spawn infinite items and you can set it to not give items back when mined via a setting in the prototype.
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 38
- Joined: Sun Apr 16, 2017 1:54 pm
- Contact:
Re: Dont return inventory contents when destroyed
Yeah darkfrei mentioned itRseding91 wrote:Have you looked at the "infinity-container" entity type? It's a chest that can spawn infinite items and you can set it to not give items back when mined via a setting in the prototype.