Types/ModuleSpecification: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Changed links going to the redirect Types/uint to go to Types/uint32.)
(Updated styling of prototype doc migration note)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="stub"><p>'''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 https://lua-api.factorio.com/latest/types/ModuleSpecification.html]
</p><p>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 [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
==Basics==
==Basics==
The number of module slots in this entity, and their icon positions.  
The number of module slots in this entity, and their icon positions.  


== Mandatory properties ==
== Optional properties ==
=== module_slots ===
=== module_slots ===
'''Type''': [[Types/uint32]]
'''Type''': [[Types/ItemStackIndex]]
 
'''Default''': 0


The number of module slots in this entity.
The number of module slots in this entity.
== Optional properties ==
 
==== module_info_icon_shift ====
=== 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]]
'''Type''': [[Types/vector]]


==== module_info_multi_row_initial_height_modifier ====
'''Default''': {0, 0.7}
'''Type''': [[Types/double]]
 
=== 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==
==Example==

Latest revision as of 10:42, 21 September 2023

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
}