Types/IconSpecification: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.17)
(Removed old prototype docs)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation can now be found here: [https://lua-api.factorio.com/latest/index-prototype.html https://lua-api.factorio.com/latest/index-prototype.html]
Specifies the icon of an entity/item/technology/recipe etc. The properties are specified directly in the prototype, not in another sub-property.


Either <code>icons</code> and optionally <code>icon_size</code>, or both <code>icon</code> and <code>icon_size</code> have to be specified.
</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>
== Prototype properties: Option 1 ==
=== icons ===
'''Type''': [[Types/table]] of [[Types/IconData]]
 
The rendering order of the individual icons follows the table (array) order: Later added icons (higher index) get drawn on top of previously added icons (lower index).  
 
=== icon_size ===
'''Type''': [[Types/SpriteSizeType]]
 
Mandatory if <code>icon_size</code> is not specified inside all instances of [[Types/IconData]] inside <code>icons</code>. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.
 
=== icon_mipmaps ===
'''Type''': [[Types/uint8]]
 
'''Default''': 0
 
== Prototype properties: Option 2 ==
=== icon ===
'''Type''': [[Types/FileName]]
 
Path to the icon file.
=== icon_size ===
'''Type''': [[Types/SpriteSizeType]]
 
Mandatory. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation can now be found here: https://lua-api.factorio.com/latest/index-prototype.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.