Types/ModuleSpecification

From Official Factorio Wiki
Revision as of 17:51, 16 August 2023 by BilkaBot (talk | contribs) (Migrated prototype doc to separate website)
Jump to navigation Jump to search

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/ModuleSpecification.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.


Basics

The number of module slots in this entity, and their icon positions.

Optional properties

module_slots

Type: Types/ItemStackIndex

Default: 0

The number of module slots in this entity.

module_info_max_icons_per_row

Type: Types/uint8

Default: width of entity selection box / 0.75

module_info_max_icon_rows

Type: Types/uint8

Default: width of entity selection box / 1.5

module_info_icon_shift

Type: Types/vector

Default: {0, 0.7}

module_info_icon_scale

Type: Types/float

Default: 0.5

module_info_separation_multiplier

Type: Types/float

Default: 1.1

module_info_multi_row_initial_height_modifier

Type: Types/float

Default: -0.1

Example

module_specification =
{
  module_slots = 2,
  module_info_icon_shift = {0, 0.5},
  module_info_multi_row_initial_height_modifier = -0.3
}