Prototype/MiningDrill: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (→‎mining_power: Explanation of mining power.)
(0.16)
Line 2: Line 2:
A mining drill. Based on [[Prototype/EntityWithHealth]].
A mining drill. Based on [[Prototype/EntityWithHealth]].


== Properties ==
== Mandatory properties ==


This prototype inherits the properties of [[Prototype/EntityWithHealth]].
This prototype inherits the properties of [[Prototype/EntityWithHealth]].


=== animations ===
=== vector_to_place_result ===
Type: Map of [[Types/string]] -> [[Types/Animation]]
'''Type''': [[Types/vector]]
 
The position where the (mine) result is placed, when the mining drill is facing south (?).
 
=== resource_searching_radius ===
'''Type''': [[Types/double]]
 
The distance from the centre of the mining drill to search for resources in.
 
This is 2.49 for electric mining drills (a 5x5 area) and 0.99 for burner mining drills (a 2x2 area). The drill searches resource outside its natural boundary box, which is 0.01 (the middle of the entity); making it 2.5 and 1.0 gives it another block radius.


The animations to use. Should look like this:
=== energy_usage ===
'''Type''': [[Types/Energy]]


<pre>
The amount of energy used by the drill while mining. Can't be less than or equal to 0
animations = {
  north = {
      ... animation goes here ...
  },
  south = {
      ... animation goes here ...
  },
  east = {
      ... animation goes here ...
  },
  west = {
      ... animation goes here ...
  }
}
</pre>


=== mining_speed ===
=== mining_speed ===
Type: [[Types/double]]
'''Type''': [[Types/double]]
 
The speed of this drill.


The speed of this drill. Electric mining drills have 0.5. Burner mining drills have 0.35.
=== mining_power ===
'''Type''': [[Types/double]]
 
Mining power minus the hardness of the resource is a factor in the mining rate.


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


The energy source of this mining drill.
The energy source of this mining drill.


=== energy_usage ===
=== resource_categories ===
Type: [[Types/EnergyPower]]
'''Type''': [[Types/string]]


The amount of energy used by the drill while mining.
The names of the [[Prototype/ResourceCategory]] that can be mined by this drill. For a list on built-in categories, see [[Data.raw#resource-category]].


=== mining_power ===
=== animations ===
Type: [[Types/double]]
'''Type''': [[Types/Animation4Way]]


Mining power minus the hardness of the resource is a factor in the mining rate. Burner mining drills have 3.5. Electric mining drills have 3.
The animations to use.


=== resource_searching_radius ===
== Optional properties ==
Type: [[Types/double]]


The distance from the centre of the mining drill to search for resources in.
=== output_fluid_box ===
'''Type''': [[Types/FluidBox]]


This is 2.49 for electric mining drills (a 5x5 area) and 0.99 for burner mining drills (a 2x2 area). There is presumably a reason that these are not 2.5 and 1.0.
=== input_fluid_box ===
'''Type''': [[Types/FluidBox]]


(Dysoch) The reason is that it searches resource outside its natural boundary box, which is 0.01. (the middle of the entity) making it 2.5 and 1.0 gives it another block radius
=== base_picture ===
'''Type''': [[Types/Sprite4Way]]


=== vector_to_place_result ===
=== shadow_animations ===
Type: [[Types/vector]]
'''Type''': [[Types/Animation4Way]]


The position where the result is placed, when the mining drill is facing south (?).
=== allowed_effects ===
'''Type''': [[Types/EffectTypeLimitation]]


=== module_slots ===
'''Default''': All effects are allowed
Type: [[Types/unsigned]]
 
The number of module slots.


=== radius_visualization_picture ===
=== radius_visualization_picture ===
Type: [[Types/Sprite]]
'''Type''': [[Types/Sprite]]


The sprite used to show the range of the mining drill.
The sprite used to show the range of the mining drill.
=== storage_slots ===
'''Type''': [[Types/ItemStackIndex]]
'''Default''': 1
The output slot(s).
=== circuit_wire_max_distance ===
'''Type''': [[Types/double]]
'''Default''': 0
=== base_render_layer ===
'''Type''': [[Types/RenderLayer]]
'''Default''': "lower-object"
=== monitor_visualization_tint ===
'''Type''': [[Types/Color]]
=== circuit_wire_connection_points ===
'''Type''': [[Types/table]] of [[Types/WireConnectionPoint]]
Mandatory if circuit_wire_max_distance  > 0.
=== circuit_connector_sprites ===
'''Type''': [[Types/table]] of [[Types/CircuitConnectorSprites]]
Mandatory if circuit_wire_max_distance  > 0.
=== module_specification ===
'''Type''': [[Types/ModuleSpecification]]
=== input_fluid_patch_sprites ===
'''Type''': [[Types/Sprite4Way]]
Only read if <code>input_fluid_box</code> exists. Even then it's optional.
=== input_fluid_patch_shadow_sprites ===
'''Type''': [[Types/Sprite4Way]]
Only read if <code>input_fluid_box</code> exists. Even then it's optional.
=== input_fluid_patch_window_sprites ===
'''Type''': [[Types/Sprite4Way]]
Only read if <code>input_fluid_box</code> exists. Even then it's optional.
=== input_fluid_patch_shadow_animations ===
'''Type''': [[Types/Sprite4Way]]
Only read if <code>input_fluid_box</code> exists. Even then it's optional.
=== input_fluid_patch_window_base_sprites ===
'''Type''': [[Types/table]] of [[Types/Sprite4Way]]
Only read if <code>input_fluid_box</code> exists. Even then it's optional.
=== input_fluid_patch_window_flow_sprites ===
'''Type''': [[Types/table]] of [[Types/Sprite4Way]]
Mandatory if <code>input_fluid_patch_window_base_sprites</code> exists.
input_fluid_patch_window_base_sprites count has to match input_fluid_patch_window_flow_sprites count.

Revision as of 19:44, 20 May 2018

Basics

A mining drill. Based on Prototype/EntityWithHealth.

Mandatory properties

This prototype inherits the properties of Prototype/EntityWithHealth.

vector_to_place_result

Type: Types/vector

The position where the (mine) result is placed, when the mining drill is facing south (?).

resource_searching_radius

Type: Types/double

The distance from the centre of the mining drill to search for resources in.

This is 2.49 for electric mining drills (a 5x5 area) and 0.99 for burner mining drills (a 2x2 area). The drill searches resource outside its natural boundary box, which is 0.01 (the middle of the entity); making it 2.5 and 1.0 gives it another block radius.

energy_usage

Type: Types/Energy

The amount of energy used by the drill while mining. Can't be less than or equal to 0

mining_speed

Type: Types/double

The speed of this drill.

mining_power

Type: Types/double

Mining power minus the hardness of the resource is a factor in the mining rate.

energy_source

Type: Types/EnergySource

The energy source of this mining drill.

resource_categories

Type: Types/string

The names of the Prototype/ResourceCategory that can be mined by this drill. For a list on built-in categories, see Data.raw#resource-category.

animations

Type: Types/Animation4Way

The animations to use.

Optional properties

output_fluid_box

Type: Types/FluidBox

input_fluid_box

Type: Types/FluidBox

base_picture

Type: Types/Sprite4Way

shadow_animations

Type: Types/Animation4Way

allowed_effects

Type: Types/EffectTypeLimitation

Default: All effects are allowed

radius_visualization_picture

Type: Types/Sprite

The sprite used to show the range of the mining drill.

storage_slots

Type: Types/ItemStackIndex

Default: 1

The output slot(s).

circuit_wire_max_distance

Type: Types/double

Default: 0

base_render_layer

Type: Types/RenderLayer

Default: "lower-object"

monitor_visualization_tint

Type: Types/Color

circuit_wire_connection_points

Type: Types/table of Types/WireConnectionPoint

Mandatory if circuit_wire_max_distance > 0.

circuit_connector_sprites

Type: Types/table of Types/CircuitConnectorSprites

Mandatory if circuit_wire_max_distance > 0.

module_specification

Type: Types/ModuleSpecification

input_fluid_patch_sprites

Type: Types/Sprite4Way

Only read if input_fluid_box exists. Even then it's optional.

input_fluid_patch_shadow_sprites

Type: Types/Sprite4Way

Only read if input_fluid_box exists. Even then it's optional.

input_fluid_patch_window_sprites

Type: Types/Sprite4Way

Only read if input_fluid_box exists. Even then it's optional.

input_fluid_patch_shadow_animations

Type: Types/Sprite4Way

Only read if input_fluid_box exists. Even then it's optional.

input_fluid_patch_window_base_sprites

Type: Types/table of Types/Sprite4Way

Only read if input_fluid_box exists. Even then it's optional.

input_fluid_patch_window_flow_sprites

Type: Types/table of Types/Sprite4Way

Mandatory if input_fluid_patch_window_base_sprites exists.

input_fluid_patch_window_base_sprites count has to match input_fluid_patch_window_flow_sprites count.