Page 1 of 1

Add spider-leg prototype names to spidertron's LuaEntityPrototype

Posted: Sun Sep 18, 2022 4:26 pm
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 :)