Internal change to resources - Multiple minable types
Posted: Mon Oct 17, 2016 4:38 pm
Currently a defined ore contains this (taken from crude oil):
The issue here is that the resource category (which affects what can mine it) is defined outside of the minable object, which means it can only ever be part of one category. Instead, I propose that the category goes into the minable object, and that multiple minable objects can be declared (provided they don't use the same category). Copper ore could end up looking like this:
This is a required change for the planned dirty ore mechanic, as that would then use the "advanced-solid" category that gives a different result to "basic-solid" that is currently used on the 4 normal ores. Doing it now would allow modders to exploit the mechanic before an official implementation, and may also help with demonstrating the planned feature so that feedback can be collected in advance of said official implementation.
Code: Select all
category = "basic-fluid",
minable =
{
hardness = 1,
mining_time = 1,
results =
{
{
type = "fluid",
name = "crude-oil",
amount_min = 1,
amount_max = 1,
probability = 1
}
}
}
Code: Select all
minable =
{
category = "basic-solid",
hardness = 0.4,
mining_particle = "copper-ore-particle",
mining_time = 2,
result = "copper-ore"
},
minable =
{
category = "advanced-solid",
hardness = 1,
mining_time = 1,
results =
{
{
type = "fluid",
name = "copper-ore-fluid",
amount_min = 1,
amount_max = 1,
probability = 1
}
}
}