Foreword:
I was experimenting with using item-on-ground entities as a visual representation of a chests content (i.e. a "stockpile").
Which has two problems:
a) I can't prevent inserters from directly interacting with the item-entity (though this can supposedly already be done in 0.17)
b) I can't prevent players from picking up the item-entities.
What?
Either add a flag that makes item-entities un-interactable, or add a new prototype that is soley used to show an item-icon in-world. Bonus points if there's some way to scale the icon in-world.
Why?
Because it looks nice ;). Yea...not the most convincing argument, so i'll just hope it's easy enough to add. Decorative items also have other use-cases for nicing-up the looks of the factory.
(Btw, performance wise i can update about 18k stacks, i.e. 180 stockpiles like the one above, per minute with an impact of 0.02ms on a 2Ghz system. I thought about using tree-variations but they only support 255 per entity, and decoratives would have to be re-spawned every time a stack changes, which i assume would be more expensive.)
Simple-item-entity or equivalent.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Simple-item-entity or equivalent.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Simple-item-entity or equivalent.
This seems wildly outside of what I want the mod API to support. Simply use a chest.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Simple-item-entity or equivalent.
Hm...:/. Even the "this item can't be picked up" flag on a standard item-entity?Rseding91 wrote:This seems wildly outside of what I want the mod API to support. Simply use a chest.
(If i wan't clear, that blue frame above is a chest. The item-entities are purely for visual effect.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Simple-item-entity or equivalent.
Done, but a bit more flexible :D https://lua-api.factorio.com/0.17.0-pre ... raw_spriteeradicator wrote: Sat Aug 11, 2018 12:09 pm add a new prototype that is soley used to show an item-icon in-world
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.