Prototype/Beacon: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.16)
Line 5: Line 5:
*[[Beacon|Beacon]]
*[[Beacon|Beacon]]
== Properties ==
== Properties ==
=== allowed_effects ===
=== energy_usage ===
'''Type''': [[Types/AllowedEffects]]
'''Type''': [[Types/Energy]]
 
=== animation ===
'''Type''': [[Types/Animation]]
 
The animation for the Beacon, when in use.
 
=== animation_shadow ===
'''Type''': [[Types/Animation]]


The types of modules that a player can place inside of the Beacon.
=== energy_source ===
'''Type''': [[Types/EnergySource]]


=== base_picture ===
=== base_picture ===
'''Type''': [[Types/Sprite]]
'''Type''': [[Types/Sprite]]
The picture of the Beacon when it is not on.
The picture of the Beacon when it is not on.
=== animation ===
'''Type''': [[Types/Animation]]
The animation for the Beacon, when in use.


=== supply_area_distance ===
=== supply_area_distance ===
'''Type''': [[Types/double]]
'''Type''': [[Types/double]]


The maximum distance that this Beacon can supply it's neighbors with it's module's effects.
The maximum distance that this Beacon can supply it's neighbors with it's module's effects. Max distance is 64.
 
=== radius_visualisation_picture ===
'''Type''': [[Types/Sprite]]


=== energy_source ===
=== allowed_effects ===
'''Type''': [[Types/EnergySource]]
'''Type''': [[Types/AllowedEffects]]


=== energy_usage ===
The types of modules that a player can place inside of the Beacon.
'''Type''': [[Types/EnergyUsage]]


=== distribution_effectivity ===
=== distribution_effectivity ===
'''Type''': [[Types/double]]
'''Type''': [[Types/double]]


The multiplier of the module's effects, when shared between neighbors. default is 0.5.
The multiplier of the module's effects, when shared between neighbors.


=== module_specification ===
=== module_specification ===
Line 40: Line 48:


== Example ==
== Example ==
 
<syntaxhighlight lang="lua">{
  type = "beacon",
  name = "beacon",
  icon = "__base__/graphics/icons/beacon.png",
  icon_size = 32,
  flags = {"placeable-player", "player-creation"},
  minable = {mining_time = 1, result = "beacon"},
  max_health = 200,
  corpse = "big-remnants",
  dying_explosion = "medium-explosion",
  collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
  selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
  allowed_effects = {"consumption", "speed", "pollution"},
  base_picture =
  {
    filename = "__base__/graphics/entity/beacon/beacon-base.png",
    width = 116,
    height = 93,
    shift = { 0.34375, 0.046875}
  },
  animation =
  {
    filename = "__base__/graphics/entity/beacon/beacon-antenna.png",
    width = 54,
    height = 50,
    line_length = 8,
    frame_count = 32,
    shift = { -0.03125, -1.71875},
    animation_speed = 0.5
  },
  animation_shadow =
  {
    filename = "__base__/graphics/entity/beacon/beacon-antenna-shadow.png",
    width = 63,
    height = 49,
    line_length = 8,
    frame_count = 32,
    shift = { 3.140625, 0.484375},
    animation_speed = 0.5
  },
  radius_visualisation_picture =
  {
    filename = "__base__/graphics/entity/beacon/beacon-radius-visualization.png",
    width = 10,
    height = 10
  },
  supply_area_distance = 3,
  energy_source =
   {
   {
     type = "beacon",
     type = "electric",
     name = "beacon",
     usage_priority = "secondary-input"
    icon = "__base__/graphics/icons/beacon.png",
    flags = {"placeable-player", "player-creation"},
    minable = {mining_time = 1, result = "beacon"},
    max_health = 200,
    corpse = "big-remnants",
    dying_explosion = "medium-explosion",
    collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
    selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
    allowed_effects = {"consumption", "speed", "pollution"},
    base_picture =
    {
      filename = "__base__/graphics/entity/beacon/beacon-base.png",
      width = 116,
      height = 93,
      shift = { 0.34375, 0.046875}
    },
    animation =
    {
      filename = "__base__/graphics/entity/beacon/beacon-antenna.png",
      width = 54,
      height = 50,
      line_length = 8,
      frame_count = 32,
      shift = { -0.03125, -1.71875},
      animation_speed = 0.5
    },
    supply_area_distance = 3,
    energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input"
    },
    vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
    energy_usage = "480kW",
    distribution_effectivity = 0.5,
    module_specification =
    {
      module_slots = 2,
      module_info_icon_shift = {0, 0.5},
      module_info_multi_row_initial_height_modifier = -0.3
    }
   },
   },
  vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
  energy_usage = "480kW",
  distribution_effectivity = 0.5,
  module_specification =
  {
    module_slots = 2,
    module_info_icon_shift = {0, 0.5},
    module_info_multi_row_initial_height_modifier = -0.3
  }
},</syntaxhighlight>

Revision as of 11:21, 1 January 2018

Basics

Entity with the ability to transfer module's effects to it's neighboring entities. Extends the Prototype/EntityWithHealth

Usage in base

Properties

energy_usage

Type: Types/Energy

animation

Type: Types/Animation

The animation for the Beacon, when in use.

animation_shadow

Type: Types/Animation

energy_source

Type: Types/EnergySource

base_picture

Type: Types/Sprite

The picture of the Beacon when it is not on.

supply_area_distance

Type: Types/double

The maximum distance that this Beacon can supply it's neighbors with it's module's effects. Max distance is 64.

radius_visualisation_picture

Type: Types/Sprite

allowed_effects

Type: Types/AllowedEffects

The types of modules that a player can place inside of the Beacon.

distribution_effectivity

Type: Types/double

The multiplier of the module's effects, when shared between neighbors.

module_specification

Type: Types/ModuleSpecification

The number of module slots in this beacon, and their icon positions.

Example

{
  type = "beacon",
  name = "beacon",
  icon = "__base__/graphics/icons/beacon.png",
  icon_size = 32,
  flags = {"placeable-player", "player-creation"},
  minable = {mining_time = 1, result = "beacon"},
  max_health = 200,
  corpse = "big-remnants",
  dying_explosion = "medium-explosion",
  collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
  selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
  allowed_effects = {"consumption", "speed", "pollution"},
  base_picture =
  {
    filename = "__base__/graphics/entity/beacon/beacon-base.png",
    width = 116,
    height = 93,
    shift = { 0.34375, 0.046875}
  },
  animation =
  {
    filename = "__base__/graphics/entity/beacon/beacon-antenna.png",
    width = 54,
    height = 50,
    line_length = 8,
    frame_count = 32,
    shift = { -0.03125, -1.71875},
    animation_speed = 0.5
  },
  animation_shadow =
  {
    filename = "__base__/graphics/entity/beacon/beacon-antenna-shadow.png",
    width = 63,
    height = 49,
    line_length = 8,
    frame_count = 32,
    shift = { 3.140625, 0.484375},
    animation_speed = 0.5
  },
  radius_visualisation_picture =
  {
    filename = "__base__/graphics/entity/beacon/beacon-radius-visualization.png",
    width = 10,
    height = 10
  },
  supply_area_distance = 3,
  energy_source =
  {
    type = "electric",
    usage_priority = "secondary-input"
  },
  vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
  energy_usage = "480kW",
  distribution_effectivity = 0.5,
  module_specification =
  {
    module_slots = 2,
    module_info_icon_shift = {0, 0.5},
    module_info_multi_row_initial_height_modifier = -0.3
  }
},