I need an entity with:
4 rotations
1 inventory that holds at least 1 item of any type
What is the best entity type to use?
Rotateable entity with inventory
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Rotateable entity with inventory
There's only 3 types that have variable inventory size in the first place. Wagons, Cars and Containers (yea, i didn't count logistic variants).
Containers don't rotate, wagons need rails, so there's only cars left. As a bonus you get filters. Unless you don't really need an actual inventory, in which case a constant combinator might work.
Containers don't rotate, wagons need rails, so there's only cars left. As a bonus you get filters. Unless you don't really need an actual inventory, in which case a constant combinator might work.
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: Rotateable entity with inventory
I don't need variable inventory size, just the ability to insert 1 item without silly restrictions like "ammo only".
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Rotateable entity with inventory
Oh. I misread as "1 item of each type" instead of "any type". Doesn't change my answer though. The only other things that have inventories are assembling machines, furnaces, players, etc. Things with too much behavior attached. There's no "container-with-rotations" except for the constant combinator...
What are you trying to do?
What are you trying to do?
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: Rotateable entity with inventory
Ultimately, I'm trying to overload an item so it can be used to build 2 different building ghosts.
My solution is to make the "ghost" a container with an invisible item-request proxy, then "revive" the ghost by replacing it with a real (4-way-rotateable) building.
My solution is to make the "ghost" a container with an invisible item-request proxy, then "revive" the ghost by replacing it with a real (4-way-rotateable) building.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Rotateable entity with inventory
What's wrong with the standard solution of simply surface.create_entity'ing the second building in when the first one is built in on_built_entity?
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.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Rotateable entity with inventory
Or maybe it's a rail that looks like a train. That's not relevant to the solution, just spawn stuff in. I.e use a simple-entity as proxy.
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.