Prototype/ItemEntity: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Basics == The entity used for items on the ground. Extends Prototype/Entity. == Properties == This prototype inherits all the properties from Prototype/Entity. ==...") |
(Updated styling of prototype doc migration note) |
||
(7 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/prototypes/ItemEntityPrototype.html https://lua-api.factorio.com/latest/prototypes/ItemEntityPrototype.html] | ||
The | |||
</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> | |||
This | |||
{{Prototype parent|Prototype/Entity}} | |||
The entity used for items on the ground. | |||
{{Prototype TOC|item-entity|no-properties=true}} | |||
== Mandatory values == | == Mandatory values == | ||
Item entity collision box has to have same width as height. | Item entity collision box has to have same width as height. | ||
== Example == | |||
<syntaxhighlight lang="lua"> { | |||
type = "item-entity", | |||
name = "item-on-ground", | |||
flags = {"placeable-off-grid", "not-on-map"}, | |||
collision_box = {{-0.14, -0.14}, {0.14, 0.14}}, | |||
selection_box = {{-0.17, -0.17}, {0.17, 0.17}}, | |||
minable = {mining_time = 0.025} | |||
}</syntaxhighlight> |
Latest revision as of 10:43, 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/prototypes/ItemEntityPrototype.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.
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/ItemEntity
The entity used for items on the ground.
Mandatory values
Item entity collision box has to have same width as height.
Example
{
type = "item-entity",
name = "item-on-ground",
flags = {"placeable-off-grid", "not-on-map"},
collision_box = {{-0.14, -0.14}, {0.14, 0.14}},
selection_box = {{-0.17, -0.17}, {0.17, 0.17}},
minable = {mining_time = 0.025}
}