Prototype/ItemEntity: Difference between revisions

From Official Factorio Wiki
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. ==...")
 
(added example)
Line 7: Line 7:
== 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 = {hardness = 0.1, mining_time = 0.05}
  },</syntaxhighlight>

Revision as of 10:46, 25 June 2018

Basics

The entity used for items on the ground. Extends Prototype/Entity.

Properties

This prototype inherits all the properties from Prototype/Entity.

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 = {hardness = 0.1, mining_time = 0.05}
  },