Add spider-leg prototype names to spidertron's LuaEntityPrototype

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 442
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Add spider-leg prototype names to spidertron's LuaEntityPrototype

Post by Stringweasel »

What
For a spider-vehicle extend LuaEntityPrototype to contain the names of the spidertron's leg prototypes.

For example:

Code: Select all

spider_legs :: array[String]?	[R]  | The prototype names of each of the spider-vehicle's legs.
I don't mind about all the SpiderEnginePrototype information, and only really need the prototype names. I'd rather only have the prototype names than nothing :P
Why
For spiders the most important collision behaviour is contained in the legs which makes it really important to be able to access the leg prototypes for a specific spider type. Currently it's only possible to determine the names using spider.get_spider_legs(), but's that's only possible if you have the spider entity already, which is often not the case.

My current workarourd is to create a temporary spider, get the leg, get the collision mask, and then destroy it again. It's a really ugly workaround though, and would love if I can save others from having to do the same :)
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Post Reply

Return to “Modding interface requests”