Prototype/Lab: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (removed lang template)
(0.16)
Line 2: Line 2:
A [[lab]]. Based on [[Prototype/EntityWithHealth]].
A [[lab]]. Based on [[Prototype/EntityWithHealth]].


== Properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].
=== energy_usage ===
'''Type''': [[Types/Energy]]
The amount of energy this lab uses.


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


Defines how this lab gets energy.
Defines how this lab gets energy.


=== on_animation ===
=== on_animation ===
Type: [[Types/Animation]]
'''Type''': [[Types/Animation]]


The animation that plays when the lab is active.
The animation that plays when the lab is active.


=== off_animation ===
=== off_animation ===
Type: [[Types/Animation]]
'''Type''': [[Types/Animation]]


The animation that plays when the lab is idle.
The animation that plays when the lab is idle.


=== energy_usage ===
=== module_specification ===
Type: [[Types/EnergyPower]]
'''Type''': [[Types/ModuleSpecification]]


The amount of energy this lab uses.
The number of module slots.


=== inputs ===
=== inputs ===
Type: List of [[Types/string]]
'''Type''': [[Types/table]] of [[Types/string]]


A list of the names of science packs used in this lab.
A list of the names of science packs that cane be used in this lab.


e.g. for the default lab, this is:
e.g. for the default lab, this is:
<pre>
<syntaxhighlight lang="lua">
inputs = {"science-pack-1", "science-pack-2", "science-pack-3", "alien-science-pack"}
inputs = {"science-pack-1", "science-pack-2", "science-pack-3", "alien-science-pack"}</syntaxhighlight>
</pre>


If a technology requires other types of science packs, it cannot be researched in this lab.
If a technology requires other types of science packs, it cannot be researched in this lab.


=== module_slots ===
== Optional properties ==
Type: [[Types/unsigned]]
 
The number of module slots.


=== allowed_effects? ===
=== researching_speed ===
Type: [[Types/AllowedEffects]]
'''Type''': [[Types/double]]


The module effects that are allowed to be used with this lab.
'''Default''': 1


Unknown whether this is actually implemented for labs.
=== light ===
'''Type''': [[Types/LightDefinition]]

Revision as of 19:07, 20 May 2018

Basics

A lab. Based on Prototype/EntityWithHealth.

Mandatory properties

This prototype inherits all the properties from Prototype/EntityWithHealth.

energy_usage

Type: Types/Energy

The amount of energy this lab uses.

energy_source

Type: Types/EnergySource

Defines how this lab gets energy.

on_animation

Type: Types/Animation

The animation that plays when the lab is active.

off_animation

Type: Types/Animation

The animation that plays when the lab is idle.

module_specification

Type: Types/ModuleSpecification

The number of module slots.

inputs

Type: Types/table of Types/string

A list of the names of science packs that cane be used in this lab.

e.g. for the default lab, this is:

inputs = {"science-pack-1", "science-pack-2", "science-pack-3", "alien-science-pack"}

If a technology requires other types of science packs, it cannot be researched in this lab.

Optional properties

researching_speed

Type: Types/double

Default: 1

light

Type: Types/LightDefinition