[2.0.20] ItemStackDefinition.quality should be QualityID

Place to report issues and suggest improvements to the API documentation.
User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[2.0.20] ItemStackDefinition.quality should be QualityID

Post by Cooldude2606 »

The type of "ItemStackDefinition.quality" is currently "string" but it should be "QualityID" (string or prototype).

All of the following commands work, showing that both string and prototype are accepted by "ItemStackDefinition.quality":
(params are of type "ItemStackIdentification" -> "SimpleItemStack" -> "ItemStackDefinition")

Code: Select all

/c game.player.surface.spill_item_stack{ position={5, 5}, stack={ name="iron-plate", quality="epic" } }
/c game.player.surface.spill_item_stack{ position={5, 5}, stack={ name="iron-plate", quality=prototypes.quality.epic } }
/c game.player.insert{ name="iron-plate", quality="epic" }
/c game.player.insert{ name="iron-plate", quality=prototypes.quality.epic }
/c game.player.get_main_inventory().find_empty_stack().set_stack{ name="iron-plate", quality="epic" }
/c game.player.get_main_inventory().find_empty_stack().set_stack{ name="iron-plate", quality=prototypes.quality.epic }
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
Post Reply

Return to “Documentation Improvement Requests”