Page 1 of 1

Simple-item-entity or equivalent.

Posted: Sat Aug 11, 2018 12:09 pm
by eradicator
Foreword:
I was experimenting with using item-on-ground entities as a visual representation of a chests content (i.e. a "stockpile").
Image

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.)

Re: Simple-item-entity or equivalent.

Posted: Sat Aug 11, 2018 6:34 pm
by Rseding91
This seems wildly outside of what I want the mod API to support. Simply use a chest.

Re: Simple-item-entity or equivalent.

Posted: Sun Aug 12, 2018 1:07 pm
by eradicator
Rseding91 wrote:This seems wildly outside of what I want the mod API to support. Simply use a chest.
Hm...:/. Even the "this item can't be picked up" flag on a standard item-entity?

(If i wan't clear, that blue frame above is a chest. The item-entities are purely for visual effect.

Re: Simple-item-entity or equivalent.

Posted: Fri Jan 04, 2019 6:26 pm
by Bilka
eradicator wrote: Sat Aug 11, 2018 12:09 pm add a new prototype that is soley used to show an item-icon in-world
Done, but a bit more flexible :D https://lua-api.factorio.com/0.17.0-pre ... raw_sprite