I recently started working on my first small mod (first one that is meant to be consistent), and one of my ideas is to have an inserter with ability to choose where from and where to the inserter should be transporting items.
I set up an event listener onbuiltentity, obtained handle createdentity to variable called z, and now comes the tricky part. I wanted to use:
Code: Select all
z.pickup_position = {0, -4}
Shouldn't Inserter, which is based on EntityWithHealth, which is based on Entity, have such property?
pickup_position certainly is used when prototyping the inserter, so I like to think my logic was not completely wrong.
Was it so dumb to try and change things that are in prototypes? Do I have to rewrite whole inserter behaviour to achieve the effect or is there a gimmick that I don't know about? (I know a solid bit of C++, but Lua is new to me so I have some trouble when it comes to classes and inheritance).
I'd be very thankful for any help on the matter, because I don't fancy writing some quasi inserters from scratch until it's necessary.