Page 1 of 1

Prototypes: Tiles

Posted: Sun Mar 05, 2017 8:00 pm
by darkfrei
Hi all!
\data\base\prototypes\tile\tiles.lua
Here is some code:

Code: Select all

    { type = "tile", name = "hazard-concrete-left",
      needs_correction = false,
      next_direction = "hazard-concrete-right",
      minable = {hardness = 0.2, mining_time = 0.5, result = "hazard-concrete"},
      mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" },
      collision_mask = {"ground-tile"},
      walking_speed_modifier = 1.4,
      layer = 61,
      decorative_removal_probability = 0.9,
variants = { ... },
walking_sound = { ... },
      map_color={r=0.5, g=0.5, b=0},
      ageing=0,
      vehicle_friction_modifier = concrete_vehicle_speed_modifier
    },
What is next_direction? Here was nothig about it.
http://lua-api.factorio.com/latest/LuaT ... otype.html
And what is ageing?

Re: Prototypes: Tiles

Posted: Sun Mar 05, 2017 8:12 pm
by daniel34
next_direction is the tile that is next selected when you rotate it while laying, so it can switch between hazard-concrete-left and hazard-concrete-right because these are defined as different tiles.

ageing is the amount of pollution that the tile will absorb.

Re: Prototypes: Tiles

Posted: Sun Mar 05, 2017 8:18 pm
by darkfrei
daniel34 wrote:ageing is the amount of pollution that the tile will absorb.
Like emissions_per_tick?
emissions_per_tick :: double [Read-only]
Amount of pollution emissions per tick this tile will absorb.

Re: Prototypes: Tiles

Posted: Sun Mar 05, 2017 8:50 pm
by Rseding91
darkfrei wrote:What is next_direction? Here was nothig about it.
http://lua-api.factorio.com/latest/LuaT ... otype.html
That is the API docs not the prototype docs (which don't exist). They're 2 completely different things.

Re: Prototypes: Tiles

Posted: Sun Mar 05, 2017 9:40 pm
by daniel34
darkfrei wrote:
daniel34 wrote:ageing is the amount of pollution that the tile will absorb.
Like emissions_per_tick?
emissions_per_tick :: double [Read-only]
Amount of pollution emissions per tick this tile will absorb.
I don't know what unit they use, but you can compare the ageing of other tiles in tiles.lua with this list and calculate it yourself:
https://wiki.factorio.com/Pollution#Chunks