Simple-item-entity or equivalent.

Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Simple-item-entity or equivalent.

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

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple-item-entity or equivalent.

Post by Rseding91 »

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.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Simple-item-entity or equivalent.

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

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Simple-item-entity or equivalent.

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”