Sun lamp

Sun lamps provide artificial light in the absence of sunlight, such as an indoor growing zone.
== Acquisition ==
== Summary ==
A sun lamp consumes W of power from 06:00 to 19:12, the period where plants can grow. While online, it provides 100% light within a 5.5-tile radius. This provides 100 tiles with sufficient light to grow.
This allows crops like rice plants to grow in a roofed room. As the natural sun doesn't always provide 100% light at day, a sun lamp causes plants to grow somewhat faster. They also provide at least 30% light in an tile radius, which is enough to prevent penalties for being in darkness.
Due to RimWorld's temperature mechanics, an enclosed room with a mostly complete roof is required to actually heat or cool an area. Lamps themselves give a marginal amount of heat, 3 heat per second.
Rain or snow on a powered sun lamp will cause short circuits and fires. A roof will prevent this.
== Analysis ==
A sun lamp's main purpose is to create growing zones indoors, often called greenhouses. This allows plants to grow in the winter, when used with a heater. In extremely hot biomes, you might need coolers to grow during in the summer. Even in an "year-round" growing season, unpredictable events such as toxic fallout and volcanic winters can disrupt plant growth. Double-width walls provide more insulation against temperature changes, and potentially save on heater/cooler costs.
Solar flares will cut the power, so prepare a shelf with emergency wood to build campfires to keep the room temperature above (below which most plants will rapidly die).
As they cannot be grown under roofs, trees such as pine, birch, saguaro or cocoa trees may not be grown in completely closed greenhouses. They may only be grown in greenhouses with roofs open in a grid pattern, and those leak a lot of temperature-controlled air. As these roofs will let in sufficient natural sunlight in most biomes, there is no need to place a sun lamp inside tree greenhouses.
=== Power ===
If you have biofuel refineries available, you can use food produced by hydroponics to fuel chemfuel generators to help power the greenhouse array. This is so efficient that it violates thermodynamics, and leaves you with spare food for your colonists as well.
As sun lamps turn off at night, they consume an average of W⋅Days. Batteries can be used to average out power usage. However, batteries only take in energy at a 50% rate, effectively meaning double the power is required at night, for a required power generation of W⋅Days assuming 100% consistent power generation and a single battery with a passive loss of -5W⋅Days per day. As this only requires W⋅Days of storage and a battery holds 600 W⋅Days, fewer batteries and infinitesimally less generation is needed when multiple sun lamps are supported. 
Otherwise, 2 solar generators are more than enough to power a single sun lamp in equatorial regions, not counting any hydroponics basins.
=== Hydroponics ===
You can grow crops indoors with or without hydroponics basins. It is more cost effective to grow on soil, assuming you have soil available.
* The 24 hydroponics basins would cost for a total of 2.8 sun lamp's worth of growth. This does not count the extra 1680 W of power required for those basins.
* You could instead make and power 2 more sun lamps. 4 solar generators are enough to power those lamps, and would only cost . Even when considering batteries, heaters, and the 80 for sun lamps themselves, making more sun lamps is more efficient than building hydroponics for 1.
If your only goal is to grow crops during the winter, then placing multiple sun lamps without hydroponics is more resource efficient than using hydroponics. However, the lamps would end up taking up more space. Therefore, hydroponics are best used when growing space is limited, like inside a mountain or in an ice sheet. 
In the late game, hydroponics have a few advantages. Due to their reduced space, it takes less travel time, which makes work more efficient and defense easier. They take up less power per tile, too. When you have access to deep drills and fabrication, you can easily afford the steel and component cost.
== Version history ==
* 0.17.1546 - Now turn themselves off when plants are resting. 
* 1.2.2753 - Fix: Gloomlight would prevent a sun lamp from producing "brightly lit" cells within the radius of the Gloomlight. Due to: the glowColor of the Gloomlight not having an explicit alpha of zero. It now correctly ignores the alpha from the xml.
* 1.3.3117 - Fix: Sunlamp does not trigger blinding light for Darkness pawns.
* 1.5.4062 - Fix: Sunlamps do not have perfect area of effect leading to rotting crops. This had the effect of creating an unreported change to sun lamp lit radius, increasing it, without increasing the displayed radius when constructing the lamp. 
* 1.5.4104 - Fix: Sunlamp light radius inaccurate. This reverts the above change.
Sun lamp grow radius.png|Between 1.5.4062 and 1.5.4194 Radius of light sufficient to grow. Displayed radius shown in sterile tile, tiles where plants can be grown outside of the radius shown in gold tile
New sun lamp optimal with no wasted hydro spots.png|Between 1.5.4062 and 1.5.4194 Maximum hydroponics basins without having basin slots unlit.(25 basins, 100 growing tiles, 0 unlit basin slots, 20 lit tiles unused)
new sun lamp optimal with wasted hydro spots.png|Between 1.5.4062 and 1.5.4194 Minimum number of hydroponics basin slots left unlit without leaving lit area unused.(32 basins, 120 growing tiles, 8 unlit basin slots, 0 lit tiles unused)
Category:Furniture Category:Lamp
Category:Food Production