Regarding bots, they use the cliff explosives to get rid of the cliffs, so that is always instantaneous, yes. Personally, I think it should be.
Also, it will always affect all cliffs, as far as I understand.
With space age, you have to Vulcanus to be able to get rid of cliffs at all, so being able to manually get rid of cliffs on Nauvis before Vulcanus is already reducing tedium. If I could mine them away that fast, it would make having to go to Vulcanus first completely unnecessary. If you just need a long time to mine them away manually, it makes it more strategic, as in making you remove only those that really and truly cause issues with your base building/blueprints, e.g. blocking a robot port, an important pipe or such. And in the end, you'd still have robots to remove them instantly.
As for affecting only specific cliffs, you'd have to do the following:
- Remove these lines completely, they are redundant anyways:
data.raw["cliff"]["cliff"].minable = {mining_time = 1}
data.raw["cliff"]["cliff"].selectable_in_game = true
- Add a bool setting: "Changes all cliffs", defaults to true (
debloat_change_all_cliffs
)
- Add a string setting: "Limit to these cliffs (if above is unchecked)", defaults to all cliff prototypes, comma separated (
debloat_cliffs_to_change
)
- Add an int setting: "Mining time", defaults to 1 (
debloat_mining_time
)
- Replace the first loop with the following:
-- Fetch settings
local change_all_cliffs = settings.startup["debloat_change_all_cliffs"].value or false
local cliffs_to_change = settings.startup["debloat_cliffs_to_change"].value or ""
local mining_time = settings.startup["debloat_mining_time"].value or 1
-- Split the comma-separated string into a table
local cliffs_to_change_table = {}
for cliff in string.gmatch(cliffs_to_change, '([^,]+)') do
cliffs_to_change_table[cliff] = true
end
-- Adjust the mineability and mining time of the cliffs
for cliff_name, cliff in pairs(data.raw["cliff"]) do
if change_all_cliffs or cliffs_to_change_table[cliff_name] then
cliff.minable = {mining_time = mining_time}
cliff.selectable_in_game = true
end
end
That should do it. (I have not tested it.)