Skip to content

fields_of

Python reference for nagasim.appearance.fields_of. Provisional: it may change between minor versions, see Appearance.

The look fields a conveyor type takes, in the order an editor lists them.

Parameters:

Name Type Description Default
kind str

A conveyor type: the piece's type param (belt, roller, mdr, chain, pallet).

required

Returns:

Type Description
tuple of str

The field names; () for an untyped piece or an unknown type.

See Also

nagasim.appearance.look_of : The fields resolved for one piece. nagasim.appearance.default : A field's value when a piece does not set it.

Examples:

>>> from nagasim.appearance import fields_of
>>> "belt_kind" in fields_of("belt"), "belt_kind" in fields_of("roller")
(True, False)