Document allowable equipment types

Place to report issues and suggest improvements to the API documentation.
robot256
Smart Inserter
Smart Inserter
Posts: 1420
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Document allowable equipment types

Post by robot256 »

I could be missing it, but it seems like the fastest way to tell what values LuaEquipment::type or LuaEquipmentPrototype::type can take is to go to [EquipmentPrototype](https://lua-api.factorio.com/latest/pro ... otype.html) and expand the list of children prototypes. I was trying to use LuaPrototypes::find_equipment_filtered() with the 'type' filter and it took me way too long to find that what I was looking for was "inventory-bonus-equipment".

It would be really nice to have a direct reference to that list in LuaPrototypes::find_equipment_filtered(), LuaEquipment::type and LuaEquipmentPrototype::type.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 325
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Document allowable equipment types

Post by Osmo »

As far as a i know, this is not a thing that happens with items, entities, or anything else, so adding it to just equipments will be weird.
robot256
Smart Inserter
Smart Inserter
Posts: 1420
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Document allowable equipment types

Post by robot256 »

Yeah, I know it was mostly my brain being stupid and wondering why "type='toolbelt'" wasn't working. For some reason it didn't click for me that "type" for equipment was in the same flat namespace as the types of all the other entities/items. I was thinking about it like defines.inventory... If I had gone and looked at the toolbelt prototype I would have seen the type listed there.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Post Reply

Return to “Documentation Improvement Requests”