Types/MinableProperties: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (removed lang template)
(Updated to 0.16)
Line 1: Line 1:
MinableProperties are specified by a list of [[Types/string]]
The mining properties of objects. For formulas for the mining time, see [[mining]].
 
== Mandatory properties ==
 
=== mining_time ===
'''Type''': [[Types/double]]


== mining_time ==
How long it takes to mine this object.
How long it takes to mine this object.


Influenced by hardness - higher hardness means longer mining time
Influenced by hardness - higher hardness means longer mining time.
== hardness ==
 
== Optional properties ==
 
=== hardness ===
'''Type''': [[Types/double]]
 
'''Default''': 0.5
 
An axe will lose this much durability when the item is mined.
An axe will lose this much durability when the item is mined.


An axe is not able to mine an object with a hardness equal or greater than its mining power.
An axe is not able to mine an object with a hardness equal or greater than its mining power.


Influences mining time - higher hardness means longer mining time
Influences mining time - higher hardness means longer mining time.
== result ==
 
Which item is dropped when this is mined
=== fluid_amount ===
== count ==
'''Type''': [[Types/double]]
How many of result are dropped
 
== mining_particle ==
'''Default''': 0
Which set of particles to use.
 
The amount of fluid that is used up when this object is mined. If this is > 0, this object cannot be mined by hand.
 
=== mining_particle ===
'''Type''': [[Types/string]]
 
Name of an entity. Which set of particles to use.


{|
{|
Line 37: Line 54:
|[[File:copper-ore-particle.gif]]
|[[File:copper-ore-particle.gif]]
|}
|}
=== required_fluid ===
'''Type''': [[Types/string]]
Name of a [[Prototype/Fluid]]. The fluid that is used up when this object is mined.
=== results ===
'''Type''': [[Types/table]] of [[Types/ProductPrototype]]
The items that are returned when this object is mined.
=== result ===
'''Type''': [[Types/string]]
Only loaded if <code>results</code> was not found. Which item is dropped when this is mined.
Cannot be empty. If you want the entity to not be minable, don't specify the minable properties, if you want it to be minable with no result item, don't specify the result at all.
=== count ===
'''Type''': [[Types/uint16]]
'''Default''': 1
Only loaded if <code>results</code> was not found. How many of result are dropped.
=== mining_trigger ===
'''Type''': [[Types/Trigger]]
== Example ==
== Example ==
   minable = { mining_time = 1, hardness = 0.5, result = "raw-wood", count = 5, mining_particle = "wooden-particle"}
   minable = { mining_time = 1, hardness = 0.5, result = "raw-wood", count = 5, mining_particle = "wooden-particle"}

Revision as of 16:31, 10 December 2018

The mining properties of objects. For formulas for the mining time, see mining.

Mandatory properties

mining_time

Type: Types/double

How long it takes to mine this object.

Influenced by hardness - higher hardness means longer mining time.

Optional properties

hardness

Type: Types/double

Default: 0.5

An axe will lose this much durability when the item is mined.

An axe is not able to mine an object with a hardness equal or greater than its mining power.

Influences mining time - higher hardness means longer mining time.

fluid_amount

Type: Types/double

Default: 0

The amount of fluid that is used up when this object is mined. If this is > 0, this object cannot be mined by hand.

mining_particle

Type: Types/string

Name of an entity. Which set of particles to use.

wooden-particle Wooden-particle.gif
coal-particle Coal-particle.gif
stone-particle Stone-particle.gif
shell-particle Shell-particle.gif
iron-ore-particle Iron-ore-particle.gif
copper-ore-particle Copper-ore-particle.gif

required_fluid

Type: Types/string

Name of a Prototype/Fluid. The fluid that is used up when this object is mined.

results

Type: Types/table of Types/ProductPrototype

The items that are returned when this object is mined.

result

Type: Types/string

Only loaded if results was not found. Which item is dropped when this is mined.

Cannot be empty. If you want the entity to not be minable, don't specify the minable properties, if you want it to be minable with no result item, don't specify the result at all.

count

Type: Types/uint16

Default: 1

Only loaded if results was not found. How many of result are dropped.

mining_trigger

Type: Types/Trigger

Example

  minable = { mining_time = 1, hardness = 0.5, result = "raw-wood", count = 5, mining_particle = "wooden-particle"}