Types/MinableProperties: Difference between revisions
ForFoxAche (talk | contribs) (Created page with "MinableProperties are specified by a list of Types/string == mining_time == How long it takes to mine this object. Influenced by hardness - higher hardness means longer ...") |
m (unclear what "energy" means here (no other mentions). mining page should hopefully be able to explain the numbers further) |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
The mining properties of objects. For formulas for the mining time, see [[mining]]. | |||
== | == Mandatory properties == | ||
=== mining_time === | |||
== | '''Type''': [[Types/double]] | ||
How many seconds are required to mine this object at 1 mining speed. | |||
== Optional properties == | |||
== result == | |||
Which item is dropped when this is mined | === results === | ||
== | '''Type''': [[Types/table]] of [[Types/ProductPrototype]] | ||
== mining_particle == | The items that are returned when this object is mined. | ||
Which set of particles to use. | |||
=== 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. | |||
=== 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 a [[Prototype/Particle]]. Which set of particles to use. | |||
{| | {| | ||
Line 37: | Line 53: | ||
|[[File:copper-ore-particle.gif]] | |[[File:copper-ore-particle.gif]] | ||
|} | |} | ||
== | |||
minable = { mining_time | === required_fluid === | ||
'''Type''': [[Types/string]] | |||
Name of a [[Prototype/Fluid]]. The fluid that is used up when this object is mined. | |||
=== 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]] | |||
== Examples == | |||
minable = { mining_time = 0.55, result = "wood", count = 4, mining_particle = "wooden-particle"} | |||
minable = { | |||
mining_time = 1, | |||
results = | |||
{ | |||
{ | |||
type = "fluid", | |||
name = "crude-oil", | |||
amount = 10 | |||
} | |||
} | |||
} |
Latest revision as of 10:10, 22 July 2022
The mining properties of objects. For formulas for the mining time, see mining.
Mandatory properties
mining_time
Type: Types/double
How many seconds are required to mine this object at 1 mining speed.
Optional properties
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.
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 a Prototype/Particle. Which set of particles to use.
wooden-particle | |
coal-particle | |
stone-particle | |
shell-particle | |
iron-ore-particle | |
copper-ore-particle |
required_fluid
Type: Types/string
Name of a Prototype/Fluid. The fluid that is used up when this object is mined.
count
Type: Types/uint16
Default: 1
Only loaded if results
was not found. How many of result are dropped.
mining_trigger
Type: Types/Trigger
Examples
minable = { mining_time = 0.55, result = "wood", count = 4, mining_particle = "wooden-particle"}
minable = { mining_time = 1, results = { { type = "fluid", name = "crude-oil", amount = 10 } } }