I mod Placable Cliffs to my preferences, but a few of the item/recipe properties you might want to add:
local recycling = {}
if mods["quality"] then recycling = require("__quality__/prototypes/recycling") end
if mods["Placable-cliffs"] then
local cliffs = data.raw["cliff"]
local items = data.raw["item"]
local recipes = data.raw["recipe"]
local technologies = data.raw["technology"]
local mod_cliffs = { "cliff" }
if mods["space-age"] then
mod_cliffs = {
"cliff",
"cliff-fulgora",
"cliff-gleba",
"cliff-vulcanus",
}
end
for _, mod_cliff in ipairs(mod_cliffs) do
local cliff = cliffs[mod_cliff]
if cliff then
cliff.minable = { mining_time = 1.0, result = mod_cliff, count = 1 }
end
local item = items[mod_cliff]
if item then
item.localised_name = { "", { "entity-name." .. mod_cliff } }
item.stack_size = 50
item.subgroup = "terrain"
item.order = "c[landfill]-b[" .. mod_cliff .. "]"
item.weight = 20 * kg
end
-- hide "pc-" recipes, make new with standard names (propagates some item properties)
local original_recipe = recipes["pc-" .. mod_cliff]
if original_recipe then
local recipe = table.deepcopy(original_recipe)
recipe.name = mod_cliff
recipe.category = "crafting"
recipe.enabled = false
recipe.ingredients = { { type = "item", name = "landfill", amount = 5 } }
data:extend({ recipe })
if mods["quality"] then
recycling.generate_recycling_recipe(recipes[mod_cliff])
end
original_recipe.enabled = false
original_recipe.hidden = true
if technologies["landfill"] and technologies["landfill"].effects then
table.insert(technologies["landfill"].effects, { type = "unlock-recipe", recipe = mod_cliff })
end
end
end
local custom_controls = data.raw["custom-input"]
custom_controls["Cliff-Flip-Selected"].key_sequence = "R"
custom_controls["Cliff-Flip"].key_sequence = "SHIFT + R"
end