SEWebAPI
SEWebAPI copied to clipboard
List valid item type classes for container
Include some type of indicator on a block get which provides the rest end user the ability to identify what types of items this block can potentially contain. Take care to list and deal with placing items in the right class of inventory in the case of assembler and refiner.
This is to support a remote interface in its ability to get a list of all possible targets for moving a class of item around.
As an example:
GET http://sewa.mine.nu/4Cl0xlirgcOOJ7SU/blocks/83572021464198810
{
"name": "Large Reactor 1",
"type": "MyReactor",
"id": 83572021464198810,
"properties": {
"OnOff": "True",
"ShowInTerminal": "True",
"ShowInToolbarConfig": "True",
"ShowOnHUD": "False",
"UseConveyor": "True"
}
"itemClasses": {
"Ore": "True",
"Ingot": "True",
"Component": True"
}
}
Note that I'm assuming that component is the same class as player tools (welder, grinder, rifle), but if they are handled differently in code, include that as a distinct itemClass.