Types/MinableProperties: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (updated examples)
(Removed old prototype docs)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The mining properties of objects. For formulas for the mining time, see [[mining]].
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/MinableProperties.html https://lua-api.factorio.com/latest/types/MinableProperties.html]


== Mandatory properties ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
=== mining_time ===
'''Type''': [[Types/double]]
 
How long it takes to mine this object.
 
== 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 <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.
 
{|
|wooden-particle
|[[File:wooden-particle.gif]]
|-
|coal-particle
|[[File:coal-particle.gif]]
|-
|stone-particle
|[[File:stone-particle.gif]]
|-
|shell-particle
|[[File:shell-particle.gif]]
|-
|iron-ore-particle
|[[File:iron-ore-particle.gif]]
|-
|copper-ore-particle
|[[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.
 
=== 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 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/MinableProperties.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.