How to pave surface with 'stone-brick' via API?

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
yuriyzubarev
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jun 25, 2018 1:58 pm
Contact:

How to pave surface with 'stone-brick' via API?

Post by yuriyzubarev »

Greetings,

Tried:

1) surface.set_tiles{{name="stone-brick", position=p}}

2) surace.create_entity{name="stone-brick", position=p}

'stone-brick' wasn't recognized in both cases.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: How to pave surface with 'stone-brick' via API?

Post by eradicator »

As can be seen in data/base/prototypes/item/demo-item.lua "stone-brick" (item) places "stone-path" (tile).

Code: Select all

  {
    type = "item",
    name = "stone-brick",
    icon = "__base__/graphics/icons/stone-brick.png",
    icon_size = 32,
    flags = {"goes-to-main-inventory"},
    subgroup = "terrain",
    order = "a[stone-brick]",
    stack_size = 100,
    place_as_tile =
    {
      result = "stone-path",
      condition_size = 1,
      condition = { "water-tile" }
    }
  },

Post Reply

Return to “Modding discussion”