Prototype/Lamp

From Official Factorio Wiki
Revision as of 10:29, 15 July 2017 by LazyFridge (talk | contribs) (A page for the Lamp Prototype Definition.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Basics

A lamp to provide light, using energy. Based on Prototype/EntityWithHealth.

Usage in base

Properties

energy_source

Type: Types/EnergySource

The type of energy the lamp uses.

energy_usage

Type: Types/EnergyUsage

The amount of energy the lamp uses.

light

Type: Types/Light

What color the lamp will be when it is on, and receiving power.

light_when_colored

Type: Types/Light

This refers to when the light is in a Circuit Network, and is lit a certain color based on a Circuit value.

picture_on

Type: Types/Sprite

The lamp's entity if it's on.

picture_off

Type: Types/Sprite

The lamp's entity if it's off.

Example

 {
   type = "lamp",
   name = "small-lamp",
   icon = "__base__/graphics/icons/small-lamp.png",
   flags = {"placeable-neutral", "player-creation"},
   minable = {hardness = 0.2, mining_time = 0.5, result = "small-lamp"},
   max_health = 100,
   corpse = "small-remnants",
   collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
   selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
   vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
   energy_source =
   {
     type = "electric",
     usage_priority = "secondary-input"
   },
   energy_usage_per_tick = "5KW",
   light = {intensity = 0.9, size = 40, color = {r=1.0, g=1.0, b=1.0}},
   light_when_colored = {intensity = 1, size = 6, color = {r=1.0, g=1.0, b=1.0}},
   glow_size = 6,
   glow_color_intensity = 0.135,
   picture_off =
   {
     filename = "__base__/graphics/entity/small-lamp/light-off.png",
     priority = "high",
     width = 67,
     height = 58,
     frame_count = 1,
     axially_symmetrical = false,
     direction_count = 1,
     shift = {-0.015625, 0.15625},
   },
   picture_on =
   {
     filename = "__base__/graphics/entity/small-lamp/light-on-patch.png",
     priority = "high",
     width = 62,
     height = 62,
     frame_count = 1,
     axially_symmetrical = false,
     direction_count = 1,
     shift = {-0.03125, -0.03125},
   },