Split mod
This commit is contained in:
parent
9d94502296
commit
efb0b6aad7
101 changed files with 803 additions and 786 deletions
|
|
@ -0,0 +1,154 @@
|
|||
local hit_effects = require("__base__.prototypes.entity.hit-effects")
|
||||
local sounds = require("__base__.prototypes.entity.sounds")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = "active-noise-cancelling"
|
||||
},
|
||||
{
|
||||
type = "assembling-machine",
|
||||
name = "active-noise-cancelling-tower",
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/programmable-speaker.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/active-noise-cancelling.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
icon_draw_specification = { shift = { 0, -1 }, scale = 0.75, scale_for_many = 0.5 },
|
||||
flags = { "placeable-neutral", "player-creation" },
|
||||
minable = { mining_time = 0.1, result = "active-noise-cancelling-tower" },
|
||||
fast_replaceable_group = "active-noise-cancelling-tower",
|
||||
max_health = 150,
|
||||
crafting_speed = 1,
|
||||
crafting_categories = { "active-noise-cancelling" },
|
||||
energy_usage = "500kW",
|
||||
energy_source = {
|
||||
type = "electric",
|
||||
usage_priority = "secondary-input",
|
||||
emissions_per_minute = { noise = -1000 },
|
||||
drain = "0W"
|
||||
},
|
||||
fixed_recipe = "active-noise-cancelling",
|
||||
is_military_target = true,
|
||||
show_recipe_icon_on_map = true,
|
||||
map_color = { r = 112, g = 61, b = 150, a = 1 },
|
||||
corpse = "programmable-speaker-remnants",
|
||||
dying_explosion = "programmable-speaker-explosion",
|
||||
collision_box = { { -0.3, -0.3 }, { 0.3, 0.3 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
damaged_trigger_effect = hit_effects.entity({ { -0.2, -2 }, { 0.2, 0.2 } }),
|
||||
drawing_box_vertical_extension = 2,
|
||||
open_sound = sounds.machine_open,
|
||||
close_sound = sounds.machine_close,
|
||||
graphics_set = {
|
||||
animation = {
|
||||
layers = {
|
||||
{
|
||||
filename = "__base__/graphics/entity/programmable-speaker/programmable-speaker.png",
|
||||
priority = "extra-high",
|
||||
width = 59,
|
||||
height = 178,
|
||||
shift = util.by_pixel(-2.25, -39.5),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/programmable-speaker/programmable-speaker-shadow.png",
|
||||
priority = "extra-high",
|
||||
width = 237,
|
||||
height = 50,
|
||||
shift = util.by_pixel(52.75, -3),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
water_reflection = {
|
||||
pictures = {
|
||||
filename = "__base__/graphics/entity/programmable-speaker/programmable-speaker-reflection.png",
|
||||
priority = "extra-high",
|
||||
width = 12,
|
||||
height = 24,
|
||||
shift = util.by_pixel(0, 45),
|
||||
variation_count = 1,
|
||||
scale = 5
|
||||
},
|
||||
rotate = false,
|
||||
orientation_to_variation = false
|
||||
},
|
||||
surface_conditions = { { property = "pollutant-type", min = 3, max = 3 } }
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "active-noise-cancelling-tower",
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/programmable-speaker.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/active-noise-cancelling.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
subgroup = "circuit-network",
|
||||
order = "d[other]-c[active-noise-cancelling-tower]",
|
||||
inventory_move_sound = item_sounds.mechanical_inventory_move,
|
||||
pick_sound = item_sounds.mechanical_inventory_pickup,
|
||||
drop_sound = item_sounds.mechanical_inventory_move,
|
||||
place_result = "active-noise-cancelling-tower",
|
||||
stack_size = 10,
|
||||
random_tint_color = item_tints.iron_rust
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "active-noise-cancelling-tower",
|
||||
enabled = false,
|
||||
energy_required = 20,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 6 },
|
||||
{ type = "item", name = "gold-cable", amount = 6 },
|
||||
{ type = "item", name = "low-density-structure", amount = 4 },
|
||||
{ type = "item", name = "processing-unit", amount = 8 }
|
||||
},
|
||||
results = { { type = "item", name = "active-noise-cancelling-tower", amount = 1 } }
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "active-noise-cancelling",
|
||||
icons = { { icon = Lignumis.graphics .. "icons/active-noise-cancelling.png" } },
|
||||
enabled = false,
|
||||
energy_required = 60,
|
||||
ingredients = {},
|
||||
results = {},
|
||||
category = "active-noise-cancelling",
|
||||
hide_from_stats = true,
|
||||
hide_from_player_crafting = true,
|
||||
surface_conditions = { { property = "pollutant-type", min = 3, max = 3 } }
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "active-noise-cancelling",
|
||||
icon = Lignumis.graphics .. "technology/active-noise-cancelling.png",
|
||||
icon_size = 128,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "active-noise-cancelling-tower"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "active-noise-cancelling"
|
||||
}
|
||||
},
|
||||
prerequisites = { "utility-science-pack" },
|
||||
unit = {
|
||||
time = 60,
|
||||
count = 500,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 },
|
||||
{ "automation-science-pack", 1 },
|
||||
{ "logistic-science-pack", 1 },
|
||||
{ "chemical-science-pack", 1 },
|
||||
{ "space-science-pack", 1 },
|
||||
{ "utility-science-pack", 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
58
lignumis-base/prototypes/content/basic-circuit-board.lua
Normal file
58
lignumis-base/prototypes/content/basic-circuit-board.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
if not settings.startup["lignumis-basic-circuit-board"].value then return end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "basic-circuit-board",
|
||||
icons = { { icon = Lignumis.graphics .. "icons/basic-circuit-board.png", icon_size = 64 } },
|
||||
subgroup = "intermediate-product",
|
||||
order = "c[circuits]-0[basic-circuit-board]",
|
||||
inventory_move_sound = item_sounds.electric_small_inventory_move,
|
||||
pick_sound = item_sounds.electric_small_inventory_pickup,
|
||||
drop_sound = item_sounds.electric_small_inventory_move,
|
||||
stack_size = 200,
|
||||
weight = 0.5 * kg
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "basic-circuit-board",
|
||||
category = "wood-processing-or-assembling",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/basic-circuit-board.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/gold-cable.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
ingredients = {
|
||||
{ type = "item", name = "lumber", amount = 1 },
|
||||
{ type = "item", name = "gold-cable", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "basic-circuit-board", amount = 2 } },
|
||||
enabled = true,
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "basic-circuit-board-copper",
|
||||
localised_name = { "item-name.basic-circuit-board" },
|
||||
category = "wood-processing-or-assembling",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/basic-circuit-board.png" },
|
||||
{ icon = "__base__/graphics/icons/copper-cable.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
ingredients = {
|
||||
{ type = "item", name = "lumber", amount = 1 },
|
||||
{ type = "item", name = "copper-cable", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "basic-circuit-board", amount = 2 } },
|
||||
enabled = false,
|
||||
allow_productivity = true
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new("copper-processing"):addRecipe("basic-circuit-board-copper")
|
||||
|
||||
if settings.startup["lignumis-circuit-progression"].value then
|
||||
table.insert(data.raw.recipe["electronic-circuit"].ingredients, { type = "item", name = "basic-circuit-board", amount = 1 })
|
||||
end
|
||||
290
lignumis-base/prototypes/content/basic-construction-robots.lua
Normal file
290
lignumis-base/prototypes/content/basic-construction-robots.lua
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local early_robots = settings.startup["lignumis-early-robots"].value
|
||||
|
||||
local function robot(color)
|
||||
local result = table.deepcopy(data.raw["construction-robot"]["construction-robot"])
|
||||
result.name = "basic-construction-robot-" .. color
|
||||
result.icon = Lignumis.graphics .. "icons/basic-construction-robot-" .. color .. ".png"
|
||||
result.minable.result = "basic-construction-robot-" .. color
|
||||
result.max_health = 50
|
||||
result.speed = early_robots and 0.05 or 0.04
|
||||
result.max_energy = early_robots and "1.5MJ" or "1MJ"
|
||||
result.energy_per_tick = early_robots and "0.03kJ" or "0.04kJ"
|
||||
result.energy_per_move = early_robots and "2kJ" or "2.5kJ"
|
||||
result.idle.filename = Lignumis.graphics .. "entity/basic-construction-robot/basic-construction-robot-" ..
|
||||
color .. ".png"
|
||||
result.in_motion.filename = Lignumis.graphics .. "entity/basic-construction-robot/basic-construction-robot-" ..
|
||||
color .. ".png"
|
||||
result.working.filename =
|
||||
Lignumis.graphics .. "entity/basic-construction-robot/basic-construction-robot-" .. color .. "-working.png"
|
||||
return result
|
||||
end
|
||||
|
||||
local function robot_item(color, order)
|
||||
return {
|
||||
type = "item",
|
||||
name = "basic-construction-robot-" .. color,
|
||||
icon = Lignumis.graphics .. "icons/basic-construction-robot-" .. color .. ".png",
|
||||
subgroup = "logistic-network",
|
||||
order = "a[robot]-b" .. order .. "[basic-construction-robot-" .. color .. "]",
|
||||
inventory_move_sound = item_sounds.robotic_inventory_move,
|
||||
pick_sound = item_sounds.robotic_inventory_pickup,
|
||||
drop_sound = item_sounds.robotic_inventory_move,
|
||||
place_result = "basic-construction-robot-" .. color,
|
||||
stack_size = 50,
|
||||
random_tint_color = item_tints.iron_rust
|
||||
}
|
||||
end
|
||||
|
||||
local function robot_recipe(color, ingredients)
|
||||
return {
|
||||
type = "recipe",
|
||||
name = "basic-construction-robot-" .. color,
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients = table.trim(ingredients),
|
||||
results = { { type = "item", name = "basic-construction-robot-" .. color, amount = 1 } }
|
||||
}
|
||||
end
|
||||
|
||||
local function generator(color)
|
||||
return {
|
||||
type = "generator-equipment",
|
||||
name = "basic-portable-generator-equipment-" .. color,
|
||||
sprite = {
|
||||
filename = Lignumis.graphics .. "equipment/basic-portable-generator-equipment-" ..
|
||||
color .. ".png",
|
||||
width = 128,
|
||||
height = 128,
|
||||
priority = "medium",
|
||||
scale = 0.5
|
||||
},
|
||||
shape = {
|
||||
width = 2,
|
||||
height = 2,
|
||||
type = "full"
|
||||
},
|
||||
burner = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
emissions_per_minute = { noise = 5, pollution = 1 },
|
||||
fuel_inventory_size = 2,
|
||||
smoke = {
|
||||
{
|
||||
name = "smoke",
|
||||
deviation = { 0.1, 0.1 },
|
||||
frequency = 5,
|
||||
position = { 0, 0 },
|
||||
starting_vertical_speed = 0.08,
|
||||
starting_frame_deviation = 60
|
||||
}
|
||||
}
|
||||
},
|
||||
energy_source = {
|
||||
type = "electric",
|
||||
usage_priority = "secondary-output",
|
||||
output_flow_limit = "100kW",
|
||||
buffer_capacity = "5MJ"
|
||||
},
|
||||
power = "100kW",
|
||||
categories = { "armor" }
|
||||
}
|
||||
end
|
||||
|
||||
local function generator_item(color, order)
|
||||
return {
|
||||
type = "item",
|
||||
name = "basic-portable-generator-equipment-" .. color,
|
||||
icon = Lignumis.graphics .. "icons/basic-portable-generator-equipment-" .. color .. ".png",
|
||||
subgroup = "equipment",
|
||||
order = "a[energy-source]-a" .. order .. "[basic-portable-generator-equipment-" .. color .. "]",
|
||||
inventory_move_sound = item_sounds.robotic_inventory_move,
|
||||
pick_sound = item_sounds.robotic_inventory_pickup,
|
||||
drop_sound = item_sounds.robotic_inventory_move,
|
||||
place_as_equipment_result = "basic-portable-generator-equipment-" .. color,
|
||||
stack_size = 10
|
||||
}
|
||||
end
|
||||
|
||||
local function generator_recipe(color, ingredients)
|
||||
return {
|
||||
type = "recipe",
|
||||
name = "basic-portable-generator-equipment-" .. color,
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients = table.trim(ingredients),
|
||||
results = { { type = "item", name = "basic-portable-generator-equipment-" .. color, amount = 1 } }
|
||||
}
|
||||
end
|
||||
|
||||
local function roboport(color)
|
||||
local result = table.deepcopy(data.raw["roboport-equipment"]["personal-roboport-equipment"])
|
||||
result.name = "basic-personal-roboport-equipment-" .. color
|
||||
result.take_result = "basic-personal-roboport-equipment-" .. color
|
||||
result.sprite.filename = Lignumis.graphics .. "equipment/basic-personal-roboport-equipment-" .. color .. ".png"
|
||||
result.energy_source.input_flow_limit = "400kW"
|
||||
result.energy_source.buffer_capacity = "10MJ"
|
||||
result.charging_energy = "500kW"
|
||||
result.construction_radius = 10
|
||||
return result
|
||||
end
|
||||
|
||||
local function roboport_item(color, order)
|
||||
return {
|
||||
type = "item",
|
||||
name = "basic-personal-roboport-equipment-" .. color,
|
||||
icon = Lignumis.graphics .. "icons/basic-personal-roboport-equipment-" .. color .. ".png",
|
||||
place_as_equipment_result = "basic-personal-roboport-equipment-" .. color,
|
||||
subgroup = "utility-equipment",
|
||||
order = "e[robotics]-a" .. order .. "[basic-personal-roboport-equipment-" .. color .. "]",
|
||||
inventory_move_sound = item_sounds.roboport_inventory_move,
|
||||
pick_sound = item_sounds.roboport_inventory_pickup,
|
||||
drop_sound = item_sounds.roboport_inventory_move,
|
||||
stack_size = 10
|
||||
}
|
||||
end
|
||||
|
||||
local function roboport_recipe(color, ingredients)
|
||||
return {
|
||||
type = "recipe",
|
||||
name = "basic-personal-roboport-equipment-" .. color,
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients = table.trim(ingredients),
|
||||
results = { { type = "item", name = "basic-personal-roboport-equipment-" .. color, amount = 1 } }
|
||||
}
|
||||
end
|
||||
|
||||
local gold_robot_technology = {
|
||||
type = "technology",
|
||||
name = "basic-construction-robotics-gold",
|
||||
icon = Lignumis.graphics .. "technology/basic-construction-robotics-gold.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-construction-robot-gold"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-portable-generator-equipment-gold"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-personal-roboport-equipment-gold"
|
||||
},
|
||||
{
|
||||
type = "create-ghost-on-entity-death",
|
||||
modifier = true
|
||||
}
|
||||
},
|
||||
prerequisites = { early_robots and "wood-science-pack" or "steam-science-pack" },
|
||||
unit = {
|
||||
count = 200,
|
||||
ingredients = early_robots and { { "wood-science-pack", 1 } } or {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
},
|
||||
time = 15
|
||||
},
|
||||
ignore_tech_cost_multiplier = early_robots
|
||||
}
|
||||
|
||||
local copper_robot_technology = {
|
||||
type = "technology",
|
||||
name = "basic-construction-robotics-copper",
|
||||
icon = Lignumis.graphics .. "technology/basic-construction-robotics-copper.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-construction-robot-copper"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-portable-generator-equipment-copper"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-personal-roboport-equipment-copper"
|
||||
}
|
||||
},
|
||||
prerequisites = { "basic-construction-robotics-gold", "automation-science-pack" },
|
||||
unit = {
|
||||
count = 50,
|
||||
ingredients = {
|
||||
{ "automation-science-pack", 1 }
|
||||
},
|
||||
time = 15
|
||||
}
|
||||
}
|
||||
|
||||
data:extend({
|
||||
-- Gold
|
||||
robot("gold"),
|
||||
robot_item("gold", 0),
|
||||
robot_recipe("gold", {
|
||||
{ type = "item", name = "gold-plate", amount = 2 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 5 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or
|
||||
{ type = "item", name = "gold-cable", amount = 10 }
|
||||
}),
|
||||
generator("gold"),
|
||||
generator_item("gold", 0),
|
||||
generator_recipe("gold", {
|
||||
{ type = "item", name = "gold-plate", amount = 10 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 10 }
|
||||
}),
|
||||
roboport("gold"),
|
||||
roboport_item("gold", 0),
|
||||
roboport_recipe("gold", {
|
||||
{ type = "item", name = "gold-plate", amount = basic_circuit_board and 5 or 10 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 10 } or nil,
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 10 }
|
||||
}),
|
||||
|
||||
-- Copper
|
||||
robot("copper"),
|
||||
robot_item("copper", 1),
|
||||
robot_recipe("copper", {
|
||||
{ type = "item", name = "copper-plate", amount = 2 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 5 },
|
||||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 5 }
|
||||
}),
|
||||
generator("copper"),
|
||||
generator_item("copper", 1),
|
||||
generator_recipe("copper", {
|
||||
{ type = "item", name = "copper-plate", amount = 10 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 10 }
|
||||
}),
|
||||
roboport("copper"),
|
||||
roboport_item("copper", 1),
|
||||
roboport_recipe("copper", {
|
||||
{ type = "item", name = "copper-plate", amount = 5 },
|
||||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 10 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 10 }
|
||||
}),
|
||||
|
||||
-- Technology
|
||||
gold_robot_technology,
|
||||
copper_robot_technology,
|
||||
|
||||
-- Equipment grids
|
||||
{
|
||||
type = "equipment-grid",
|
||||
name = "very-small-equipment-grid",
|
||||
width = 4,
|
||||
height = 4,
|
||||
equipment_categories = { "armor" }
|
||||
},
|
||||
{
|
||||
type = "equipment-grid",
|
||||
name = "tiny-equipment-grid",
|
||||
width = 4,
|
||||
height = 2,
|
||||
equipment_categories = { "armor" }
|
||||
}
|
||||
})
|
||||
88
lignumis-base/prototypes/content/basic-gun-turret.lua
Normal file
88
lignumis-base/prototypes/content/basic-gun-turret.lua
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local turret = table.deepcopy(data.raw["ammo-turret"]["gun-turret"])
|
||||
turret.name = "basic-gun-turret"
|
||||
turret.icon = Lignumis.graphics .. "icons/basic-gun-turret.png"
|
||||
turret.minable.result = "basic-gun-turret"
|
||||
turret.max_health = 300
|
||||
turret.rotation_speed = 0.01
|
||||
turret.attacking_speed = 0.35
|
||||
turret.folded_animation.layers[1].filename = Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-raising.png"
|
||||
turret.preparing_animation.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-raising.png"
|
||||
turret.prepared_animation.layers[1].stripes[1].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-1.png"
|
||||
turret.prepared_animation.layers[1].stripes[2].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-2.png"
|
||||
turret.prepared_animation.layers[1].stripes[3].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-3.png"
|
||||
turret.prepared_animation.layers[1].stripes[4].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-4.png"
|
||||
turret.attacking_animation.layers[1].stripes[1].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-1.png"
|
||||
turret.attacking_animation.layers[1].stripes[2].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-2.png"
|
||||
turret.attacking_animation.layers[1].stripes[3].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-3.png"
|
||||
turret.attacking_animation.layers[1].stripes[4].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-shooting-4.png"
|
||||
turret.folding_animation.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-raising.png"
|
||||
turret.graphics_set.base_visualisation.animation.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/basic-gun-turret/basic-gun-turret-base.png"
|
||||
turret.attack_parameters.range = 18
|
||||
|
||||
local turret_item = {
|
||||
type = "item",
|
||||
name = "basic-gun-turret",
|
||||
icon = Lignumis.graphics .. "icons/basic-gun-turret.png",
|
||||
subgroup = "turret",
|
||||
order = "b[turret]-0[basic-gun-turret]",
|
||||
inventory_move_sound = item_sounds.turret_inventory_move,
|
||||
pick_sound = item_sounds.turret_inventory_pickup,
|
||||
drop_sound = item_sounds.turret_inventory_move,
|
||||
place_result = "basic-gun-turret",
|
||||
stack_size = 50
|
||||
}
|
||||
|
||||
local turret_recipe = {
|
||||
type = "recipe",
|
||||
name = "basic-gun-turret",
|
||||
enabled = false,
|
||||
energy_required = 8,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 5 },
|
||||
{ type = "item", name = "lumber", amount = 10 },
|
||||
{ type = "item", name = "gold-plate", amount = 10 }
|
||||
},
|
||||
results = { { type = "item", name = "basic-gun-turret", amount = 1 } }
|
||||
}
|
||||
if settings.startup["lignumis-lumber-mill-more-recipes"].value then
|
||||
turret_recipe.category = "wood-processing-or-assembling"
|
||||
end
|
||||
|
||||
local turret_technology = {
|
||||
type = "technology",
|
||||
name = "basic-gun-turret",
|
||||
icon = Lignumis.graphics .. "technology/basic-gun-turret.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-gun-turret"
|
||||
}
|
||||
},
|
||||
prerequisites = { "wood-science-pack" },
|
||||
unit = {
|
||||
count = 10,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 10
|
||||
}
|
||||
}
|
||||
|
||||
data:extend({
|
||||
turret,
|
||||
turret_item,
|
||||
turret_recipe,
|
||||
turret_technology
|
||||
})
|
||||
108
lignumis-base/prototypes/content/basic-radar.lua
Normal file
108
lignumis-base/prototypes/content/basic-radar.lua
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
local hit_effects = require("__base__.prototypes.entity.hit-effects")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "radar",
|
||||
name = "basic-radar",
|
||||
icon = Lignumis.graphics .. "icons/basic-radar.png",
|
||||
flags = { "placeable-player", "player-creation" },
|
||||
minable = { mining_time = 0.1, result = "basic-radar" },
|
||||
fast_replaceable_group = "small-radar",
|
||||
max_health = 100,
|
||||
corpse = "small-remnants",
|
||||
dying_explosion = "inserter-explosion",
|
||||
resistances = {
|
||||
{
|
||||
type = "fire",
|
||||
percent = 70
|
||||
},
|
||||
{
|
||||
type = "impact",
|
||||
percent = 30
|
||||
}
|
||||
},
|
||||
collision_box = { { -0.25, -0.25 }, { 0.25, 0.25 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
damaged_trigger_effect = hit_effects.entity(),
|
||||
max_distance_of_sector_revealed = 0,
|
||||
max_distance_of_nearby_sector_revealed = 1,
|
||||
energy_per_sector = "1J",
|
||||
energy_per_nearby_scan = "1J",
|
||||
energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { noise = 5 }
|
||||
},
|
||||
energy_usage = "25kW",
|
||||
pictures = {
|
||||
layers = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/basic-radar.png",
|
||||
priority = "low",
|
||||
width = 128,
|
||||
height = 128,
|
||||
apply_projection = false,
|
||||
direction_count = 120,
|
||||
line_length = 12,
|
||||
shift = { 0.21, -0.2 },
|
||||
scale = 0.35,
|
||||
}
|
||||
}
|
||||
},
|
||||
impact_category = "metal",
|
||||
radius_minimap_visualisation_color = { 0.059, 0.092, 0.235, 0.275 },
|
||||
rotation_speed = 0.0001,
|
||||
is_military_target = false
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "basic-radar",
|
||||
icon = Lignumis.graphics .. "icons/basic-radar.png",
|
||||
subgroup = "defensive-structure",
|
||||
order = "d[radar]-0[basic-radar]",
|
||||
inventory_move_sound = item_sounds.metal_large_inventory_move,
|
||||
pick_sound = item_sounds.metal_large_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_large_inventory_move,
|
||||
place_result = "basic-radar",
|
||||
stack_size = 20,
|
||||
random_tint_color = item_tints.iron_rust
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "basic-radar",
|
||||
category = "crafting-with-steam",
|
||||
energy_required = 10,
|
||||
ingredients = {
|
||||
{ type = "item", name = "stone-brick", amount = 4 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 4 },
|
||||
{ type = "item", name = "gold-plate", amount = 4 },
|
||||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "gold-cable", amount = 4 }
|
||||
},
|
||||
results = { { type = "item", name = "basic-radar", amount = 1 } },
|
||||
enabled = false
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "basic-radar",
|
||||
icon = Lignumis.graphics .. "technology/basic-radar.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-radar"
|
||||
}
|
||||
},
|
||||
prerequisites = { "steam-science-pack" },
|
||||
unit = {
|
||||
count = 50,
|
||||
ingredients = { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } },
|
||||
time = 10
|
||||
}
|
||||
}
|
||||
})
|
||||
51
lignumis-base/prototypes/content/basic-repair-pack.lua
Normal file
51
lignumis-base/prototypes/content/basic-repair-pack.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
|
||||
local vanilla_repair_pack = data.raw["repair-tool"]["repair-pack"]
|
||||
vanilla_repair_pack.default_import_location = vanilla_repair_pack.default_import_location or "nauvis"
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "repair-tool",
|
||||
name = "basic-repair-pack",
|
||||
icon = Lignumis.graphics .. "icons/basic-repair-pack.png",
|
||||
subgroup = "tool",
|
||||
order = "b[repair]-0[basic-repair-pack]",
|
||||
inventory_move_sound = item_sounds.repair_pack_inventory_move,
|
||||
pick_sound = item_sounds.repair_pack_inventory_pickup,
|
||||
drop_sound = item_sounds.repair_pack_inventory_move,
|
||||
speed = 1,
|
||||
durability = 150,
|
||||
stack_size = 100,
|
||||
random_tint_color = item_tints.iron_rust,
|
||||
default_import_location = "lignumis"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "basic-repair-pack",
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-cable", amount = 4 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 1 }
|
||||
},
|
||||
results = { { type = "item", name = "basic-repair-pack", amount = 1 } }
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "basic-repair-pack",
|
||||
icon = Lignumis.graphics .. "technology/basic-repair-pack.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "basic-repair-pack"
|
||||
}
|
||||
},
|
||||
prerequisites = { "wood-science-pack" },
|
||||
unit = {
|
||||
count = 25,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 10
|
||||
}
|
||||
}
|
||||
})
|
||||
138
lignumis-base/prototypes/content/burner-agricultural-tower.lua
Normal file
138
lignumis-base/prototypes/content/burner-agricultural-tower.lua
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local gfx = Lignumis.graphics .. "entity/burner-agricultural-tower/"
|
||||
|
||||
local agricultural_tower = table.deepcopy(data.raw["agricultural-tower"]["agricultural-tower"])
|
||||
agricultural_tower.name = "burner-agricultural-tower"
|
||||
agricultural_tower.minable.result = "burner-agricultural-tower"
|
||||
agricultural_tower.next_upgrade = "agricultural-tower"
|
||||
agricultural_tower.corpses = "burner-agricultural-tower-remnants"
|
||||
agricultural_tower.icons = { { icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png", icon_size = 64 } }
|
||||
agricultural_tower.graphics_set.animation.layers[1].filename = gfx .. "burner-agricultural-tower-base.png"
|
||||
agricultural_tower.graphics_set.working_visualisations[1].animation.filename = gfx ..
|
||||
"burner-agricultural-tower-base.png"
|
||||
agricultural_tower.energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { noise = 75 }
|
||||
}
|
||||
agricultural_tower.resistances = nil
|
||||
agricultural_tower.input_inventory_size = 1
|
||||
agricultural_tower.output_inventory_size = 3
|
||||
agricultural_tower.radius = 2
|
||||
if agricultural_tower.surface_conditions then
|
||||
for _, condition in pairs(agricultural_tower.surface_conditions) do
|
||||
if condition.property == "pressure" then
|
||||
condition.min = 900
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local crane = agricultural_tower.crane
|
||||
crane.parts[1].rotated_sprite.filenames = { gfx .. "burner-agricultural-tower-crane-1-1.png", gfx ..
|
||||
"burner-agricultural-tower-crane-1-2.png" }
|
||||
crane.parts[2].rotated_sprite.filename = gfx .. "burner-agricultural-tower-crane-3.png"
|
||||
crane.parts[3].rotated_sprite.filename = gfx .. "burner-agricultural-tower-crane-4.png"
|
||||
crane.parts[4].rotated_sprite.filenames = { gfx .. "burner-agricultural-tower-crane-5-1.png", gfx ..
|
||||
"burner-agricultural-tower-crane-5-2.png" }
|
||||
crane.parts[5].rotated_sprite.filename = gfx .. "burner-agricultural-tower-crane-6.png"
|
||||
crane.parts[6].rotated_sprite.filenames = { gfx .. "burner-agricultural-tower-crane-7-1.png", gfx ..
|
||||
"burner-agricultural-tower-crane-7-2.png" }
|
||||
crane.parts[7].rotated_sprite.filename = gfx .. "burner-agricultural-tower-crane-8.png"
|
||||
crane.parts[8].sprite.filename = gfx .. "burner-agricultural-tower-crane-9.png"
|
||||
crane.parts[9].sprite.filename = gfx .. "burner-agricultural-tower-crane-10.png"
|
||||
crane.speed = {
|
||||
arm = {
|
||||
turn_rate = 0.001,
|
||||
extension_speed = 0.0025
|
||||
},
|
||||
grappler = {
|
||||
vertical_turn_rate = 0.001,
|
||||
horizontal_turn_rate = 0.005,
|
||||
extension_speed = 0.005,
|
||||
allow_transpolar_movement = true
|
||||
}
|
||||
}
|
||||
|
||||
local remnants = table.deepcopy(data.raw["corpse"]["agricultural-tower-remnants"])
|
||||
remnants.name = "burner-agricultural-tower-remnants"
|
||||
remnants.icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png"
|
||||
remnants.animation.filename = gfx .. "burner-agricultural-tower-remnants.png"
|
||||
remnants.order = "a[0-burner-agricultural-tower]"
|
||||
|
||||
data:extend({
|
||||
agricultural_tower,
|
||||
remnants,
|
||||
{
|
||||
type = "item",
|
||||
name = "burner-agricultural-tower",
|
||||
icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png",
|
||||
subgroup = "agriculture",
|
||||
order = "0[burner-agricultural-tower]",
|
||||
inventory_move_sound = item_sounds.mechanical_large_inventory_move,
|
||||
pick_sound = item_sounds.mechanical_large_inventory_pickup,
|
||||
drop_sound = item_sounds.mechanical_large_inventory_move,
|
||||
place_result = "burner-agricultural-tower",
|
||||
stack_size = 20,
|
||||
default_import_location = "lignumis",
|
||||
weight = 100 * kg
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "burner-agricultural-tower",
|
||||
category = "wood-processing-or-assembling",
|
||||
energy_required = 10,
|
||||
ingredients = {
|
||||
{ type = "item", name = "stone-brick", amount = 5 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 15 },
|
||||
{ type = "item", name = "lumber", amount = 15 },
|
||||
{ type = "item", name = "gold-plate", amount = basic_circuit_board and 10 or 20 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 10 } or nil
|
||||
},
|
||||
results = { { type = "item", name = "burner-agricultural-tower", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
})
|
||||
|
||||
local tech = data.raw.technology["tree-seeding"]
|
||||
table.insert(tech.effects, { type = "unlock-recipe", recipe = "burner-agricultural-tower" })
|
||||
tech.prerequisites = { "wood-science-pack" }
|
||||
tech.unit = {
|
||||
count = 10,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 }
|
||||
},
|
||||
time = 10
|
||||
}
|
||||
tech.ignore_tech_cost_multiplier = true
|
||||
|
||||
data.raw.technology["fish-breeding"].prerequisites = { "agricultural-science-pack" }
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "burner-agricultural-tower-copper",
|
||||
category = "wood-processing-or-assembling",
|
||||
localised_name = { "entity-name.burner-agricultural-tower" },
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png" },
|
||||
{ icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
energy_required = 10,
|
||||
ingredients = {
|
||||
{ type = "item", name = "stone-brick", amount = 5 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 15 },
|
||||
{ type = "item", name = "lumber", amount = 15 },
|
||||
{ type = "item", name = "copper-plate", amount = 10 },
|
||||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 10 }
|
||||
},
|
||||
results = { { type = "item", name = "burner-agricultural-tower", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("burner-agricultural-tower-copper")
|
||||
135
lignumis-base/prototypes/content/burner-assembling-machine.lua
Normal file
135
lignumis-base/prototypes/content/burner-assembling-machine.lua
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local gfx = Lignumis.graphics .. "entity/burner-assembling-machine/"
|
||||
|
||||
local assembling_machine = table.deepcopy(data.raw["assembling-machine"]["assembling-machine-1"])
|
||||
assembling_machine.name = "burner-assembling-machine"
|
||||
assembling_machine.icons = { { icon = Lignumis.graphics .. "icons/burner-assembling-machine.png", icon_size = 64 } }
|
||||
assembling_machine.minable.result = "burner-assembling-machine"
|
||||
assembling_machine.next_upgrade = "steam-assembling-machine"
|
||||
assembling_machine.corpse = "burner-assembling-machine-remnants"
|
||||
assembling_machine.resistances = nil
|
||||
assembling_machine.graphics_set.animation.layers[1].filename =
|
||||
gfx .. "burner-assembling-machine.png"
|
||||
assembling_machine.crafting_categories = {
|
||||
"basic-crafting",
|
||||
"crafting",
|
||||
"electronics",
|
||||
"pressing",
|
||||
"wood-processing-or-assembling",
|
||||
"organic-or-assembling",
|
||||
"electronics-or-assembling",
|
||||
"metallurgy-or-assembling"
|
||||
}
|
||||
assembling_machine.crafting_speed = 0.25
|
||||
assembling_machine.energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { noise = 50, pollution = 6 },
|
||||
smoke = {
|
||||
{
|
||||
name = "smoke",
|
||||
deviation = { 0.1, 0.1 },
|
||||
frequency = 2,
|
||||
position = { 0.0, -0.8 },
|
||||
starting_vertical_speed = 0.08,
|
||||
starting_frame_deviation = 60
|
||||
}
|
||||
}
|
||||
}
|
||||
assembling_machine.energy_usage = "75kW"
|
||||
|
||||
local remnants = table.deepcopy(data.raw["corpse"]["assembling-machine-1-remnants"])
|
||||
remnants.name = "burner-assembling-machine-remnants"
|
||||
remnants.icon = Lignumis.graphics .. "icons/burner-assembling-machine.png"
|
||||
remnants.animation[1].filename = gfx .. "burner-assembling-machine-remnants.png"
|
||||
remnants.animation[2].filename = gfx .. "burner-assembling-machine-remnants.png"
|
||||
remnants.animation[3].filename = gfx .. "burner-assembling-machine-remnants.png"
|
||||
remnants.order = "0[burner-assembling-machine]"
|
||||
|
||||
local crafting_category = settings.startup["lignumis-lumber-mill-more-recipes"].value and "wood-processing-or-assembling" or "crafting"
|
||||
|
||||
data:extend({
|
||||
assembling_machine,
|
||||
remnants,
|
||||
{
|
||||
type = "item",
|
||||
name = "burner-assembling-machine",
|
||||
icon = Lignumis.graphics .. "icons/burner-assembling-machine.png",
|
||||
subgroup = "production-machine",
|
||||
order = "0[burner-assembling-machine]",
|
||||
inventory_move_sound = item_sounds.mechanical_inventory_move,
|
||||
pick_sound = item_sounds.mechanical_inventory_pickup,
|
||||
drop_sound = item_sounds.mechanical_inventory_move,
|
||||
place_result = "burner-assembling-machine",
|
||||
stack_size = 50
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "burner-assembling-machine",
|
||||
category = crafting_category,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 5 },
|
||||
{ type = "item", name = "lumber", amount = 8 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or
|
||||
{ type = "item", name = "gold-cable", amount = 10 }
|
||||
},
|
||||
results = { { type = "item", name = "burner-assembling-machine", amount = 1 } },
|
||||
energy_required = 4
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "burner-automation",
|
||||
icon = Lignumis.graphics .. "technology/burner-automation.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "burner-assembling-machine"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "burner-long-handed-inserter"
|
||||
}
|
||||
},
|
||||
prerequisites = { "wood-science-pack" },
|
||||
unit = {
|
||||
count = 10,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 10
|
||||
},
|
||||
ignore_tech_cost_multiplier = true
|
||||
}
|
||||
})
|
||||
|
||||
if not basic_circuit_board then
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "burner-assembling-machine-electronic-circuit",
|
||||
category = crafting_category,
|
||||
localised_name = { "entity-name.burner-assembling-machine" },
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/burner-assembling-machine.png" },
|
||||
{ icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 5 },
|
||||
{ type = "item", name = "lumber", amount = 8 },
|
||||
{ type = "item", name = "electronic-circuit", amount = 5 }
|
||||
},
|
||||
results = { { type = "item", name = "burner-assembling-machine", amount = 1 } },
|
||||
energy_required = 4
|
||||
}
|
||||
})
|
||||
|
||||
table.insert(data.raw.technology["electronics"].effects, {
|
||||
type = "unlock-recipe",
|
||||
recipe = "burner-assembling-machine-electronic-circuit"
|
||||
})
|
||||
end
|
||||
205
lignumis-base/prototypes/content/burner-lamp.lua
Normal file
205
lignumis-base/prototypes/content/burner-lamp.lua
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
local gfx = Lignumis.graphics .. "entity/burner-lamp/"
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = "lamp-burning"
|
||||
},
|
||||
{
|
||||
name = "burner-lamp",
|
||||
type = "assembling-machine",
|
||||
minable = {
|
||||
mining_time = 0.1,
|
||||
result = "burner-lamp",
|
||||
},
|
||||
icon = Lignumis.graphics .. "icons/burner-lamp.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
collision_mask = { layers = { object = true, water_tile = true, meltable = true, player = true } },
|
||||
crafting_speed = 1,
|
||||
crafting_categories = { "lamp-burning" },
|
||||
fixed_recipe = "burner-lamp-burning",
|
||||
dying_explosion = "lamp-explosion",
|
||||
show_recipe_icon = false,
|
||||
show_recipe_icon_on_map = false,
|
||||
source_inventory_size = 1,
|
||||
result_inventory_size = 1,
|
||||
energy_source = {
|
||||
emissions_per_minute = { pollution = 0.02 },
|
||||
type = "burner",
|
||||
fuel_inventory_size = 1,
|
||||
burnt_inventory_size = 1,
|
||||
fuel_categories = { "chemical" },
|
||||
light_flicker = {
|
||||
color = { 0, 0, 0, 0 }, -- to remove default burner glow
|
||||
},
|
||||
render_no_power_icon = false,
|
||||
},
|
||||
energy_usage = "9.6kW",
|
||||
max_health = 100,
|
||||
resistances = {
|
||||
{
|
||||
type = "fire",
|
||||
percent = 95
|
||||
},
|
||||
},
|
||||
corpse = "small-remnants",
|
||||
flags = { "placeable-player", "placeable-neutral", "player-creation" },
|
||||
collision_box = { { -0.15, -0.15 }, { 0.15, 0.15 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
graphics_set = {
|
||||
animation = {
|
||||
layers = {
|
||||
{
|
||||
draw_as_glow = false,
|
||||
draw_as_light = false,
|
||||
draw_as_shadow = false,
|
||||
filename = gfx .. "burner-lamp-base.png",
|
||||
height = 128,
|
||||
priority = "high",
|
||||
scale = 0.5,
|
||||
shift = { 0, 0 },
|
||||
width = 128,
|
||||
x = 0,
|
||||
y = 0
|
||||
},
|
||||
{
|
||||
draw_as_glow = false,
|
||||
draw_as_light = false,
|
||||
draw_as_shadow = true,
|
||||
filename = gfx .. "burner-lamp-shadow.png",
|
||||
height = 128,
|
||||
priority = "high",
|
||||
scale = 0.5,
|
||||
shift = { 0, 0 },
|
||||
width = 128,
|
||||
x = 0,
|
||||
y = 0
|
||||
}
|
||||
}
|
||||
},
|
||||
working_visualisations = {
|
||||
{
|
||||
animation = {
|
||||
animation_speed = 1,
|
||||
blend_mode = "additive-soft",
|
||||
draw_as_glow = true,
|
||||
draw_as_light = false,
|
||||
draw_as_shadow = false,
|
||||
filename = gfx .. "burner-lamp-working.png",
|
||||
frame_count = 30,
|
||||
height = 128,
|
||||
line_length = 6,
|
||||
priority = "high",
|
||||
scale = 0.5,
|
||||
shift = { 0, 0 },
|
||||
width = 128,
|
||||
x = 0,
|
||||
y = 0
|
||||
},
|
||||
light = {
|
||||
color = { 1.0, 0.82, 0.5 },
|
||||
intensity = 0.4,
|
||||
size = 40,
|
||||
type = "oriented",
|
||||
picture = {
|
||||
filename = gfx .. "light.png",
|
||||
width = 256,
|
||||
height = 256,
|
||||
scale = 0.125
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
working_sound = {
|
||||
sound = {
|
||||
filename = "__base__/sound/furnace.ogg",
|
||||
volume = 1.0
|
||||
}
|
||||
},
|
||||
open_sound = {
|
||||
filename = "__base__/sound/machine-open.ogg",
|
||||
volume = 0.75
|
||||
},
|
||||
close_sound = {
|
||||
filename = "__base__/sound/machine-close.ogg",
|
||||
volume = 0.75
|
||||
},
|
||||
mined_sound = {
|
||||
filename = "__base__/sound/deconstruct-bricks.ogg"
|
||||
},
|
||||
vehicle_impact_sound = {
|
||||
filename = "__base__/sound/car-metal-impact.ogg",
|
||||
volume = 0.65
|
||||
},
|
||||
squeak_behaviour = false,
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "burner-lamp",
|
||||
icon = Lignumis.graphics .. "icons/burner-lamp.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
subgroup = "circuit-network", -- Copper lamp under circuit-network
|
||||
order = "a[lamp]-b[copper-lamp]", -- Copper lamp after large lamp
|
||||
place_result = "burner-lamp",
|
||||
stack_size = 50,
|
||||
weight = 20 * kg
|
||||
},
|
||||
{
|
||||
name = "burner-lamp",
|
||||
type = "recipe",
|
||||
enabled = true,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 4 },
|
||||
{ type = "item", name = "stone-brick", amount = 2 },
|
||||
},
|
||||
results = {
|
||||
{ type = "item", name = "burner-lamp", amount = 1 }
|
||||
},
|
||||
subgroup = "circuit-network", -- Copper lamp under circuit-network
|
||||
order = "a[lamp]-b[copper-lamp]", -- Place after large lamp
|
||||
category = "crafting" -- Category for crafting
|
||||
},
|
||||
{
|
||||
name = "burner-lamp-copper",
|
||||
type = "recipe",
|
||||
enabled = false,
|
||||
localised_name = { "entity-name.burner-lamp" },
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/burner-lamp.png" },
|
||||
{ icon = "__base__/graphics/icons/copper-plate.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
ingredients = {
|
||||
{ type = "item", name = "copper-plate", amount = 4 },
|
||||
{ type = "item", name = "stone-brick", amount = 2 },
|
||||
},
|
||||
results = {
|
||||
{ type = "item", name = "burner-lamp", amount = 1 }
|
||||
},
|
||||
subgroup = "circuit-network", -- Copper lamp under circuit-network
|
||||
order = "a[lamp]-b[copper-lamp]", -- Place after large lamp
|
||||
category = "crafting" -- Category for crafting
|
||||
},
|
||||
-- Define the hidden burning recipe for the copper lamp
|
||||
{
|
||||
name = "burner-lamp-burning", -- Make sure this name matches the recipe you are referencing
|
||||
type = "recipe",
|
||||
enabled = true,
|
||||
hidden = true,
|
||||
hide_from_stats = true,
|
||||
icon = Lignumis.graphics .. "icons/burner-lamp.png", -- Icon path for the recipe
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
category = "lamp-burning", -- Custom category for lamp burning
|
||||
ingredients = {},
|
||||
results = {},
|
||||
subgroup = "other", -- Optional: Adjust this if needed
|
||||
energy_required = 25000 / 60, -- Represents one "Factorio day"
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new("copper-processing"):addRecipe("burner-lamp-copper")
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local gfx = Lignumis.graphics .. "entity/burner-long-handed-inserter/"
|
||||
|
||||
local long_handed_inserter = table.deepcopy(data.raw["inserter"]["long-handed-inserter"])
|
||||
long_handed_inserter.name = "burner-long-handed-inserter"
|
||||
long_handed_inserter.icon = Lignumis.graphics .. "icons/burner-long-handed-inserter.png"
|
||||
long_handed_inserter.minable.result = "burner-long-handed-inserter"
|
||||
long_handed_inserter.next_upgrade = "long-handed-inserter"
|
||||
long_handed_inserter.corpse = "burner-long-handed-inserter-remnants"
|
||||
long_handed_inserter.resistances = nil
|
||||
long_handed_inserter.hand_base_picture.filename = gfx .. "burner-long-handed-inserter-hand-base.png"
|
||||
long_handed_inserter.hand_closed_picture.filename = gfx .. "burner-long-handed-inserter-hand-closed.png"
|
||||
long_handed_inserter.hand_open_picture.filename = gfx .. "burner-long-handed-inserter-hand-open.png"
|
||||
long_handed_inserter.platform_picture.sheet.filename = gfx .. "burner-long-handed-inserter-platform.png"
|
||||
long_handed_inserter.energy_per_movement = "70kJ"
|
||||
long_handed_inserter.energy_per_rotation = "70kJ"
|
||||
long_handed_inserter.energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
initial_fuel = "coal",
|
||||
initial_fuel_percent = 0.25,
|
||||
light_flicker = { color = { 0, 0, 0 } },
|
||||
smoke = {
|
||||
{
|
||||
name = "smoke",
|
||||
deviation = { 0.1, 0.1 },
|
||||
frequency = 9
|
||||
}
|
||||
}
|
||||
}
|
||||
long_handed_inserter.extension_speed = 0.035
|
||||
long_handed_inserter.rotation_speed = 0.014
|
||||
|
||||
local remnants = table.deepcopy(data.raw["corpse"]["long-handed-inserter-remnants"])
|
||||
remnants.name = "burner-long-handed-inserter-remnants"
|
||||
remnants.icon = Lignumis.graphics .. "icons/burner-long-handed-inserter.png"
|
||||
remnants.animation[1].filename = gfx .. "burner-long-handed-inserter-remnants.png"
|
||||
remnants.animation[2].filename = gfx .. "burner-long-handed-inserter-remnants.png"
|
||||
remnants.animation[3].filename = gfx .. "burner-long-handed-inserter-remnants.png"
|
||||
remnants.animation[4].filename = gfx .. "burner-long-handed-inserter-remnants.png"
|
||||
remnants.order = "a-c-0"
|
||||
|
||||
local crafting_category = settings.startup["lignumis-lumber-mill-more-recipes"].value and "wood-processing-or-assembling" or "crafting"
|
||||
|
||||
data:extend({
|
||||
long_handed_inserter,
|
||||
remnants,
|
||||
{
|
||||
type = "item",
|
||||
name = "burner-long-handed-inserter",
|
||||
icon = Lignumis.graphics .. "icons/burner-long-handed-inserter.png",
|
||||
subgroup = "inserter",
|
||||
color_hint = { text = "L" },
|
||||
order = "b0[burner-long-handed-inserter]",
|
||||
inventory_move_sound = item_sounds.inserter_inventory_move,
|
||||
pick_sound = item_sounds.inserter_inventory_pickup,
|
||||
drop_sound = item_sounds.inserter_inventory_move,
|
||||
place_result = "burner-long-handed-inserter",
|
||||
stack_size = 50
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "burner-long-handed-inserter",
|
||||
category = crafting_category,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 1 },
|
||||
{ type = "item", name = "burner-inserter", amount = 1 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 1 } or
|
||||
{ type = "item", name = "gold-cable", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "burner-long-handed-inserter", amount = 1 } }
|
||||
}
|
||||
})
|
||||
36
lignumis-base/prototypes/content/data.lua
Normal file
36
lignumis-base/prototypes/content/data.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
require("item-subgroups")
|
||||
require("technology")
|
||||
require("lignumis/planet")
|
||||
require("lignumis/autoplace-controls")
|
||||
require("wooden-gearwheel")
|
||||
require("peat")
|
||||
require("wood-lab")
|
||||
require("wood-science")
|
||||
require("burner-agricultural-tower")
|
||||
require("burner-assembling-machine")
|
||||
require("burner-lamp")
|
||||
require("burner-long-handed-inserter")
|
||||
require("lumber-mill")
|
||||
require("gold")
|
||||
require("deep-miner")
|
||||
require("desiccation-furnace")
|
||||
require("steam-assembling-machine")
|
||||
require("steam-science")
|
||||
require("wood-liquefaction")
|
||||
require("wooden-rocket-silo")
|
||||
require("basic-gun-turret")
|
||||
require("fuel-category")
|
||||
require("basic-construction-robots")
|
||||
require("lumber")
|
||||
require("wood-logistics")
|
||||
require("basic-repair-pack")
|
||||
require("basic-radar")
|
||||
require("mid-game-recipes")
|
||||
require("active-noise-cancelling-tower")
|
||||
require("quality-assembler")
|
||||
require("decoratives")
|
||||
require("wood-military")
|
||||
require("basic-circuit-board")
|
||||
require("enemies")
|
||||
|
||||
require("noise")
|
||||
23
lignumis-base/prototypes/content/decoratives.lua
Normal file
23
lignumis-base/prototypes/content/decoratives.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
local sounds = require("__base__.prototypes.entity.sounds")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
name = "gold-rock-cluster",
|
||||
type = "optimized-decorative",
|
||||
order = "a[lignumis]-a[decorative]-a[gold-rock-clusters]",
|
||||
collision_box = { { -1, -1 }, { 1, 1 } },
|
||||
collision_mask = { layers = { water_tile = true, doodad = true }, colliding_with_tiles_only = true },
|
||||
render_layer = "decorative",
|
||||
walking_sound = sounds.sand,
|
||||
autoplace = {
|
||||
order = "d[ground-surface]-b[sulfur-rock]-b[cluster]",
|
||||
placement_density = 1,
|
||||
probability_expression =
|
||||
"basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 3000000, input_scale = 1/8, output_scale = 1/4}",
|
||||
tile_restriction = { "natural-gold-soil" }
|
||||
},
|
||||
pictures = get_decal_pictures(
|
||||
"__space-age__/graphics/decorative/tiny-volcanic-rock-cluster/tiny-volcanic-rock-cluster-", "", 128, 8,
|
||||
{ 0.788, 0.627, 0.167 }, true)
|
||||
}
|
||||
})
|
||||
44
lignumis-base/prototypes/content/deep-miner.lua
Normal file
44
lignumis-base/prototypes/content/deep-miner.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
local DeepMinerFactory = require(MF.buildings .. "CoreExtractor")
|
||||
local DeepMiner = DeepMinerFactory("deep-miner")
|
||||
|
||||
local entity = DeepMiner.EntityBuilder:new():build({
|
||||
resource_searching_radius = 0.49,
|
||||
energy_usage = "25MW",
|
||||
mining_speed = 7.5,
|
||||
energy_source = {
|
||||
emissions_per_minute = { noise = 2000 }
|
||||
},
|
||||
resource_drain_rate_percent = 75
|
||||
})
|
||||
entity.resource_categories = { "deep-mining" }
|
||||
data:extend({ entity })
|
||||
|
||||
DeepMiner.ItemBuilder:new()
|
||||
:itemsPerRocket(1)
|
||||
:apply({
|
||||
subgroup = "extraction-machine",
|
||||
order = "a[items]-d[deep-miner]"
|
||||
})
|
||||
|
||||
DeepMiner.RecipeBuilder:new()
|
||||
:ingredients({
|
||||
{ type = "item", name = "processing-unit", amount = 100 },
|
||||
{ type = "item", name = "electric-engine-unit", amount = 100 },
|
||||
{ type = "item", name = "steel-plate", amount = 200 },
|
||||
{ type = "item", name = "concrete", amount = 50 }
|
||||
})
|
||||
:apply({
|
||||
category = "metallurgy-or-assembling"
|
||||
})
|
||||
|
||||
DeepMiner.TechnologyBuilder:new()
|
||||
:prerequisites({ "space-science-pack" })
|
||||
:count(500)
|
||||
:ingredients({
|
||||
{ "automation-science-pack", 1 },
|
||||
{ "logistic-science-pack", 1 },
|
||||
{ "chemical-science-pack", 1 },
|
||||
{ "space-science-pack", 1 }
|
||||
})
|
||||
:time(60)
|
||||
:apply()
|
||||
70
lignumis-base/prototypes/content/desiccation-furnace.lua
Normal file
70
lignumis-base/prototypes/content/desiccation-furnace.lua
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local pipecovers = require("prototypes/content/gold/pipecovers")
|
||||
local machinepipes = require("prototypes/content/gold/machinepipes")
|
||||
|
||||
local furnace = table.deepcopy(data.raw.furnace["stone-furnace"])
|
||||
furnace.name = "desiccation-furnace"
|
||||
furnace.icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/stone-furnace.png" },
|
||||
{ icon = "__base__/graphics/icons/fluid/steam.png", scale = 0.25, shift = { 8, -8 } }
|
||||
}
|
||||
furnace.fluid_boxes = {
|
||||
{
|
||||
volume = 200,
|
||||
pipe_picture = machinepipes(),
|
||||
pipe_covers = pipecovers(),
|
||||
pipe_connections = {
|
||||
{ flow_direction = "output", direction = defines.direction.east, position = { 0.5, 0.5 } }
|
||||
},
|
||||
production_type = "output"
|
||||
}
|
||||
}
|
||||
furnace.crafting_categories = { "desiccation" }
|
||||
furnace.minable.result = "desiccation-furnace"
|
||||
furnace.graphics_set.animation.layers[1].filename = Lignumis.graphics .. "entity/stone-furnace/stone-furnace.png"
|
||||
|
||||
furnace.fluid_boxes[1].pipe_covers.north.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-north.png"
|
||||
furnace.fluid_boxes[1].pipe_covers.east.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-east.png"
|
||||
furnace.fluid_boxes[1].pipe_covers.south.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-south.png"
|
||||
furnace.fluid_boxes[1].pipe_covers.west.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-west.png"
|
||||
|
||||
local furnace_item = {
|
||||
type = "item",
|
||||
name = "desiccation-furnace",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/stone-furnace.png" },
|
||||
{ icon = "__base__/graphics/icons/fluid/steam.png", scale = 0.25, shift = { 8, -8 } }
|
||||
},
|
||||
subgroup = "smelting-machine",
|
||||
order = "a[stone-furnace]-ab[desiccation]",
|
||||
inventory_move_sound = item_sounds.brick_inventory_move,
|
||||
pick_sound = item_sounds.brick_inventory_pickup,
|
||||
drop_sound = item_sounds.brick_inventory_move,
|
||||
place_result = "desiccation-furnace",
|
||||
stack_size = 50
|
||||
}
|
||||
|
||||
local furnace_recipe = {
|
||||
type = "recipe",
|
||||
name = "desiccation-furnace",
|
||||
ingredients = {
|
||||
{ type = "item", name = "stone-furnace", amount = 1 },
|
||||
{ type = "item", name = "gold-pipe", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "desiccation-furnace", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = "desiccation"
|
||||
},
|
||||
furnace,
|
||||
furnace_item,
|
||||
furnace_recipe
|
||||
})
|
||||
545
lignumis-base/prototypes/content/enemies.lua
Normal file
545
lignumis-base/prototypes/content/enemies.lua
Normal file
|
|
@ -0,0 +1,545 @@
|
|||
local particle_animations = require("__space-age__/prototypes/particle-animations")
|
||||
local base_sounds = require("__base__.prototypes.entity.sounds")
|
||||
local space_age_sounds = require("__space-age__.prototypes.entity.sounds")
|
||||
local simulations = require("__space-age__.prototypes.factoriopedia-simulations")
|
||||
local biter_ai_settings = require("__base__.prototypes.entity.biter-ai-settings")
|
||||
|
||||
local blood_particles = {
|
||||
"blood-particle-small",
|
||||
}
|
||||
|
||||
for _, particle_name in ipairs(blood_particles) do
|
||||
local new_particle = table.deepcopy(data.raw["optimized-particle"][particle_name])
|
||||
local scale = new_particle.pictures.sheet.scale
|
||||
local shift = new_particle.pictures.sheet.shift
|
||||
new_particle.name = "lignumis-" .. particle_name
|
||||
new_particle.pictures = {
|
||||
sheet = {
|
||||
filename = "__space-age__/graphics/particle/gleba-blood-particle/gleba-blood-particle.png",
|
||||
line_length = 12,
|
||||
width = 32,
|
||||
height = 24,
|
||||
frame_count = 12,
|
||||
variation_count = 7,
|
||||
scale = scale * 0.25,
|
||||
shift = shift
|
||||
}
|
||||
}
|
||||
data:extend({ new_particle })
|
||||
end
|
||||
|
||||
function gleba_hit_effects(offset_deviation, offset)
|
||||
local offset = offset or { 0, 0 }
|
||||
return {
|
||||
type = "create-entity",
|
||||
entity_name = "gleba-enemy-damaged-explosion",
|
||||
offset_deviation = offset_deviation or { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
offsets = { offset },
|
||||
damage_type_filters = "fire"
|
||||
}
|
||||
end
|
||||
|
||||
function wriggler_spritesheet(name, frames, speed, scale, tint, flag)
|
||||
speed = speed or 1.0
|
||||
local is_shadow = string.sub(name, -string.len("-shadow")) == "-shadow"
|
||||
local is_decay = string.find(name, "decay")
|
||||
if is_decay and is_shadow then return nil end
|
||||
return util.sprite_load("__space-age__/graphics/entity/wriggler/wriggler-" .. name,
|
||||
{
|
||||
slice = 5,
|
||||
frame_count = frames,
|
||||
direction_count = 16,
|
||||
scale = 0.5 * 1.2 * scale,
|
||||
multiply_shift = scale,
|
||||
animation_speed = speed,
|
||||
draw_as_shadow = is_shadow,
|
||||
tint_as_overlay = tint and true or nil,
|
||||
tint = tint,
|
||||
flags = (not is_shadow) and { flag } or nil,
|
||||
surface = "gleba",
|
||||
usage = "enemy"
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function wriggler_corpse_spritesheet(name, frames, speed, scale, tint)
|
||||
return wriggler_spritesheet(name, frames, speed, scale, tint, "corpse-decay")
|
||||
end
|
||||
|
||||
local default_ended_in_water_trigger_effect = function()
|
||||
return {
|
||||
{
|
||||
type = "create-particle",
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
show_in_tooltip = false,
|
||||
particle_name = "tintable-water-particle",
|
||||
apply_tile_tint = "secondary",
|
||||
offset_deviation = { { -0.05, -0.05 }, { 0.05, 0.05 } },
|
||||
initial_height = 0,
|
||||
initial_height_deviation = 0.02,
|
||||
initial_vertical_speed = 0.05,
|
||||
initial_vertical_speed_deviation = 0.05,
|
||||
speed_from_center = 0.01,
|
||||
speed_from_center_deviation = 0.006,
|
||||
frame_speed = 1,
|
||||
frame_speed_deviation = 0,
|
||||
tail_length = 2,
|
||||
tail_length_deviation = 1,
|
||||
tail_width = 3
|
||||
},
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 10,
|
||||
repeat_count_deviation = 6,
|
||||
probability = 0.03,
|
||||
affects_target = false,
|
||||
show_in_tooltip = false,
|
||||
particle_name = "tintable-water-particle",
|
||||
apply_tile_tint = "primary",
|
||||
offsets = {
|
||||
{ 0, 0 },
|
||||
{ 0.01563, -0.09375 },
|
||||
{ 0.0625, 0.09375 },
|
||||
{ -0.1094, 0.0625 }
|
||||
},
|
||||
offset_deviation = { { -0.2969, -0.1992 }, { 0.2969, 0.1992 } },
|
||||
initial_height = 0,
|
||||
initial_height_deviation = 0.02,
|
||||
initial_vertical_speed = 0.053,
|
||||
initial_vertical_speed_deviation = 0.005,
|
||||
speed_from_center = 0.02,
|
||||
speed_from_center_deviation = 0.006,
|
||||
frame_speed = 1,
|
||||
frame_speed_deviation = 0,
|
||||
tail_length = 9,
|
||||
tail_length_deviation = 0,
|
||||
tail_width = 1
|
||||
},
|
||||
{
|
||||
type = "play-sound",
|
||||
sound = base_sounds.small_splash
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local make_particle = function(params)
|
||||
if not params then error("No params given to make_particle function") end
|
||||
local name = params.name or error("No name given")
|
||||
|
||||
local ended_in_water_trigger_effect = params.ended_in_water_trigger_effect or default_ended_in_water_trigger_effect()
|
||||
if params.ended_in_water_trigger_effect == false then
|
||||
ended_in_water_trigger_effect = nil
|
||||
end
|
||||
|
||||
local particle = {
|
||||
type = "optimized-particle",
|
||||
name = name,
|
||||
life_time = params.life_time or (60 * 15),
|
||||
fade_away_duration = params.fade_away_duration,
|
||||
render_layer = params.render_layer or "projectile",
|
||||
render_layer_when_on_ground = params.render_layer_when_on_ground or "corpse",
|
||||
regular_trigger_effect_frequency = params.regular_trigger_effect_frequency or 2,
|
||||
regular_trigger_effect = params.regular_trigger_effect,
|
||||
ended_in_water_trigger_effect = ended_in_water_trigger_effect,
|
||||
pictures = params.pictures,
|
||||
shadows = params.shadows,
|
||||
draw_shadow_when_on_ground = params.draw_shadow_when_on_ground,
|
||||
movement_modifier_when_on_ground = params.movement_modifier_when_on_ground,
|
||||
movement_modifier = params.movement_modifier,
|
||||
vertical_acceleration = params.vertical_acceleration,
|
||||
mining_particle_frame_speed = params.mining_particle_frame_speed,
|
||||
}
|
||||
return particle
|
||||
end
|
||||
|
||||
local function lerp_color(a, b, amount)
|
||||
return {
|
||||
a[1] + amount * (b[1] - a[1]),
|
||||
a[2] + amount * (b[2] - a[2]),
|
||||
a[3] + amount * (b[3] - a[3]),
|
||||
a[4] + amount * (b[4] - a[4]),
|
||||
}
|
||||
end
|
||||
|
||||
function make_wriggler(prefix, scale, health, damage, tints, factoriopedia_simulation, factoriopedia_simulation_premature,
|
||||
sounds)
|
||||
-- Premature version loses health so that the swarm will get removed (more efficient).
|
||||
-- Spawner-spawned versions are stable so that the area is not full of corpses.
|
||||
local tint_mask = tints.mask
|
||||
local tint_body = tints.body
|
||||
|
||||
local function attack_parameters()
|
||||
local cooldown = 26
|
||||
return {
|
||||
ammo_category = "melee",
|
||||
ammo_type = {
|
||||
target_type = "entity",
|
||||
action = {
|
||||
type = "direct",
|
||||
action_delivery = {
|
||||
type = "instant",
|
||||
target_effects = {
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 5 * damage, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
animation = {
|
||||
layers = {
|
||||
wriggler_spritesheet("attack", 19, 0.48, scale, tint_body),
|
||||
wriggler_spritesheet("attack-tint", 19, 0.48, scale, tint_mask),
|
||||
wriggler_spritesheet("attack-shadow", 19, 0.48, scale),
|
||||
}
|
||||
},
|
||||
cooldown = cooldown,
|
||||
cooldown_deviation = 0.1,
|
||||
range = 1.8 * scale,
|
||||
range_mode = "bounding-box-to-bounding-box",
|
||||
sound = sounds.attack_sound,
|
||||
type = "projectile"
|
||||
}
|
||||
end
|
||||
|
||||
local wriggler = {
|
||||
type = "unit",
|
||||
name = prefix .. "wriggler-pentapod-premature",
|
||||
icon = Lignumis.graphics .. "icons/" .. prefix .. "wriggler.png",
|
||||
subgroup = "enemies",
|
||||
order = "gleba-a-wriggler-" .. tostring(scale),
|
||||
factoriopedia_simulation = factoriopedia_simulation_premature,
|
||||
collision_box = { { -0.2 * scale, -0.2 * scale }, { 0.2 * scale, 0.2 * scale } },
|
||||
sticker_box = { { -0.5 * scale, -0.5 * scale }, { 0.5 * scale, 0.5 * scale } },
|
||||
selection_box = { { -0.9 * scale, -0.9 * scale }, { 0.9 * scale, 0.9 * scale } },
|
||||
collision_mask = { layers = { player = true, train = true, is_object = true }, not_colliding_with_itself = true },
|
||||
flags = { "placeable-player", "placeable-enemy", "placeable-off-grid", "not-repairable", "breaths-air" },
|
||||
absorptions_to_join_attack = { noise = 1 },
|
||||
ai_settings = biter_ai_settings,
|
||||
attack_parameters = attack_parameters(),
|
||||
corpse = prefix .. "wriggler-pentapod-corpse",
|
||||
damaged_trigger_effect = gleba_hit_effects(),
|
||||
distance_per_frame = 0.125,
|
||||
distraction_cooldown = 300,
|
||||
dying_explosion = prefix .. "wriggler-die",
|
||||
dying_sound = sounds.dying_sound,
|
||||
healing_per_tick = -health / 1 / 60,
|
||||
impact_category = "organic",
|
||||
max_health = health,
|
||||
max_pursue_distance = 30,
|
||||
min_pursue_time = 300,
|
||||
movement_speed = 0.15 * (1 + (scale - 1) / 2),
|
||||
run_animation = {
|
||||
layers = {
|
||||
wriggler_spritesheet("run", 21, 0.48, scale, tint_body),
|
||||
wriggler_spritesheet("run-tint", 21, 0.48, scale, tint_mask),
|
||||
wriggler_spritesheet("run-shadow", 21, 0.48, scale),
|
||||
}
|
||||
},
|
||||
running_sound_animation_positions = { 2 },
|
||||
vision_distance = 20,
|
||||
water_reflection = {
|
||||
orientation_to_variation = false,
|
||||
rotate = true,
|
||||
pictures = {
|
||||
filename = "__base__/graphics/entity/biter/biter-reflection.png",
|
||||
height = 28,
|
||||
priority = "extra-high",
|
||||
scale = 2.5 * scale,
|
||||
shift = { 0.15625, 0.46875 },
|
||||
variation_count = 1,
|
||||
width = 20
|
||||
}
|
||||
},
|
||||
walking_sound = sounds.walking_sound,
|
||||
working_sound = sounds.working_sound,
|
||||
warcry = sounds.warcry,
|
||||
}
|
||||
|
||||
local wriggler_stable = table.deepcopy(wriggler)
|
||||
wriggler_stable.name = prefix .. "wriggler-pentapod"
|
||||
wriggler_stable.factoriopedia_simulation = factoriopedia_simulation
|
||||
wriggler_stable.healing_per_tick = health / 500 / 60
|
||||
wriggler_stable.absorptions_to_join_attack = { noise = 1 }
|
||||
wriggler_stable.attack_parameters = attack_parameters()
|
||||
|
||||
local wriggler_corpse = {
|
||||
type = "corpse",
|
||||
name = prefix .. "wriggler-pentapod-corpse",
|
||||
icon = Lignumis.graphics .. "icons/" .. prefix .. "wriggler-corpse.png",
|
||||
subgroup = "corpses",
|
||||
order = "c[corpse]-d[gleba-enemies-corpses]-d[wriggler]" .. tostring(scale),
|
||||
hidden_in_factoriopedia = true,
|
||||
selection_box = { { -0.8, -0.8 }, { 0.8, 0.8 } },
|
||||
selectable_in_game = false,
|
||||
animation = {
|
||||
layers = {
|
||||
wriggler_corpse_spritesheet("death", 17, 0.48, scale, tint_body),
|
||||
wriggler_corpse_spritesheet("death-tint", 17, 0.48, scale, tint_mask),
|
||||
wriggler_corpse_spritesheet("death-shadow", 17, 0.48, scale),
|
||||
}
|
||||
},
|
||||
decay_animation = {
|
||||
layers = {
|
||||
wriggler_corpse_spritesheet("decay", 9, nil, scale, tint_body),
|
||||
wriggler_corpse_spritesheet("decay-tint", 9, nil, scale, tint_mask),
|
||||
wriggler_corpse_spritesheet("decay-shadow", 9, nil, scale),
|
||||
}
|
||||
},
|
||||
dying_speed = 0.015 / scale,
|
||||
decay_frame_transition_duration = 150,
|
||||
time_before_removed = 1 * 60 * 60, -- 1 minute
|
||||
use_decay_layer = true,
|
||||
|
||||
direction_shuffle = { { 1, 2, 3, 16 }, { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 12, 13, 14, 15 } },
|
||||
shuffle_directions_at_frame = 0,
|
||||
final_render_layer = "lower-object-above-shadow",
|
||||
flags = {
|
||||
"placeable-neutral",
|
||||
"placeable-off-grid",
|
||||
"building-direction-8-way",
|
||||
"not-repairable",
|
||||
"not-on-map"
|
||||
},
|
||||
ground_patch = {
|
||||
sheet =
|
||||
util.sprite_load("__space-age__/graphics/entity/wriggler/blood-puddle-var-main",
|
||||
{
|
||||
flags = { "low-object" },
|
||||
variation_count = 4,
|
||||
scale = 0.4 * scale,
|
||||
multiply_shift = 0.125,
|
||||
}
|
||||
)
|
||||
},
|
||||
ground_patch_fade_in_delay = 20,
|
||||
ground_patch_fade_in_speed = 0.002,
|
||||
ground_patch_fade_out_duration = 50 * 60 / 7.5,
|
||||
ground_patch_fade_out_start = 50 * 60 / 7.5,
|
||||
ground_patch_render_layer = "decals"
|
||||
}
|
||||
|
||||
local wrigger_explosion = {
|
||||
type = "explosion",
|
||||
name = prefix .. "wriggler-die",
|
||||
scale = 0.25,
|
||||
icon = "__space-age__/graphics/icons/medium-wriggler-corpse.png",
|
||||
order = "a[corpse]-f[wriggler]",
|
||||
flags = { "not-on-map" },
|
||||
hidden = true,
|
||||
subgroup = "enemy-death-explosions",
|
||||
animations = util.empty_sprite(),
|
||||
created_effect = {
|
||||
type = "direct",
|
||||
action_delivery = {
|
||||
type = "instant",
|
||||
target_effects = {
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 13,
|
||||
repeat_count_deviation = 1,
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
show_in_tooltip = false,
|
||||
particle_name = "lignumis-blood-particle-small",
|
||||
offsets = { { 0, 0 } },
|
||||
offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
initial_height = 0.1,
|
||||
initial_height_deviation = 0.1,
|
||||
initial_vertical_speed = 0.009,
|
||||
initial_vertical_speed_deviation = 0.009,
|
||||
speed_from_center = 0.05,
|
||||
speed_from_center_deviation = 0.05,
|
||||
frame_speed = 1,
|
||||
frame_speed_deviation = 0,
|
||||
tail_length = 5,
|
||||
tail_length_deviation = 5,
|
||||
tail_width = 3,
|
||||
rotate_offsets = false
|
||||
},
|
||||
{
|
||||
type = "create-particle",
|
||||
repeat_count = 12,
|
||||
repeat_count_deviation = 3,
|
||||
probability = 1,
|
||||
affects_target = false,
|
||||
show_in_tooltip = false,
|
||||
particle_name = "lignumis-blood-particle-small",
|
||||
offsets = {
|
||||
{ 0, -0.4 },
|
||||
{ 0, 0.5 },
|
||||
{ 0, 0.6 }
|
||||
},
|
||||
offset_deviation = { { -0.25, -0.25 }, { 0.25, 0.25 } },
|
||||
initial_height = 0.1,
|
||||
initial_height_deviation = 0.1,
|
||||
initial_vertical_speed = 0.055,
|
||||
initial_vertical_speed_deviation = 0.075,
|
||||
speed_from_center = 0.03,
|
||||
speed_from_center_deviation = 0.03,
|
||||
frame_speed = 1,
|
||||
frame_speed_deviation = 0,
|
||||
tail_length = 52,
|
||||
tail_length_deviation = 25,
|
||||
tail_width = 3,
|
||||
rotate_offsets = false
|
||||
},
|
||||
{
|
||||
type = "play-sound",
|
||||
sound = base_sounds.medium_gore
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data:extend {
|
||||
--wriggler,
|
||||
wriggler_stable,
|
||||
wriggler_corpse,
|
||||
wrigger_explosion,
|
||||
make_particle
|
||||
{
|
||||
name = prefix .. "wriggler-skin-particle",
|
||||
life_time = 300,
|
||||
pictures = particle_animations.get_pentpod_skin_particles_small({ scale = 1 * scale, tint = lerp_color(tint_mask, { 255, 255, 255, 255 }, 0.7) }),
|
||||
shadows = particle_animations.get_pentpod_skin_particles_small({ scale = 1 * scale, tint = shadowtint(), shift = util.by_pixel(1, 0) }),
|
||||
ended_in_water_trigger_effect = default_ended_in_water_trigger_effect(),
|
||||
render_layer_when_on_ground = "lower-object-above-shadow"
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function fade(tint, amount) -- fades to minimal opacity grey. Low opacity is good for the mask to let the base layer show htough (instead of having a grey mask)
|
||||
return lerp_color(tint, { 1, 1, 1, 2 }, amount)
|
||||
end
|
||||
|
||||
local function grey_overlay(tint, amount) -- fades to opaque grey. Full opacity is required for body.
|
||||
return lerp_color(tint, { 127, 127, 127, 255 }, amount)
|
||||
end
|
||||
|
||||
-- mask tint is vibrant and only on the mask
|
||||
-- body tint applies to the whole body and should be near 127 grey, just adds a hint of saturation
|
||||
local gleba_small_mask_tint = { 103, 151, 11, 255 }
|
||||
local gleba_small_body_tint = { 125, 124, 111, 255 }
|
||||
|
||||
make_wriggler("lignumis-small-", 0.2, 10, 0.1,
|
||||
{
|
||||
mask = fade(lerp_color(gleba_small_mask_tint, { 255, 200, 0, 255 }, 0.2), 0.2),
|
||||
body = grey_overlay(lerp_color(gleba_small_body_tint, { 255, 0, 0, 255 }, 0.2), 0.2)
|
||||
},
|
||||
simulations.factoriopedia_gleba_enemy_small_wriggler,
|
||||
simulations.factoriopedia_gleba_enemy_small_wriggler_premature,
|
||||
space_age_sounds.wriggler_pentapod.small
|
||||
)
|
||||
|
||||
make_wriggler("lignumis-medium-", 0.5, 50, 1,
|
||||
{
|
||||
mask = fade(lerp_color(gleba_small_mask_tint, { 255, 200, 0, 255 }, 0.4), 0.2),
|
||||
body = grey_overlay(lerp_color(gleba_small_body_tint, { 255, 0, 0, 255 }, 0.4), 0.2)
|
||||
},
|
||||
simulations.factoriopedia_gleba_enemy_small_wriggler,
|
||||
simulations.factoriopedia_gleba_enemy_small_wriggler_premature,
|
||||
space_age_sounds.wriggler_pentapod.small
|
||||
)
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "noise-expression",
|
||||
name = "enemy_lignumis_intensity",
|
||||
-- biter placement stops increasing in "intensity" after 75 chunks (2400 tiles)
|
||||
expression = "clamp(distance, 0, 2400) / 325"
|
||||
},
|
||||
{
|
||||
type = "noise-expression",
|
||||
name = "enemy_lignumis_radius",
|
||||
expression = "sqrt(var('control:lignumis_enemy_base:size')) * (15 + 4 * enemy_lignumis_intensity)"
|
||||
},
|
||||
{
|
||||
type = "noise-expression",
|
||||
name = "enemy_lignumis_frequency",
|
||||
-- bases_per_km2 = 10 + 3 * enemy_lignumis_intensity
|
||||
expression = "(0.00001 + 0.000003 * enemy_lignumis_intensity) * var('control:lignumis_enemy_base:frequency')"
|
||||
},
|
||||
{
|
||||
type = "noise-expression",
|
||||
name = "enemy_lignumis_probability",
|
||||
expression = "spot_noise{x = x,\z
|
||||
y = y,\z
|
||||
density_expression = spot_quantity_expression * max(0, enemy_lignumis_frequency),\z
|
||||
spot_quantity_expression = spot_quantity_expression,\z
|
||||
spot_radius_expression = spot_radius_expression,\z
|
||||
spot_favorability_expression = 1,\z
|
||||
seed0 = map_seed,\z
|
||||
seed1 = 123,\z
|
||||
region_size = 512,\z
|
||||
candidate_point_count = 100,\z
|
||||
hard_region_target_quantity = 0,\z
|
||||
basement_value = -1000,\z
|
||||
maximum_spot_basement_radius = 128} + \z
|
||||
(blob(1/8, 1) + blob(1/24, 1) + blob(1/64, 2) - 0.5) * spot_radius_expression / 150 * \z
|
||||
(0.1 + 0.9 * clamp(distance / 3000, 0, 1)) - 0.3 + min(0, 20 / starting_area_radius * distance - 20)",
|
||||
local_expressions =
|
||||
{
|
||||
spot_radius_expression = "max(0, enemy_lignumis_radius)",
|
||||
spot_quantity_expression = "pi/90 * spot_radius_expression ^ 3"
|
||||
},
|
||||
local_functions =
|
||||
{
|
||||
blob =
|
||||
{
|
||||
parameters = { "input_scale", "output_scale" },
|
||||
expression =
|
||||
"basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 123, input_scale = input_scale, output_scale = output_scale}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "noise-function",
|
||||
name = "enemy_autoplace_lignumis",
|
||||
parameters = { "distance_factor", "seed" },
|
||||
expression = "random_penalty{x = x + seed,\z
|
||||
y = y,\z
|
||||
source = min(enemy_lignumis_probability * max(0, 1 + 0.002 * distance_factor * (-312 * distance_factor - starting_area_radius + distance)),\z
|
||||
0.25 + distance_factor * 0.05),\z
|
||||
amplitude = 0.1}"
|
||||
}
|
||||
})
|
||||
|
||||
local function lignumis_spawner_autoplace(probability_expression, order)
|
||||
return {
|
||||
control = "lignumis_enemy_base",
|
||||
order = order,
|
||||
force = "enemy",
|
||||
probability_expression = probability_expression,
|
||||
richness_expression = 1
|
||||
}
|
||||
end
|
||||
|
||||
local spawner = table.deepcopy(data.raw["unit-spawner"]["gleba-spawner-small"])
|
||||
table.assign(spawner, {
|
||||
name = "lignumis-spawner-small",
|
||||
result_units = {
|
||||
{ "lignumis-small-wriggler-pentapod", { { 0.0, 0.9 }, { 0.5, 0.9 }, { 0.6, 0.5 } } },
|
||||
{ "lignumis-medium-wriggler-pentapod", { { 0.1, 0 }, { 0.4, 0 }, { 1, 0.9 } } }
|
||||
},
|
||||
max_count_of_owned_units = 7,
|
||||
max_friends_around_to_spawn = 5,
|
||||
spawning_spacing = 3,
|
||||
max_spawn_shift = 0,
|
||||
max_richness_for_spawn_shift = 100,
|
||||
resistances = {},
|
||||
healing_per_tick = 1 / 60,
|
||||
spawning_cooldown = { 60, 20 },
|
||||
spawning_radius = 4,
|
||||
call_for_help_radius = 20,
|
||||
autoplace = lignumis_spawner_autoplace("enemy_autoplace_lignumis(0, 548)", "b[enemy]-0[spawner]"),
|
||||
absorptions_per_second = { noise = { absolute = 40, proportional = 0.01 } },
|
||||
})
|
||||
spawner.collision_mask = nil
|
||||
spawner.loot = nil
|
||||
spawner.dying_trigger_effect[1].entity_name = "lignumis-small-wriggler-pentapod"
|
||||
|
||||
data:extend({ spawner })
|
||||
7
lignumis-base/prototypes/content/final.lua
Normal file
7
lignumis-base/prototypes/content/final.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Override science packs in final fixes in the case other mods add their science packs to all labs in a generic way
|
||||
data.raw.lab["wood-lab"].inputs = {
|
||||
"wood-science-pack",
|
||||
"steam-science-pack",
|
||||
"automation-science-pack",
|
||||
"logistic-science-pack"
|
||||
}
|
||||
38
lignumis-base/prototypes/content/fuel-category-updates.lua
Normal file
38
lignumis-base/prototypes/content/fuel-category-updates.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
data.raw.item["wood"].fuel_category = "wood"
|
||||
data.raw.item["lumber"].fuel_category = "wood"
|
||||
data.raw.item["tree-seed"].fuel_category = "wood"
|
||||
data.raw.item["wooden-wall"].fuel_category = "wood"
|
||||
|
||||
-- Update burner inserters initial fuel
|
||||
for _, inserter in pairs(data.raw["inserter"]) do
|
||||
if inserter.energy_source and inserter.energy_source.initial_fuel == "wood" then
|
||||
inserter.energy_source.initial_fuel = "coal"
|
||||
end
|
||||
end
|
||||
|
||||
-- Update energy source fuel categories for buildings that should still use wood as fuel
|
||||
|
||||
local blacklist = {}
|
||||
|
||||
function update_fuel_categories(t)
|
||||
for _, entity in pairs(t) do
|
||||
for _, energy_source in pairs({ "energy_source", "burner" }) do
|
||||
if entity[energy_source]
|
||||
and entity[energy_source].type == "burner"
|
||||
and not table.contains(blacklist, entity.name)
|
||||
and entity[energy_source].fuel_categories
|
||||
and table.contains(entity[energy_source].fuel_categories, "chemical")
|
||||
then
|
||||
table.insert(entity[energy_source].fuel_categories, "wood")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Add more if incompatibilities arise
|
||||
update_fuel_categories(data.raw["boiler"])
|
||||
update_fuel_categories(data.raw["reactor"])
|
||||
update_fuel_categories(data.raw["car"])
|
||||
update_fuel_categories(data.raw["locomotive"])
|
||||
update_fuel_categories(data.raw["generator-equipment"])
|
||||
update_fuel_categories(data.raw["burner-generator"])
|
||||
6
lignumis-base/prototypes/content/fuel-category.lua
Normal file
6
lignumis-base/prototypes/content/fuel-category.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
data:extend({
|
||||
{
|
||||
type = "fuel-category",
|
||||
name = "wood"
|
||||
}
|
||||
})
|
||||
5
lignumis-base/prototypes/content/gold.lua
Normal file
5
lignumis-base/prototypes/content/gold.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
require("gold/stromatolite")
|
||||
require("gold/tiles")
|
||||
require("gold/resource")
|
||||
require("gold/intermediates")
|
||||
require("gold/pipes")
|
||||
102
lignumis-base/prototypes/content/gold/intermediates.lua
Normal file
102
lignumis-base/prototypes/content/gold/intermediates.lua
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "gold-plate",
|
||||
icon = Lignumis.graphics .. "icons/gold-plate.png",
|
||||
subgroup = "raw-material",
|
||||
color_hint = { text = "C" },
|
||||
order = "a[smelting]-0[gold-plate]",
|
||||
inventory_move_sound = item_sounds.metal_small_inventory_move,
|
||||
pick_sound = item_sounds.metal_small_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_small_inventory_move,
|
||||
stack_size = 100,
|
||||
enabled = true
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "gold-plate",
|
||||
category = "smelting",
|
||||
energy_required = 3.2,
|
||||
ingredients = { { type = "item", name = "gold-ore", amount = 1 } },
|
||||
results = { { type = "item", name = "gold-plate", amount = 1 } },
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "gold-cable",
|
||||
icon = Lignumis.graphics .. "icons/gold-cable.png",
|
||||
subgroup = "intermediate-product",
|
||||
order = "a[basic-intermediates]-b0[gold-cable]",
|
||||
inventory_move_sound = item_sounds.wire_inventory_move,
|
||||
pick_sound = item_sounds.wire_inventory_pickup,
|
||||
drop_sound = item_sounds.wire_inventory_move,
|
||||
stack_size = 200,
|
||||
weight = 0.25 * kg,
|
||||
ingredient_to_weight_coefficient = 0.25
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "gold-cable",
|
||||
category = "crafting",
|
||||
additional_categories = { "electromagnetics" },
|
||||
ingredients = { { type = "item", name = "gold-plate", amount = 1 } },
|
||||
results = { { type = "item", name = "gold-cable", amount = 2 } },
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "fluid",
|
||||
name = "molten-gold",
|
||||
icon = Lignumis.graphics .. "icons/molten-gold.png",
|
||||
subgroup = "fluid",
|
||||
order = "b[new-fluid]-0[lignumis]-a[molten-gold]",
|
||||
default_temperature = 1500,
|
||||
max_temperature = 2000,
|
||||
heat_capacity = "0.01kJ",
|
||||
base_color = { 210, 149, 34 },
|
||||
flow_color = { 210, 149, 34 },
|
||||
auto_barrel = false
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "molten-gold",
|
||||
category = "metallurgy",
|
||||
subgroup = "vulcanus-processes",
|
||||
order = "a[melting]-d[molten-gold]",
|
||||
auto_recycle = false,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-ore", amount = 50 },
|
||||
{ type = "item", name = "calcite", amount = 1 },
|
||||
},
|
||||
energy_required = 32,
|
||||
results = {
|
||||
{ type = "fluid", name = "molten-gold", amount = 500 },
|
||||
},
|
||||
allow_productivity = true,
|
||||
hide_from_signal_gui = false,
|
||||
main_product = "molten-gold"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "casting-gold",
|
||||
category = "metallurgy",
|
||||
subgroup = "vulcanus-processes",
|
||||
order = "b[casting]-c[casting-gold]",
|
||||
icon = Lignumis.graphics .. "icons/casting-gold.png",
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "fluid", name = "molten-gold", amount = 20, fluidbox_multiplier = 10 },
|
||||
},
|
||||
energy_required = 3.2,
|
||||
allow_decomposition = false,
|
||||
results = { { type = "item", name = "gold-plate", amount = 2 } },
|
||||
allow_productivity = true
|
||||
}
|
||||
})
|
||||
|
||||
local foundry_technology = Technology:new("foundry")
|
||||
foundry_technology:addRecipe("casting-gold")
|
||||
foundry_technology:addRecipe("molten-gold")
|
||||
41
lignumis-base/prototypes/content/gold/machinepipes.lua
Normal file
41
lignumis-base/prototypes/content/gold/machinepipes.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
return function()
|
||||
return
|
||||
{
|
||||
north =
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/machine-gold-pipe-N.png",
|
||||
priority = "extra-high",
|
||||
width = 71,
|
||||
height = 38,
|
||||
shift = util.by_pixel(2.25, 13.5),
|
||||
scale = 0.5
|
||||
},
|
||||
east =
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/machine-gold-pipe-E.png",
|
||||
priority = "extra-high",
|
||||
width = 42,
|
||||
height = 76,
|
||||
shift = util.by_pixel(-24.5, 1),
|
||||
scale = 0.5
|
||||
},
|
||||
south =
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/machine-gold-pipe-S.png",
|
||||
priority = "extra-high",
|
||||
width = 88,
|
||||
height = 61,
|
||||
shift = util.by_pixel(0, -31.25),
|
||||
scale = 0.5
|
||||
},
|
||||
west =
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/machine-gold-pipe-W.png",
|
||||
priority = "extra-high",
|
||||
width = 39,
|
||||
height = 73,
|
||||
shift = util.by_pixel(25.75, 1.25),
|
||||
scale = 0.5
|
||||
}
|
||||
}
|
||||
end
|
||||
81
lignumis-base/prototypes/content/gold/pipecovers.lua
Normal file
81
lignumis-base/prototypes/content/gold/pipecovers.lua
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
return function()
|
||||
return
|
||||
{
|
||||
north = {
|
||||
layers = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-north.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-north-shadow.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5,
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
east = {
|
||||
layers = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-east.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-east-shadow.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5,
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
south = {
|
||||
layers = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-south.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-south-shadow.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5,
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
west = {
|
||||
layers = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-west.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-west-shadow.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 128,
|
||||
scale = 0.5,
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
411
lignumis-base/prototypes/content/gold/pipes.lua
Normal file
411
lignumis-base/prototypes/content/gold/pipes.lua
Normal file
|
|
@ -0,0 +1,411 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
local hit_effects = require("__base__.prototypes.entity.hit-effects")
|
||||
local sounds = require("__base__.prototypes.entity.sounds")
|
||||
local pipecovers = require("prototypes/content/gold/pipecovers")
|
||||
|
||||
function make_rotated_animation_variations_from_sheet(variation_count, sheet) --makes remnants work with more than 1 variation
|
||||
local result = {}
|
||||
|
||||
local function set_y_offset(variation, i)
|
||||
local frame_count = variation.frame_count or 1
|
||||
local line_length = variation.line_length or frame_count
|
||||
if (line_length < 1) then
|
||||
line_length = frame_count
|
||||
end
|
||||
|
||||
local height_in_frames = math.floor((frame_count * variation.direction_count + line_length - 1) / line_length)
|
||||
-- if (height_in_frames ~= 1) then
|
||||
-- log("maybe broken sheet: h=" .. height_in_frames .. ", vc=" .. variation_count .. ", " .. variation.filename)
|
||||
-- end
|
||||
variation.y = variation.height * (i - 1) * height_in_frames
|
||||
end
|
||||
|
||||
for i = 1, variation_count do
|
||||
local variation = util.table.deepcopy(sheet)
|
||||
|
||||
if variation.layers then
|
||||
for _, layer in pairs(variation.layers) do
|
||||
set_y_offset(layer, i)
|
||||
end
|
||||
else
|
||||
set_y_offset(variation, i)
|
||||
end
|
||||
|
||||
table.insert(result, variation)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
local pipe = table.deepcopy(data.raw.pipe["pipe"])
|
||||
pipe.name = "gold-pipe"
|
||||
pipe.icon = Lignumis.graphics .. "icons/gold-pipe.png"
|
||||
pipe.corpse = "gold-pipe-remnants"
|
||||
pipe.next_upgrade = "pipe"
|
||||
pipe.fluid_box.volume = 50
|
||||
pipe.minable.result = "gold-pipe"
|
||||
|
||||
pipe.fluid_box.pipe_covers.north.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-north.png"
|
||||
pipe.fluid_box.pipe_covers.east.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-east.png"
|
||||
pipe.fluid_box.pipe_covers.south.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-south.png"
|
||||
pipe.fluid_box.pipe_covers.west.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-west.png"
|
||||
|
||||
pipe.pictures.straight_vertical_single.filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-straight-vertical-single.png"
|
||||
pipe.pictures.straight_vertical.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-straight-vertical.png"
|
||||
pipe.pictures.straight_vertical_window.filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-straight-vertical-window.png"
|
||||
pipe.pictures.straight_horizontal_window.filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-straight-horizontal-window.png"
|
||||
pipe.pictures.straight_horizontal.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-straight-horizontal.png"
|
||||
pipe.pictures.corner_up_right.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-corner-up-right.png"
|
||||
pipe.pictures.corner_up_left.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-corner-up-left.png"
|
||||
pipe.pictures.corner_down_right.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-corner-down-right.png"
|
||||
pipe.pictures.corner_down_left.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-corner-down-left.png"
|
||||
pipe.pictures.t_up.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-t-up.png"
|
||||
pipe.pictures.t_down.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-t-down.png"
|
||||
pipe.pictures.t_right.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-t-right.png"
|
||||
pipe.pictures.t_left.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-t-left.png"
|
||||
pipe.pictures.cross.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cross.png"
|
||||
pipe.pictures.ending_up.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-ending-up.png"
|
||||
pipe.pictures.ending_down.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-ending-down.png"
|
||||
pipe.pictures.ending_right.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-ending-right.png"
|
||||
pipe.pictures.ending_left.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-ending-left.png"
|
||||
|
||||
local pipe_item = {
|
||||
type = "item",
|
||||
name = "gold-pipe",
|
||||
icon = Lignumis.graphics .. "icons/gold-pipe.png",
|
||||
subgroup = "energy-pipe-distribution",
|
||||
order = "a[pipe]-a[gold-pipe]",
|
||||
inventory_move_sound = item_sounds.metal_small_inventory_move,
|
||||
pick_sound = item_sounds.metal_small_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_small_inventory_move,
|
||||
place_result = "gold-pipe",
|
||||
stack_size = 100,
|
||||
weight = 5 * kg,
|
||||
default_import_location = "lignumis",
|
||||
random_tint_color = item_tints.iron_rust
|
||||
}
|
||||
|
||||
local pipe_recipe = {
|
||||
type = "recipe",
|
||||
name = "gold-pipe",
|
||||
ingredients = { { type = "item", name = "gold-plate", amount = 1 } },
|
||||
results = { { type = "item", name = "gold-pipe", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
|
||||
local pipe_remnants = {
|
||||
type = "corpse",
|
||||
name = "gold-pipe-remnants",
|
||||
icon = Lignumis.graphics .. "icons/gold-pipe.png",
|
||||
flags = { "placeable-neutral", "not-on-map" },
|
||||
hidden_in_factoriopedia = true,
|
||||
subgroup = "energy-pipe-distribution-remnants",
|
||||
order = "a-d-a",
|
||||
collision_box = { { -0.4, -0.4 }, { 0.4, 0.4 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
selectable_in_game = false,
|
||||
time_before_removed = 60 * 60 * 15, -- 15 minutes
|
||||
expires = false,
|
||||
final_render_layer = "remnants",
|
||||
remove_on_tile_placement = false,
|
||||
animation = make_rotated_animation_variations_from_sheet(2, {
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-remnants.png",
|
||||
width = 122,
|
||||
height = 120,
|
||||
line_length = 1,
|
||||
direction_count = 2,
|
||||
shift = util.by_pixel(1.5, 2.5), -- -0,5
|
||||
scale = 0.5
|
||||
})
|
||||
}
|
||||
|
||||
local pipe_to_ground = table.deepcopy(data.raw["pipe-to-ground"]["pipe-to-ground"])
|
||||
pipe_to_ground.name = "gold-pipe-to-ground"
|
||||
pipe_to_ground.icon = Lignumis.graphics .. "icons/gold-pipe-to-ground.png"
|
||||
pipe_to_ground.corpse = "gold-pipe-to-ground-remnants"
|
||||
pipe_to_ground.next_upgrade = "pipe-to-ground"
|
||||
pipe_to_ground.fluid_box.volume = 50
|
||||
pipe_to_ground.minable.result = "gold-pipe-to-ground"
|
||||
for _, connection in pairs(pipe_to_ground.fluid_box.pipe_connections) do
|
||||
if connection.connection_type == "underground" then
|
||||
connection.max_underground_distance = 6
|
||||
end
|
||||
end
|
||||
|
||||
pipe_to_ground.fluid_box.pipe_covers.north.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-north.png"
|
||||
pipe_to_ground.fluid_box.pipe_covers.east.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-east.png"
|
||||
pipe_to_ground.fluid_box.pipe_covers.south.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-south.png"
|
||||
pipe_to_ground.fluid_box.pipe_covers.west.layers[1].filename =
|
||||
Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-west.png"
|
||||
|
||||
pipe_to_ground.pictures.north.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-to-ground-up.png"
|
||||
pipe_to_ground.pictures.east.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-to-ground-right.png"
|
||||
pipe_to_ground.pictures.south.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-to-ground-down.png"
|
||||
pipe_to_ground.pictures.west.filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-to-ground-left.png"
|
||||
|
||||
local pipe_to_ground_item = {
|
||||
type = "item",
|
||||
name = "gold-pipe-to-ground",
|
||||
icon = Lignumis.graphics .. "icons/gold-pipe-to-ground.png",
|
||||
subgroup = "energy-pipe-distribution",
|
||||
order = "a[pipe]-b[gold-pipe-to-ground]",
|
||||
inventory_move_sound = item_sounds.metal_small_inventory_move,
|
||||
pick_sound = item_sounds.metal_small_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_small_inventory_move,
|
||||
place_result = "gold-pipe-to-ground",
|
||||
stack_size = 50,
|
||||
weight = 5 * kg,
|
||||
default_import_location = "lignumis",
|
||||
random_tint_color = item_tints.iron_rust
|
||||
}
|
||||
|
||||
local pipe_to_ground_recipe = {
|
||||
type = "recipe",
|
||||
name = "gold-pipe-to-ground",
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-pipe", amount = 6 },
|
||||
{ type = "item", name = "gold-plate", amount = 4 }
|
||||
},
|
||||
results = { { type = "item", name = "gold-pipe-to-ground", amount = 2 } }
|
||||
}
|
||||
|
||||
local pipe_to_ground_remnants = {
|
||||
type = "corpse",
|
||||
name = "gold-pipe-to-ground-remnants",
|
||||
icon = Lignumis.graphics .. "icons/gold-pipe-to-ground.png",
|
||||
flags = { "placeable-neutral", "not-on-map" },
|
||||
hidden_in_factoriopedia = true,
|
||||
subgroup = "energy-pipe-distribution-remnants",
|
||||
order = "a-d-a",
|
||||
collision_box = { { -0.4, -0.4 }, { 0.4, 0.4 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
selectable_in_game = false,
|
||||
time_before_removed = 60 * 60 * 15, -- 15 minutes
|
||||
expires = false,
|
||||
final_render_layer = "remnants",
|
||||
remove_on_tile_placement = false,
|
||||
animation = {
|
||||
filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-to-ground-remnants.png",
|
||||
width = 90,
|
||||
height = 80,
|
||||
line_length = 1,
|
||||
direction_count = 1,
|
||||
shift = util.by_pixel(0.5, -3),
|
||||
scale = 0.5
|
||||
}
|
||||
}
|
||||
|
||||
local tank = {
|
||||
type = "storage-tank",
|
||||
name = "gold-storage-tank",
|
||||
icon = Lignumis.graphics .. "icons/gold-storage-tank.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
flags = { "placeable-player", "player-creation" },
|
||||
minable = { mining_time = 0.5, result = "gold-storage-tank" },
|
||||
max_health = 300,
|
||||
corpse = "gold-storage-tank-remnants",
|
||||
dying_explosion = "storage-tank-explosion",
|
||||
collision_box = { { -0.9, -0.9 }, { 0.9, 0.9 } },
|
||||
selection_box = { { -1, -1 }, { 1, 1 } },
|
||||
drawing_box_vertical_extension = 0.15,
|
||||
icon_draw_specification = { scale = 1, shift = { 0, -0.25 } },
|
||||
damaged_trigger_effect = hit_effects.entity(),
|
||||
fluid_box = {
|
||||
volume = 10000,
|
||||
pipe_covers = pipecovers(),
|
||||
pipe_connections = {
|
||||
{ direction = defines.direction.north, position = { 0.5, -0.5 } },
|
||||
{ direction = defines.direction.east, position = { 0.5, -0.5 } },
|
||||
{ direction = defines.direction.west, position = { -0.5, -0.5 } }
|
||||
},
|
||||
hide_connection_info = true
|
||||
},
|
||||
two_direction_only = false,
|
||||
window_bounding_box = { { -0.2, 11 / 64 }, { 0.2, 1.0 - 16 / 64 } },
|
||||
pictures = {
|
||||
picture = {
|
||||
sheets = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-storage-tank/gold-storage-tank.png",
|
||||
priority = "extra-high",
|
||||
width = 128,
|
||||
height = 160,
|
||||
scale = 0.5,
|
||||
frames = 4,
|
||||
shift = util.by_pixel(0, -8)
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-storage-tank/gold-storage-tank.png",
|
||||
priority = "extra-high",
|
||||
y = 160,
|
||||
width = 160,
|
||||
height = 128,
|
||||
scale = 0.5,
|
||||
frames = 4,
|
||||
shift = util.by_pixel(0, 8),
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
window_background = {
|
||||
filename = Lignumis.graphics .. "entity/gold-storage-tank/gold-storage-tank-window-background.png",
|
||||
priority = "extra-high",
|
||||
width = 20,
|
||||
height = 41,
|
||||
scale = 0.5,
|
||||
shift = util.by_pixel(0, -0.5)
|
||||
},
|
||||
fluid_background = {
|
||||
filename = "__base__/graphics/entity/storage-tank/fluid-background.png",
|
||||
priority = "extra-high",
|
||||
width = 32,
|
||||
height = 15,
|
||||
scale = 1.0
|
||||
},
|
||||
flow_sprite = {
|
||||
filename = "__base__/graphics/entity/pipe/fluid-flow-low-temperature.png",
|
||||
priority = "extra-high",
|
||||
width = 160,
|
||||
height = 20,
|
||||
scale = 1.0
|
||||
},
|
||||
gas_flow = {
|
||||
filename = "__base__/graphics/entity/pipe/steam.png",
|
||||
priority = "extra-high",
|
||||
line_length = 10,
|
||||
width = 48,
|
||||
height = 30,
|
||||
frame_count = 60,
|
||||
axially_symmetrical = false,
|
||||
animation_speed = 0.25,
|
||||
direction_count = 1,
|
||||
scale = 0.5
|
||||
}
|
||||
},
|
||||
flow_length_in_ticks = 405, -- should match the Storage Tank
|
||||
impact_category = "metal-large",
|
||||
open_sound = sounds.metal_large_open,
|
||||
close_sound = sounds.metal_large_close,
|
||||
working_sound = {
|
||||
sound = {
|
||||
filename = "__base__/sound/storage-tank.ogg",
|
||||
volume = 0.5
|
||||
},
|
||||
match_volume_to_activity = true,
|
||||
audible_distance_modifier = 0.5,
|
||||
max_sounds_per_type = 3
|
||||
},
|
||||
circuit_connector = circuit_connector_definitions.create_vector
|
||||
(universal_connector_template,
|
||||
{
|
||||
{
|
||||
variation = 25,
|
||||
main_offset = util.by_pixel(-20, 0),
|
||||
shadow_offset = util.by_pixel(-20, 0),
|
||||
show_shadow = false
|
||||
},
|
||||
{
|
||||
variation = 25,
|
||||
main_offset = util.by_pixel(-20, 0),
|
||||
shadow_offset = util.by_pixel(-20, 0),
|
||||
show_shadow = false
|
||||
},
|
||||
{
|
||||
variation = 27,
|
||||
main_offset = util.by_pixel(20, 0),
|
||||
shadow_offset = util.by_pixel(20, 0),
|
||||
show_shadow = false
|
||||
},
|
||||
{
|
||||
variation = 27,
|
||||
main_offset = util.by_pixel(20, 0),
|
||||
shadow_offset = util.by_pixel(20, 0),
|
||||
show_shadow = false
|
||||
},
|
||||
}
|
||||
),
|
||||
circuit_wire_max_distance = default_circuit_wire_max_distance,
|
||||
}
|
||||
|
||||
tank.fluid_box.pipe_covers.north.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-north.png"
|
||||
tank.fluid_box.pipe_covers.east.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-east.png"
|
||||
tank.fluid_box.pipe_covers.south.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-south.png"
|
||||
tank.fluid_box.pipe_covers.west.layers[1].filename = Lignumis.graphics .. "entity/gold-pipe/gold-pipe-cover-west.png"
|
||||
|
||||
local tank_item = {
|
||||
type = "item",
|
||||
name = "gold-storage-tank",
|
||||
icon = Lignumis.graphics .. "icons/gold-storage-tank.png",
|
||||
subgroup = "storage",
|
||||
order = "b[fluid]-a[gold-storage-tank]",
|
||||
inventory_move_sound = item_sounds.metal_large_inventory_move,
|
||||
pick_sound = item_sounds.metal_large_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_large_inventory_move,
|
||||
place_result = "gold-storage-tank",
|
||||
stack_size = 10,
|
||||
weight = 50 * kg,
|
||||
default_import_location = "lignumis"
|
||||
}
|
||||
|
||||
local tank_recipe = {
|
||||
type = "recipe",
|
||||
name = "gold-storage-tank",
|
||||
energy_required = 3,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 20 },
|
||||
{ type = "item", name = "lumber", amount = 20 }
|
||||
},
|
||||
results = { { type = "item", name = "gold-storage-tank", amount = 1 } }
|
||||
}
|
||||
|
||||
local tank_remnants = {
|
||||
type = "corpse",
|
||||
name = "gold-storage-tank-remnants",
|
||||
icon = Lignumis.graphics .. "icons/gold-storage-tank.png",
|
||||
flags = { "placeable-neutral", "building-direction-8-way", "not-on-map" },
|
||||
hidden_in_factoriopedia = true,
|
||||
subgroup = "storage-remnants",
|
||||
order = "a-d-a",
|
||||
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
|
||||
tile_width = 3,
|
||||
tile_height = 3,
|
||||
selectable_in_game = false,
|
||||
time_before_removed = 60 * 60 * 15, -- 15 minutes
|
||||
expires = false,
|
||||
final_render_layer = "remnants",
|
||||
remove_on_tile_placement = false,
|
||||
animation = make_rotated_animation_variations_from_sheet(1,
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-storage-tank/gold-storage-tank-remnants.png",
|
||||
line_length = 1,
|
||||
width = 284,
|
||||
height = 188,
|
||||
direction_count = 1,
|
||||
shift = util.by_pixel(17, 12),
|
||||
scale = 0.5
|
||||
})
|
||||
}
|
||||
|
||||
data:extend({
|
||||
pipe,
|
||||
pipe_item,
|
||||
pipe_recipe,
|
||||
pipe_remnants,
|
||||
pipe_to_ground,
|
||||
pipe_to_ground_item,
|
||||
pipe_to_ground_recipe,
|
||||
pipe_to_ground_remnants,
|
||||
tank,
|
||||
tank_item,
|
||||
tank_recipe,
|
||||
tank_remnants
|
||||
})
|
||||
72
lignumis-base/prototypes/content/gold/resource.lua
Normal file
72
lignumis-base/prototypes/content/gold/resource.lua
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local resource_autoplace = require("resource-autoplace")
|
||||
|
||||
resource_autoplace.initialize_patch_set("gold-patch", true)
|
||||
|
||||
data:extend({
|
||||
{
|
||||
name = "deep-mining",
|
||||
type = "resource-category",
|
||||
},
|
||||
{
|
||||
type = "resource",
|
||||
name = "gold-patch",
|
||||
icon = Lignumis.graphics .. "icons/gold-patch.png",
|
||||
icon_size = 64,
|
||||
flags = { "placeable-neutral" },
|
||||
category = "deep-mining",
|
||||
order = "a-b-a",
|
||||
infinite = false,
|
||||
highlight = true,
|
||||
resource_patch_search_radius = 12,
|
||||
tree_removal_probability = 1,
|
||||
tree_removal_max_distance = 32 * 32,
|
||||
minable = {
|
||||
mining_time = 1,
|
||||
result = "gold-ore",
|
||||
},
|
||||
collision_box = { { -4.4, -4.4 }, { 4.4, 4.4 } },
|
||||
--collision_mask = {"item-layer", "water-tile"},
|
||||
selection_box = { { -3.5, -3.5 }, { 3.5, 3.5 } },
|
||||
autoplace = {
|
||||
probability_expression =
|
||||
"0.03 * control:lignumis_gold:frequency - abs(basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 2000000, input_scale = 1/16, output_scale = 1/3})",
|
||||
richness_expression =
|
||||
"(sqrt(x^2 + y^2) * 1000 + basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 1000000, input_scale = 1/16, output_scale = 1/3} * 1000) * control:lignumis_gold:richness",
|
||||
tile_restriction = { "natural-gold-soil" }
|
||||
},
|
||||
stage_counts = { 0 },
|
||||
stages = {
|
||||
sheet = {
|
||||
filename = Lignumis.graphics .. "entity/gold-patch.png",
|
||||
priority = "extra-high",
|
||||
width = 975,
|
||||
height = 664,
|
||||
scale = 0.5,
|
||||
frame_count = 1,
|
||||
variation_count = 1
|
||||
}
|
||||
},
|
||||
map_color = { r = 1, g = 0.82, b = 0.28 },
|
||||
map_grid = false
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "gold-ore",
|
||||
icon = Lignumis.graphics .. "icons/gold-ore.png",
|
||||
pictures = {
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-ore-1.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-ore-2.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-ore-3.png", scale = 0.5, mipmap_count = 4 },
|
||||
},
|
||||
flags = { "always-show" },
|
||||
subgroup = "raw-resource",
|
||||
order = "f[gold-ore]",
|
||||
inventory_move_sound = item_sounds.resource_inventory_move,
|
||||
pick_sound = item_sounds.resource_inventory_pickup,
|
||||
drop_sound = item_sounds.resource_inventory_move,
|
||||
stack_size = 50,
|
||||
default_import_location = "lignumis",
|
||||
weight = 2 * kg
|
||||
}
|
||||
})
|
||||
301
lignumis-base/prototypes/content/gold/stromatolite.lua
Normal file
301
lignumis-base/prototypes/content/gold/stromatolite.lua
Normal file
|
|
@ -0,0 +1,301 @@
|
|||
local space_age_item_sounds = require("__space-age__.prototypes.item_sounds")
|
||||
|
||||
local stromatolite = table.deepcopy(data.raw["simple-entity"]["copper-stromatolite"])
|
||||
stromatolite.type = "tree"
|
||||
stromatolite.name = "gold-stromatolite"
|
||||
stromatolite.icon = Lignumis.graphics .. "icons/gold-stromatolite.png"
|
||||
stromatolite.autoplace = {
|
||||
probability_expression =
|
||||
"basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 2000000, input_scale = 1/8, output_scale = 1/8}",
|
||||
tile_restriction = { "natural-gold-soil" }
|
||||
}
|
||||
stromatolite.collision_mask = table.deepcopy(data.raw["plant"]["tree-plant"].collision_mask)
|
||||
stromatolite.mining_time = 2
|
||||
stromatolite.minable.results = {
|
||||
{ type = "item", name = "gold-ore", amount_min = 1, amount_max = 7 },
|
||||
{ type = "item", name = "gold-bacteria", amount_min = 3, amount_max = 9 },
|
||||
{ type = "item", name = "gold-stromatolite-seed", amount = 1, probability = 0.2 }
|
||||
}
|
||||
stromatolite.map_color = { 255, 171, 0, 0.5 }
|
||||
stromatolite.pictures = {
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-01.png",
|
||||
width = 209,
|
||||
height = 138,
|
||||
shift = { 0.304688, -0.4 },
|
||||
scale = 0.4,
|
||||
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-02.png",
|
||||
width = 165,
|
||||
height = 129,
|
||||
shift = { 0.0, 0.0390625 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-03.png",
|
||||
width = 151,
|
||||
height = 139,
|
||||
shift = { 0.151562, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-04.png",
|
||||
width = 216,
|
||||
height = 110,
|
||||
shift = { 0.390625, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-05.png",
|
||||
width = 154,
|
||||
height = 147,
|
||||
shift = { 0.328125, 0.0703125 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-06.png",
|
||||
width = 154,
|
||||
height = 132,
|
||||
shift = { 0.16875, -0.1 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-07.png",
|
||||
width = 193,
|
||||
height = 130,
|
||||
shift = { 0.3, -0.2 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-08.png",
|
||||
width = 136,
|
||||
height = 117,
|
||||
shift = { 0.0, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-09.png",
|
||||
width = 157,
|
||||
height = 115,
|
||||
shift = { 0.1, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-10.png",
|
||||
width = 198,
|
||||
height = 153,
|
||||
shift = { 0.325, -0.1 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-11.png",
|
||||
width = 190,
|
||||
height = 115,
|
||||
shift = { 0.453125, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-12.png",
|
||||
width = 229,
|
||||
height = 126,
|
||||
shift = { 0.539062, -0.015625 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-13.png",
|
||||
width = 151,
|
||||
height = 125,
|
||||
shift = { 0.0703125, 0.179688 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-14.png",
|
||||
width = 137,
|
||||
height = 117,
|
||||
shift = { 0.160938, 0.0 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-15.png",
|
||||
width = 201,
|
||||
height = 141,
|
||||
shift = { 0.242188, -0.195312 },
|
||||
scale = 0.4
|
||||
},
|
||||
{
|
||||
filename = Lignumis.graphics .. "entity/gold-stromatolite/gold-stromatolite-16.png",
|
||||
width = 209,
|
||||
height = 154,
|
||||
shift = { 0.351562, -0.1 },
|
||||
scale = 0.4
|
||||
}
|
||||
}
|
||||
|
||||
local plant = table.deepcopy(data.raw["plant"]["tree-plant"])
|
||||
plant.name = "gold-stromatolite-plant"
|
||||
plant.localised_name = { "entity-name.gold-stromatolite-plant" }
|
||||
plant.icon = Lignumis.graphics .. "icons/gold-stromatolite.png"
|
||||
plant.map_color = { 255, 171, 0, 0.5 }
|
||||
plant.agricultural_tower_tint = {
|
||||
primary = { r = 255, g = 171, b = 0, a = 1 },
|
||||
secondary = { r = 40, g = 100, b = 25, a = 1 }, -- #89421dff
|
||||
}
|
||||
plant.minable = {
|
||||
mining_particle = "copper-ore-particle",
|
||||
mining_time = 2,
|
||||
results = {
|
||||
{ type = "item", name = "moist-stromatolite-remnant", amount = 25 },
|
||||
{ type = "item", name = "gold-bacteria", amount = 20 },
|
||||
{ type = "item", name = "gold-stromatolite-seed", amount_min = 1, amount_max = 3 }
|
||||
}
|
||||
}
|
||||
plant.growth_ticks = 20 * minute
|
||||
plant.variations = nil
|
||||
plant.variation_weights = nil
|
||||
plant.collision_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }
|
||||
plant.selection_box = { { -0.7, -0.7 }, { 0.7, 0.7 } }
|
||||
plant.remains_when_mined = nil
|
||||
plant.pictures = table.deepcopy(stromatolite.pictures)
|
||||
plant.autoplace = {
|
||||
probability_expression = "0",
|
||||
tile_restriction = { "natural-gold-soil" }
|
||||
}
|
||||
plant.surface_conditions[1].min = 900
|
||||
|
||||
local seed = {
|
||||
type = "item",
|
||||
name = "gold-stromatolite-seed",
|
||||
localised_name = { "item-name.gold-stromatolite-seed" },
|
||||
icon = Lignumis.graphics .. "icons/gold-stromatolite-seed.png",
|
||||
pictures = {
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-stromatolite-seed-1.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-stromatolite-seed-2.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-stromatolite-seed-3.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-stromatolite-seed-4.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-stromatolite-seed-5.png", scale = 0.5, mipmap_count = 4 }
|
||||
},
|
||||
flags = { "always-show" },
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "a[seeds]-d[gold-stromatolite-seed]",
|
||||
plant_result = "gold-stromatolite-plant",
|
||||
place_result = "gold-stromatolite-plant",
|
||||
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
|
||||
drop_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
stack_size = 10,
|
||||
default_import_location = "lignumis",
|
||||
weight = 10 * kg,
|
||||
fuel_category = "wood",
|
||||
fuel_value = "100kJ"
|
||||
}
|
||||
|
||||
local bacteria = {
|
||||
type = "item",
|
||||
name = "gold-bacteria",
|
||||
icon = Lignumis.graphics .. "icons/gold-bacteria.png",
|
||||
pictures = {
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-bacteria.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-bacteria-1.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-bacteria-2.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/gold-bacteria-3.png", scale = 0.5, mipmap_count = 4 },
|
||||
},
|
||||
flags = { "always-show" },
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "b[agriculture]-e[gold-bacteria]",
|
||||
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
|
||||
drop_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
stack_size = 50,
|
||||
default_import_location = "lignumis",
|
||||
weight = 1 * kg,
|
||||
spoil_ticks = 1 * minute,
|
||||
spoil_result = "gold-ore"
|
||||
}
|
||||
|
||||
local remnant = {
|
||||
type = "item",
|
||||
name = "moist-stromatolite-remnant",
|
||||
icon = Lignumis.graphics .. "icons/moist-stromatolite-remnant-1.png",
|
||||
pictures = {
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/moist-stromatolite-remnant-1.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/moist-stromatolite-remnant-2.png", scale = 0.5, mipmap_count = 4 },
|
||||
{ size = 64, filename = Lignumis.graphics .. "icons/moist-stromatolite-remnant-3.png", scale = 0.5, mipmap_count = 4 }
|
||||
},
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "b[agriculture]-f[moist-stromatolite-remnant]",
|
||||
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
|
||||
drop_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
stack_size = 50,
|
||||
default_import_location = "lignumis",
|
||||
weight = 1 * kg,
|
||||
flags = { "always-show" }
|
||||
}
|
||||
|
||||
local desiccation_recipe = {
|
||||
type = "recipe",
|
||||
name = "moist-stromatolite-remnant-desiccation",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/peat.png" },
|
||||
{ icon = "__base__/graphics/icons/fluid/steam.png", scale = 0.25, shift = { 8, 8 } },
|
||||
{ icon = Lignumis.graphics .. "icons/moist-stromatolite-remnant-1.png", scale = 0.25, shift = { -8, 8 } }
|
||||
},
|
||||
category = "desiccation",
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "b0[desiccation]",
|
||||
energy_required = 16,
|
||||
ingredients = { { type = "item", name = "moist-stromatolite-remnant", amount = 10 } },
|
||||
results = {
|
||||
{ type = "item", name = "peat", amount = 1 },
|
||||
{ type = "fluid", name = "steam", amount = 150, temperature = 165 }
|
||||
},
|
||||
enabled = false
|
||||
}
|
||||
|
||||
local desiccation_recipe_no_steam = {
|
||||
type = "recipe",
|
||||
name = "moist-stromatolite-remnant-desiccation-without-steam",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/peat.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/moist-stromatolite-remnant-1.png", scale = 0.25, shift = { -8, 8 } }
|
||||
},
|
||||
category = "smelting",
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "b1[desiccation]",
|
||||
energy_required = 16,
|
||||
ingredients = { { type = "item", name = "moist-stromatolite-remnant", amount = 10 } },
|
||||
results = { { type = "item", name = "peat", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
|
||||
local seed__to_peat_recipe = {
|
||||
type = "recipe",
|
||||
name = "gold-stromatolite-seed-to-peat",
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/peat.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/gold-stromatolite-seed.png", scale = 0.25, shift = { -8, 8 } }
|
||||
},
|
||||
category = "basic-crafting",
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "b2[gold-stromatolite-seed-to-peat]",
|
||||
energy_required = 3.2,
|
||||
ingredients = { { type = "item", name = "gold-stromatolite-seed", amount = 10 } },
|
||||
results = {
|
||||
{ type = "item", name = "peat", amount = 1 },
|
||||
{ type = "item", name = "gold-ore", amount = 1 }
|
||||
},
|
||||
enabled = true
|
||||
}
|
||||
|
||||
data:extend({
|
||||
stromatolite,
|
||||
plant,
|
||||
seed,
|
||||
bacteria,
|
||||
remnant,
|
||||
desiccation_recipe,
|
||||
desiccation_recipe_no_steam,
|
||||
seed__to_peat_recipe
|
||||
})
|
||||
45
lignumis-base/prototypes/content/gold/tiles.lua
Normal file
45
lignumis-base/prototypes/content/gold/tiles.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
local tile_collision_masks = require("__base__/prototypes/tile/tile-collision-masks")
|
||||
local tile_trigger_effects = require("__base__.prototypes.tile.tile-trigger-effects")
|
||||
local semi_wet_sound = sound_variations("__space-age__/sound/walking/semi-wet-rock", 10, 0.7)
|
||||
local tile_sounds = require("__space-age__/prototypes/tile/tile-sounds")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item-subgroup",
|
||||
name = "lignumis-tiles",
|
||||
group = "tiles",
|
||||
order = "h"
|
||||
},
|
||||
{
|
||||
type = "tile",
|
||||
name = "natural-gold-soil",
|
||||
order = "d[gold]-c[natural-gold-soil]",
|
||||
subgroup = "lignumis-tiles",
|
||||
collision_mask = tile_collision_masks.ground(),
|
||||
layer_group = "ground-natural",
|
||||
layer = 85,
|
||||
searchable = true,
|
||||
transitions = lava_stone_transitions,
|
||||
transitions_between_transitions = data.raw["tile"]["landfill"].transitions_between_transitions,
|
||||
trigger_effect = tile_trigger_effects.landfill_trigger_effect(),
|
||||
sprite_usage_surface = "any",
|
||||
variants = tile_variations_template_with_transitions(
|
||||
Lignumis.graphics .. "terrain/natural-gold-soil.png",
|
||||
{
|
||||
max_size = 4,
|
||||
[1] = { weights = { 0.085, 0.085, 0.085, 0.085, 0.087, 0.085, 0.065, 0.085, 0.045, 0.045, 0.045, 0.045, 0.005, 0.025, 0.045, 0.045 } },
|
||||
[2] = { probability = 1, weights = { 0.018, 0.020, 0.015, 0.025, 0.015, 0.020, 0.025, 0.015, 0.025, 0.025, 0.010, 0.025, 0.020, 0.025, 0.025, 0.010 }, },
|
||||
[4] = { probability = 0.1, weights = { 0.018, 0.020, 0.015, 0.025, 0.015, 0.020, 0.025, 0.015, 0.025, 0.025, 0.010, 0.025, 0.020, 0.025, 0.025, 0.010 }, },
|
||||
}
|
||||
),
|
||||
walking_sound = semi_wet_sound,
|
||||
landing_steps_sound = tile_sounds.landing.semi_wet,
|
||||
build_sound = data.raw["tile"]["landfill"].build_sound,
|
||||
map_color = { 109, 99, 13 },
|
||||
scorch_mark_color = { r = 0.329, g = 0.242 * 2, b = 0.177, a = 1.000 },
|
||||
autoplace = {
|
||||
probability_expression =
|
||||
"multioctave_noise{x = x, y = y, persistence = 1, seed0 = map_seed, seed1 = 2000000, octaves = 3, input_scale = 1/32, output_scale = 0.6 * sqrt(2)} * 20 - 18"
|
||||
},
|
||||
}
|
||||
})
|
||||
7
lignumis-base/prototypes/content/item-subgroups.lua
Normal file
7
lignumis-base/prototypes/content/item-subgroups.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
data:extend({
|
||||
{
|
||||
type = "item-subgroup",
|
||||
name = "lignumis-bioprocessing",
|
||||
group = "bioprocessing"
|
||||
}
|
||||
})
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
local resource_autoplace = require("resource-autoplace")
|
||||
|
||||
resource_autoplace.initialize_patch_set("lignumis_gold", true)
|
||||
resource_autoplace.initialize_patch_set("lignumis_peat", true)
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "autoplace-control",
|
||||
name = "lignumis_gold",
|
||||
localised_name = { "", "[entity=gold-patch] ", { "entity-name.gold-patch" } },
|
||||
richness = true,
|
||||
order = "0-b",
|
||||
category = "resource"
|
||||
},
|
||||
{
|
||||
type = "autoplace-control",
|
||||
name = "lignumis_peat",
|
||||
localised_name = { "", "[entity=peat] ", { "entity-name.peat" } },
|
||||
richness = true,
|
||||
order = "0-c",
|
||||
category = "resource"
|
||||
},
|
||||
{
|
||||
type = "autoplace-control",
|
||||
name = "lignumis_enemy_base",
|
||||
richness = false,
|
||||
order = "0-a",
|
||||
category = "enemy",
|
||||
can_be_disabled = true
|
||||
}
|
||||
})
|
||||
81
lignumis-base/prototypes/content/lignumis/mapgen.lua
Normal file
81
lignumis-base/prototypes/content/lignumis/mapgen.lua
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
return {
|
||||
aux_climate_control = false,
|
||||
moisture_climate_control = true,
|
||||
property_expression_names = { -- Warning: anything set here overrides any selections made in the map setup screen so the options do nothing.
|
||||
--cliff_elevation = "cliff_elevation_nauvis",
|
||||
--cliffiness = "cliffiness_nauvis",
|
||||
--elevation = "elevation_island"
|
||||
},
|
||||
cliff_settings = {
|
||||
name = "cliff",
|
||||
control = "nauvis_cliff",
|
||||
cliff_smoothing = 0
|
||||
},
|
||||
autoplace_controls = {
|
||||
["lignumis_gold"] = { richness = 1, frequency = 1, size = 1 },
|
||||
["lignumis_peat"] = { richness = 1/6, frequency = 8, size = 2 },
|
||||
["stone"] = { richness = 1/6, frequency = 4, size = 4 },
|
||||
["water"] = {},
|
||||
["trees"] = { richness = 3, frequency = 4, size = 3 },
|
||||
["lignumis_enemy_base"] = { frequency = 0.75, size = 0.75 },
|
||||
["rocks"] = {},
|
||||
["starting_area_moisture"] = { size = 1, richness = 6 },
|
||||
["nauvis_cliff"] = { frequency = 2, size = 2 }
|
||||
},
|
||||
autoplace_settings = {
|
||||
["tile"] = {
|
||||
settings = {
|
||||
["grass-1"] = {},
|
||||
["grass-2"] = {},
|
||||
["grass-3"] = {},
|
||||
["grass-4"] = {},
|
||||
["water"] = {},
|
||||
["deepwater"] = {},
|
||||
["natural-gold-soil"] = {}
|
||||
}
|
||||
},
|
||||
["decorative"] = {
|
||||
settings = {
|
||||
["brown-hairy-grass"] = {},
|
||||
["green-hairy-grass"] = {},
|
||||
["brown-carpet-grass"] = {},
|
||||
["green-carpet-grass"] = {},
|
||||
["green-small-grass"] = {},
|
||||
["green-asterisk"] = {},
|
||||
["brown-asterisk-mini"] = {},
|
||||
["green-asterisk-mini"] = {},
|
||||
["brown-asterisk"] = {},
|
||||
["red-asterisk"] = {},
|
||||
["dark-mud-decal"] = {},
|
||||
["light-mud-decal"] = {},
|
||||
["green-pita"] = {},
|
||||
["red-pita"] = {},
|
||||
["green-croton"] = {},
|
||||
["red-croton"] = {},
|
||||
["green-pita-mini"] = {},
|
||||
["brown-fluff"] = {},
|
||||
["brown-fluff-dry"] = {},
|
||||
["garballo-mini-dry"] = {},
|
||||
["garballo"] = {},
|
||||
["green-bush-mini"] = {},
|
||||
["medium-rock"] = {},
|
||||
["small-rock"] = {},
|
||||
["tiny-rock"] = {},
|
||||
["knobbly-roots"] = {},
|
||||
["crater-large"] = {},
|
||||
["crater-small"] = {},
|
||||
["waves-decal"] = {},
|
||||
["gold-rock-cluster"] = {}
|
||||
}
|
||||
},
|
||||
["entity"] = {
|
||||
settings = {
|
||||
["gold-patch"] = {},
|
||||
["stone"] = {},
|
||||
["peat"] = {},
|
||||
["fish"] = {},
|
||||
["gold-stromatolite"] = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
lignumis-base/prototypes/content/lignumis/planet-updates.lua
Normal file
14
lignumis-base/prototypes/content/lignumis/planet-updates.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local target_planet = settings.startup["lignumis-second-planet"].value or "nauvis"
|
||||
if mods["any-planet-start"] then
|
||||
target_planet = settings.startup["aps-planet"].value ~= "none" and settings.startup["aps-planet"].value or target_planet
|
||||
end
|
||||
|
||||
local lignumis = data.raw.planet["lignumis"]
|
||||
|
||||
-- Set final solar power depending on parent planet
|
||||
local solar_power = data.raw.planet[target_planet].surface_properties["solar-power"] or 100
|
||||
local solar_power_in_space = data.raw.planet[target_planet].solar_power_in_space or 300
|
||||
solar_power = solar_power * 1.2
|
||||
solar_power_in_space = solar_power_in_space * 1.2
|
||||
lignumis.solar_power_in_space = solar_power_in_space
|
||||
lignumis.surface_properties["solar-power"] = solar_power
|
||||
170
lignumis-base/prototypes/content/lignumis/planet.lua
Normal file
170
lignumis-base/prototypes/content/lignumis/planet.lua
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
local planet_map_gen = require("mapgen")
|
||||
local effects = require("__core__/lualib/surface-render-parameter-effects")
|
||||
local procession_graphic_catalogue_types = require("__base__/prototypes/planet/procession-graphic-catalogue-types")
|
||||
local asteroid_util = require("__space-age__/prototypes/planet/asteroid-spawn-definitions")
|
||||
|
||||
local target_planet = settings.startup["lignumis-second-planet"].value or "nauvis"
|
||||
if mods["any-planet-start"] then
|
||||
target_planet = settings.startup["aps-planet"].value ~= "none" and settings.startup["aps-planet"].value or target_planet
|
||||
end
|
||||
|
||||
local lignumis_chunks = 0.025
|
||||
local lignumis_ratio = {1, 1, 1 , 0}
|
||||
local nauvis_lignumis = {
|
||||
probability_on_range_chunk = {
|
||||
{ position = 0.1, probability = asteroid_util.nauvis_chunks, angle_when_stopped = asteroid_util.chunk_angle },
|
||||
{ position = 0.9, probability = lignumis_chunks, angle_when_stopped = asteroid_util.chunk_angle }
|
||||
},
|
||||
type_ratios = {
|
||||
{ position = 0.1, ratios = asteroid_util.nauvis_ratio },
|
||||
{ position = 0.9, ratios = lignumis_ratio },
|
||||
}
|
||||
}
|
||||
|
||||
PlanetsLib:extend({
|
||||
{
|
||||
type = "planet",
|
||||
name = "lignumis",
|
||||
orbit = {
|
||||
parent = {
|
||||
type = "planet",
|
||||
name = target_planet
|
||||
},
|
||||
distance = 2,
|
||||
orientation = 0.16,
|
||||
sprite = {
|
||||
type = "sprite",
|
||||
filename = Lignumis.graphics .. "orbit-lignumis.png",
|
||||
size = 131
|
||||
},
|
||||
},
|
||||
magnitude = 0.35,
|
||||
subgroup = "satellites",
|
||||
icon = Lignumis.graphics .. "icons/lignumis.png",
|
||||
starmap_icon = Lignumis.graphics .. "icons/starmap-planet-lignumis.png",
|
||||
starmap_icon_size = 2048,
|
||||
gravity_pull = 4,
|
||||
order = "a[nauvis]-a[lignumis]",
|
||||
map_seed_offset = 100,
|
||||
map_gen_settings = planet_map_gen,
|
||||
pollutant_type = "noise",
|
||||
solar_power_in_space = 300,
|
||||
draw_orbit = false,
|
||||
planet_procession_set = {
|
||||
arrival = { "default-b" },
|
||||
departure = { "default-rocket-a" }
|
||||
},
|
||||
surface_properties = {
|
||||
["day-night-cycle"] = 2 * minute,
|
||||
["gravity"] = 4,
|
||||
["pressure"] = 900,
|
||||
["solar-power"] = 100
|
||||
},
|
||||
asteroid_spawn_influence = 1,
|
||||
asteroid_spawn_definitions = asteroid_util.spawn_definitions(nauvis_lignumis, 0.9),
|
||||
surface_render_parameters = {
|
||||
clouds = effects.default_clouds_effect_properties()
|
||||
},
|
||||
persistent_ambient_sounds = {
|
||||
base_ambience = { filename = Lignumis.sound .. "ambient/forest-ambience.ogg", volume = 0.1 },
|
||||
wind = { filename = "__base__/sound/wind/wind.ogg", volume = 0.8 },
|
||||
crossfade = {
|
||||
order = { "wind", "base_ambience" },
|
||||
curve_type = "cosine",
|
||||
from = { control = 0.35, volume_percentage = 0.0 },
|
||||
to = { control = 2, volume_percentage = 100.0 }
|
||||
}
|
||||
},
|
||||
procession_graphic_catalogue = {
|
||||
{
|
||||
index = procession_graphic_catalogue_types.planet_hatch_emission_in_1,
|
||||
sprite = util.sprite_load(
|
||||
"__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-A",
|
||||
{
|
||||
priority = "medium",
|
||||
draw_as_glow = true,
|
||||
blend_mode = "additive",
|
||||
scale = 0.5,
|
||||
shift = util.by_pixel(-16, 96) --32 x ({0.5, -3.5} + {0, 0.5})
|
||||
})
|
||||
},
|
||||
{
|
||||
index = procession_graphic_catalogue_types.planet_hatch_emission_in_2,
|
||||
sprite = util.sprite_load(
|
||||
"__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-B",
|
||||
{
|
||||
priority = "medium",
|
||||
draw_as_glow = true,
|
||||
blend_mode = "additive",
|
||||
scale = 0.5,
|
||||
shift = util.by_pixel(-64, 96) --32 x ({2, -3.5} + {0, 0.5})
|
||||
})
|
||||
},
|
||||
{
|
||||
index = procession_graphic_catalogue_types.planet_hatch_emission_in_3,
|
||||
sprite = util.sprite_load(
|
||||
"__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-C",
|
||||
{
|
||||
priority = "medium",
|
||||
draw_as_glow = true,
|
||||
blend_mode = "additive",
|
||||
scale = 0.5,
|
||||
shift = util.by_pixel(-40, 64) --32 x ({1.25, -2.5} + {0, 0.5})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "space-connection",
|
||||
name = target_planet .. "-lignumis",
|
||||
subgroup = "planet-connections",
|
||||
from = target_planet,
|
||||
to = "lignumis",
|
||||
order = "0",
|
||||
length = 2000,
|
||||
asteroid_spawn_definitions = asteroid_util.spawn_definitions(nauvis_lignumis)
|
||||
},
|
||||
{
|
||||
type = "ambient-sound",
|
||||
name = "lignumis-1",
|
||||
track_type = "main-track",
|
||||
planet = "lignumis",
|
||||
sound = Lignumis.sound .. "music/lignumis-1.ogg",
|
||||
weight = 10
|
||||
},
|
||||
{
|
||||
type = "ambient-sound",
|
||||
name = "lignumis-2",
|
||||
track_type = "main-track",
|
||||
planet = "lignumis",
|
||||
sound = Lignumis.sound .. "music/lignumis-2.ogg",
|
||||
weight = 10
|
||||
},
|
||||
{
|
||||
type = "ambient-sound",
|
||||
name = "lignumis-3",
|
||||
track_type = "main-track",
|
||||
planet = "lignumis",
|
||||
sound = Lignumis.sound .. "music/lignumis-3.ogg",
|
||||
weight = 7
|
||||
},
|
||||
{
|
||||
type = "ambient-sound",
|
||||
name = "lignumis-4",
|
||||
track_type = "main-track",
|
||||
planet = "lignumis",
|
||||
sound = Lignumis.sound .. "music/lignumis-4.ogg",
|
||||
weight = 8
|
||||
},
|
||||
{
|
||||
type = "ambient-sound",
|
||||
name = "lignumis-5",
|
||||
track_type = "main-track",
|
||||
planet = "lignumis",
|
||||
sound = Lignumis.sound .. "music/lignumis-5.ogg",
|
||||
weight = 4
|
||||
}
|
||||
})
|
||||
82
lignumis-base/prototypes/content/lumber-mill.lua
Normal file
82
lignumis-base/prototypes/content/lumber-mill.lua
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
local Technology = require("__cf-lib__/data/Technology")
|
||||
local LumberMillFactory = require(MF.buildings .. "LumberMill")
|
||||
local LumberMill = LumberMillFactory()
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = "wood-processing-or-assembling"
|
||||
}
|
||||
})
|
||||
|
||||
table.insert(data.raw["character"]["character"].crafting_categories, "wood-processing-or-assembling")
|
||||
|
||||
local has_oxygen = data.raw["surface-property"]["oxygen"] ~= nil
|
||||
|
||||
LumberMill.EntityBuilder:new()
|
||||
:burnerEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||
:baseProductivity(0.5)
|
||||
:apply({
|
||||
crafting_categories = { "wood-processing-or-assembling" },
|
||||
crafting_speed = 2,
|
||||
energy_usage = "1000kW",
|
||||
surface_conditions = {
|
||||
{
|
||||
property = has_oxygen and "oxygen" or "pressure",
|
||||
min = 3
|
||||
},
|
||||
{
|
||||
property = "gravity",
|
||||
min = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
local lumber_mill_item = LumberMill.ItemBuilder:new()
|
||||
:apply({
|
||||
default_import_location = "lignumis",
|
||||
order = "2[lumber-mill]"
|
||||
})
|
||||
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients(table.trim({
|
||||
{ type = "item", name = "stone-brick", amount = 40 },
|
||||
{ type = "item", name = "lumber", amount = 50 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 50 },
|
||||
{ type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil,
|
||||
{ type = "item", name = "burner-assembling-machine", amount = 2 }
|
||||
}))
|
||||
:apply({
|
||||
category = "wood-processing-or-assembling"
|
||||
})
|
||||
|
||||
LumberMill.TechnologyBuilder:new()
|
||||
:prerequisites({ "steam-science-pack" })
|
||||
:count(250)
|
||||
:time(15)
|
||||
:ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } })
|
||||
:apply()
|
||||
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients({
|
||||
{ type = "item", name = "stone-brick", amount = 40 },
|
||||
{ type = "item", name = "lumber", amount = 50 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 50 },
|
||||
{ type = "item", name = "copper-plate", amount = basic_circuit_board and 20 or 40 },
|
||||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 20 },
|
||||
{ type = "item", name = "assembling-machine-1", amount = 2 }
|
||||
})
|
||||
:apply({
|
||||
name = "lumber-mill-copper",
|
||||
localised_name = { "entity-name.lumber-mill" },
|
||||
category = "wood-processing-or-assembling",
|
||||
icons = {
|
||||
{ icon = lumber_mill_item.icon },
|
||||
{ icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper")
|
||||
33
lignumis-base/prototypes/content/lumber.lua
Normal file
33
lignumis-base/prototypes/content/lumber.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "lumber",
|
||||
icon = Lignumis.graphics .. "icons/lumber.png",
|
||||
pictures = {
|
||||
{ filename = Lignumis.graphics .. "icons/lumber.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/lumber-1.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/lumber-2.png", size = 64, scale = 0.5 },
|
||||
},
|
||||
subgroup = "intermediate-product",
|
||||
order = "A[basic-intermediates]-c[lumber]",
|
||||
inventory_move_sound = item_sounds.wood_inventory_move,
|
||||
pick_sound = item_sounds.wood_inventory_pickup,
|
||||
drop_sound = item_sounds.wood_inventory_move,
|
||||
stack_size = 100,
|
||||
random_tint_color = { 1.0, 0.95, 0.9, 1.0 },
|
||||
fuel_category = "wood",
|
||||
fuel_value = "4MJ"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "lumber",
|
||||
category = "wood-processing-or-assembling",
|
||||
allow_productivity = true,
|
||||
allow_as_intermediate = true,
|
||||
ingredients = { { type = "item", name = "wood", amount = 2 } },
|
||||
results = { { type = "item", name = "lumber", amount = 1 } },
|
||||
energy_required = 1
|
||||
}
|
||||
})
|
||||
286
lignumis-base/prototypes/content/mid-game-recipes.lua
Normal file
286
lignumis-base/prototypes/content/mid-game-recipes.lua
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
local space_age_item_sounds = require("__space-age__.prototypes.item_sounds")
|
||||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "cupriavidus-necator-starter",
|
||||
category = "organic-or-chemistry",
|
||||
energy_required = 12.8,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "peat", amount = 10 },
|
||||
{ type = "item", name = "gold-stromatolite-seed", amount = 1 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 100 },
|
||||
{ type = "fluid", name = "water", amount = 100 }
|
||||
},
|
||||
results = { { type = "item", name = "cupriavidus-necator", amount_min = 4, amount_max = 10, probability = 0.15 } },
|
||||
result_is_always_fresh = true,
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/cupriavidus-necator-1.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/peat.png", scale = 0.25, shift = { 8, 8 } },
|
||||
{ icon = Lignumis.graphics .. "icons/wood-pulp.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 1.000, g = 1.000, b = 1.000, a = 1.000 }, -- #fefeffff
|
||||
secondary = { r = 0.771, g = 0.771, b = 0.771, a = 1.000 }, -- #c4c4c4ff
|
||||
tertiary = { r = 0.768, g = 0.665, b = 0.762, a = 1.000 }, -- #c3a9c2ff
|
||||
quaternary = { r = 0.000, g = 0.000, b = 0.000, a = 1.000 }, -- #000000ff
|
||||
},
|
||||
enabled = false,
|
||||
allow_quality = false,
|
||||
preserve_products_in_machine_output = true,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-b[cupriavidus-necator-starter]",
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "cupriavidus-necator",
|
||||
category = "organic-or-chemistry",
|
||||
energy_required = 12.8,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "fluid", name = "wood-pulp", amount = 40 },
|
||||
{ type = "fluid", name = "water", amount = 100 },
|
||||
{ type = "item", name = "cupriavidus-necator", amount = 10 },
|
||||
},
|
||||
results = {
|
||||
{ type = "item", name = "cupriavidus-necator", amount_min = 10, amount_max = 80, ignored_by_productivity = 1 }
|
||||
},
|
||||
result_is_always_fresh = true,
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 1.000, g = 1.000, b = 1.000, a = 1.000 }, -- #fefeffff
|
||||
secondary = { r = 0.771, g = 0.771, b = 0.771, a = 1.000 }, -- #c4c4c4ff
|
||||
tertiary = { r = 0.768, g = 0.665, b = 0.762, a = 1.000 }, -- #c3a9c2ff
|
||||
quaternary = { r = 0.000, g = 0.000, b = 0.000, a = 1.000 }, -- #000000ff
|
||||
},
|
||||
enabled = false,
|
||||
allow_productivity = true,
|
||||
preserve_products_in_machine_output = true,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "cupriavidus-necator",
|
||||
icon = Lignumis.graphics .. "icons/cupriavidus-necator-1.png",
|
||||
pictures = {
|
||||
{ filename = Lignumis.graphics .. "icons/cupriavidus-necator-1.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/cupriavidus-necator-2.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/cupriavidus-necator-3.png", size = 64, scale = 0.5 },
|
||||
},
|
||||
stack_size = 1000,
|
||||
spoil_result = "dead-cupriavidus-necator",
|
||||
spoil_ticks = 2 * 60 * 60,
|
||||
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
|
||||
drop_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-c1[cupriavidus-necator]",
|
||||
default_import_location = "lignumis",
|
||||
weight = 1 * kg
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "dead-cupriavidus-necator",
|
||||
icon = Lignumis.graphics .. "icons/dead-cupriavidus-necator-1.png",
|
||||
pictures = {
|
||||
{ filename = Lignumis.graphics .. "icons/dead-cupriavidus-necator-1.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/dead-cupriavidus-necator-2.png", size = 64, scale = 0.5 },
|
||||
{ filename = Lignumis.graphics .. "icons/dead-cupriavidus-necator-3.png", size = 64, scale = 0.5 },
|
||||
},
|
||||
stack_size = 1000,
|
||||
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
|
||||
drop_sound = space_age_item_sounds.agriculture_inventory_move,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-c2[dead-cupriavidus-necator]",
|
||||
default_import_location = "lignumis",
|
||||
weight = 1 * kg
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "plastic-from-cupriavidus-necator",
|
||||
category = "organic-or-chemistry",
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/plastic-bar.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/cupriavidus-necator-1.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
energy_required = 12.8,
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
ingredients = { { type = "item", name = "cupriavidus-necator", amount = 100 } },
|
||||
results = {
|
||||
{ type = "item", name = "plastic-bar", amount_min = 1, amount_max = 20 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 10, ignore_productivity = 10 }
|
||||
},
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 1.000, g = 1.000, b = 1.000, a = 1.000 }, -- #fefeffff
|
||||
secondary = { r = 0.771, g = 0.771, b = 0.771, a = 1.000 }, -- #c4c4c4ff
|
||||
tertiary = { r = 0.768, g = 0.665, b = 0.762, a = 1.000 }, -- #c3a9c2ff
|
||||
quaternary = { r = 0.000, g = 0.000, b = 0.000, a = 1.000 }, -- #000000ff
|
||||
},
|
||||
enabled = false,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-d1[plastic]",
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "plastic-from-dead-cupriavidus-necator",
|
||||
category = "organic-or-chemistry",
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/plastic-bar.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/dead-cupriavidus-necator-1.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
energy_required = 12.8,
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
ingredients = { { type = "item", name = "dead-cupriavidus-necator", amount = 100 } },
|
||||
results = {
|
||||
{ type = "item", name = "plastic-bar", amount_min = 1, amount_max = 14 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 7, ignore_productivity = 7 }
|
||||
},
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 1.000, g = 1.000, b = 1.000, a = 1.000 }, -- #fefeffff
|
||||
secondary = { r = 0.771, g = 0.771, b = 0.771, a = 1.000 }, -- #c4c4c4ff
|
||||
tertiary = { r = 0.768, g = 0.665, b = 0.762, a = 1.000 }, -- #c3a9c2ff
|
||||
quaternary = { r = 0.000, g = 0.000, b = 0.000, a = 1.000 }, -- #000000ff
|
||||
},
|
||||
enabled = false,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-d2[plastic]",
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "low-density-structure-gold",
|
||||
category = "crafting",
|
||||
energy_required = 15,
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 20 },
|
||||
{ type = "item", name = "plastic-bar", amount = 7 },
|
||||
{ type = "item", name = "lumber", amount = 4 }
|
||||
},
|
||||
results = { { type = "item", name = "low-density-structure", amount = 2 } },
|
||||
allow_productivity = true,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/low-density-structure.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/gold-plate.png", scale = 0.25, shift = { 8, 8 } }
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "nutrients-from-wood-pulp",
|
||||
category = "organic-or-chemistry",
|
||||
energy_required = 1,
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
ingredients = { { type = "fluid", name = "wood-pulp", amount = 10 } },
|
||||
results = { { type = "item", name = "nutrients", amount = 5 } },
|
||||
allow_productivity = true,
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
icons = {
|
||||
{ icon = "__space-age__/graphics/icons/nutrients.png" },
|
||||
{ icon = "__base__/graphics/icons/wood.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
order = "0[lignumis]-a[nutrients]",
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "rocket-fuel-from-wood-pulp-and-peat",
|
||||
energy_required = 15,
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
category = "crafting-with-fluid",
|
||||
ingredients =
|
||||
{
|
||||
{ type = "item", name = "peat", amount = 9 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 45 }
|
||||
},
|
||||
results = { { type = "item", name = "rocket-fuel", amount = 1 } },
|
||||
crafting_machine_tint =
|
||||
{
|
||||
primary = { r = 1.0, g = 0.7, b = 0.0, a = 1.000 },
|
||||
secondary = { r = 1.0, g = 0.7, b = 0.0, a = 1.000 },
|
||||
},
|
||||
allow_productivity = true,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/rocket-fuel.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/peat.png", scale = 0.25, shift = { 8, 8 } },
|
||||
{ icon = Lignumis.graphics .. "icons/wood-pulp.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
subgroup = "lignumis-bioprocessing",
|
||||
order = "0[lignumis]-e[rocket-fuel]",
|
||||
}
|
||||
})
|
||||
|
||||
if settings.startup["lignumis-basic-circuit-board"].value then
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "processing-unit-gold",
|
||||
category = "crafting-with-steam",
|
||||
additional_categories = { "electromagnetics" },
|
||||
enabled = false,
|
||||
auto_recycle = false,
|
||||
energy_required = 10,
|
||||
ingredients =
|
||||
{
|
||||
{ type = "item", name = "basic-circuit-board", amount = 20 },
|
||||
{ type = "item", name = "gold-cable", amount = 8 },
|
||||
{ type = "item", name = "plastic-bar", amount = 3 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 5 }
|
||||
},
|
||||
results = { { type = "item", name = "processing-unit", amount = 1 } },
|
||||
allow_productivity = true,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/processing-unit.png" },
|
||||
{ icon = Lignumis.graphics .. "icons/gold-cable.png", scale = 0.25, shift = { 8, 8 } }
|
||||
}
|
||||
}
|
||||
})
|
||||
Technology:new("processing-unit"):addRecipe("processing-unit-gold")
|
||||
end
|
||||
|
||||
local plastics = Technology:new("plastics")
|
||||
plastics:addRecipe("cupriavidus-necator-starter")
|
||||
plastics:addRecipe("cupriavidus-necator")
|
||||
plastics:addRecipe("plastic-from-cupriavidus-necator")
|
||||
plastics:addRecipe("plastic-from-dead-cupriavidus-necator")
|
||||
|
||||
local lds = Technology:new("low-density-structure")
|
||||
lds:addRecipe("low-density-structure-gold")
|
||||
|
||||
local rocket_fuel = Technology:new("rocket-fuel")
|
||||
rocket_fuel:addRecipe("rocket-fuel-from-wood-pulp-and-peat")
|
||||
|
||||
local agriculture = Technology:new("agriculture")
|
||||
agriculture:addRecipe("nutrients-from-wood-pulp")
|
||||
|
||||
local plastic_productivity = Technology:new("plastic-bar-productivity")
|
||||
plastic_productivity:addEffect({
|
||||
type = "change-recipe-productivity",
|
||||
recipe = "plastic-from-cupriavidus-necator",
|
||||
change = 0.1
|
||||
})
|
||||
plastic_productivity:addEffect({
|
||||
type = "change-recipe-productivity",
|
||||
recipe = "plastic-from-dead-cupriavidus-necator",
|
||||
change = 0.1
|
||||
})
|
||||
|
||||
local lds_productivity = Technology:new("low-density-structure-productivity")
|
||||
lds_productivity:addEffect({
|
||||
type = "change-recipe-productivity",
|
||||
recipe = "low-density-structure-gold",
|
||||
change = 0.1
|
||||
})
|
||||
|
||||
local rocket_fuel_productivity = Technology:new("rocket-fuel-productivity")
|
||||
rocket_fuel_productivity:addEffect({
|
||||
type = "change-recipe-productivity",
|
||||
recipe = "rocket-fuel-from-wood-pulp-and-peat",
|
||||
change = 0.1
|
||||
})
|
||||
117
lignumis-base/prototypes/content/noise.lua
Normal file
117
lignumis-base/prototypes/content/noise.lua
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
-- Entities added by Lignumis define noise emissions/absorption in their own file.
|
||||
|
||||
local function emit(type, name, amount)
|
||||
local entity = data.raw[type][name]
|
||||
entity.energy_source = entity.energy_source or {}
|
||||
entity.energy_source.emissions_per_minute = entity.energy_source.emissions_per_minute or {}
|
||||
entity.energy_source.emissions_per_minute.noise = amount
|
||||
end
|
||||
|
||||
local function emit_constant(type, name, amount)
|
||||
local entity = data.raw[type][name]
|
||||
entity.emissions_per_second = entity.emissions_per_second or {}
|
||||
entity.emissions_per_second.noise = amount / 60
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "airborne-pollutant",
|
||||
name = "noise",
|
||||
chart_color = { r = 183, g = 0, b = 225, a = 149 },
|
||||
icon = {
|
||||
filename = Lignumis.graphics .. "noise-map-icon.png",
|
||||
priority = "high",
|
||||
size = 64,
|
||||
flags = { "gui-icon" }
|
||||
},
|
||||
affects_evolution = true,
|
||||
affects_water_tint = false,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Nauvis enemies use noise
|
||||
|
||||
data.raw["unit-spawner"]["spitter-spawner"].absorptions_per_second.noise = { absolute = 200, proportional = 0.01 }
|
||||
data.raw["unit-spawner"]["biter-spawner"].absorptions_per_second.noise = { absolute = 200, proportional = 0.01 }
|
||||
data.raw["unit"]["small-biter"].absorptions_to_join_attack.noise = 1
|
||||
data.raw["unit"]["medium-biter"].absorptions_to_join_attack.noise = 5
|
||||
data.raw["unit"]["big-biter"].absorptions_to_join_attack.noise = 20
|
||||
data.raw["unit"]["behemoth-biter"].absorptions_to_join_attack.noise = 100
|
||||
data.raw["unit"]["small-spitter"].absorptions_to_join_attack.noise = 1
|
||||
data.raw["unit"]["medium-spitter"].absorptions_to_join_attack.noise = 3
|
||||
data.raw["unit"]["big-spitter"].absorptions_to_join_attack.noise = 8
|
||||
data.raw["unit"]["behemoth-spitter"].absorptions_to_join_attack.noise = 50
|
||||
|
||||
|
||||
-- All trees absorb noise
|
||||
|
||||
for _, tree in pairs(data.raw.tree) do
|
||||
emit_constant("tree", tree.name, -6)
|
||||
end
|
||||
emit_constant("plant", "tree-plant", -6)
|
||||
|
||||
|
||||
-- Tiles absorb noise
|
||||
|
||||
local tiles = {"grass-1", "grass-2", "grass-3", "grass-4", "water", "deepwater", "natural-gold-soil"}
|
||||
for _, tile in pairs(tiles) do
|
||||
if not data.raw.tile[tile].absorptions_per_second then
|
||||
data.raw.tile[tile].absorptions_per_second = {}
|
||||
end
|
||||
data.raw.tile[tile].absorptions_per_second.noise = 0.001
|
||||
end
|
||||
|
||||
|
||||
-- Walls absorb noise
|
||||
|
||||
emit_constant("wall", "wooden-wall", -25)
|
||||
emit_constant("wall", "stone-wall", -40)
|
||||
emit_constant("gate", "gate", -30)
|
||||
|
||||
|
||||
-- Buildings emit noise
|
||||
|
||||
emit("furnace", "stone-furnace", 10)
|
||||
emit("furnace", "electric-furnace", 10)
|
||||
emit("mining-drill", "burner-mining-drill", 50)
|
||||
emit("mining-drill", "electric-mining-drill", 100)
|
||||
emit("mining-drill", "big-mining-drill", 200)
|
||||
--emit("mining-drill", "deep-miner", 2000)
|
||||
--emit("agricultural-tower", "burner-agricultural-tower", 75)
|
||||
emit("agricultural-tower", "agricultural-tower", 75)
|
||||
--emit("assembling-machine", "burner-assembling-machine", 50)
|
||||
--emit("assembling-machine", "steam-assembling-machine", 50)
|
||||
emit("assembling-machine", "assembling-machine-1", 10)
|
||||
emit("assembling-machine", "assembling-machine-2", 15)
|
||||
emit("assembling-machine", "assembling-machine-3", 20)
|
||||
emit("assembling-machine", "chemical-plant", 10)
|
||||
emit("boiler", "boiler", 5)
|
||||
emit("generator", "steam-engine", 10)
|
||||
emit("boiler", "heat-exchanger", 1)
|
||||
emit("generator", "steam-turbine", 20)
|
||||
--emit("rocket-silo", "provisional-rocket-silo", 10000)
|
||||
--emit_constant("rocket-silo", "provisional-rocket-silo", 1000)
|
||||
emit("rocket-silo", "rocket-silo", 10000)
|
||||
emit_constant("rocket-silo", "rocket-silo", 1000)
|
||||
--emit("lab", "wood-lab", 10)
|
||||
emit("lab", "lab", 5)
|
||||
emit("lab", "biolab", 20)
|
||||
emit("locomotive", "locomotive", 200)
|
||||
emit_constant("locomotive", "locomotive", 10)
|
||||
|
||||
--emit_constant("transport-belt", "wood-transport-belt", 2)
|
||||
emit_constant("transport-belt", "transport-belt", 3)
|
||||
emit_constant("transport-belt", "fast-transport-belt", 4)
|
||||
emit_constant("transport-belt", "express-transport-belt", 6)
|
||||
emit_constant("transport-belt", "turbo-transport-belt", 8)
|
||||
--emit_constant("underground-belt", "wood-underground-belt", 7.5)
|
||||
emit_constant("underground-belt", "underground-belt", 10)
|
||||
emit_constant("underground-belt", "fast-underground-belt", 20)
|
||||
emit_constant("underground-belt", "express-underground-belt", 30)
|
||||
emit_constant("underground-belt", "turbo-underground-belt", 40)
|
||||
--emit_constant("splitter", "wood-splitter", 20)
|
||||
emit_constant("splitter", "splitter", 30)
|
||||
emit_constant("splitter", "fast-splitter", 40)
|
||||
emit_constant("splitter", "express-splitter", 50)
|
||||
emit_constant("splitter", "turbo-splitter", 60)
|
||||
89
lignumis-base/prototypes/content/peat.lua
Normal file
89
lignumis-base/prototypes/content/peat.lua
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
local sounds = require("__base__.prototypes.entity.sounds")
|
||||
local resource_autoplace = require("resource-autoplace")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
|
||||
local grass_driving_sound = {
|
||||
sound = {
|
||||
filename = "__base__/sound/driving/vehicle-surface-grass.ogg", volume = 0.5,
|
||||
advanced_volume_control = { fades = { fade_in = { curve_type = "cosine", from = { control = 0.5, volume_percentage = 0.0 }, to = { 1.5, 100.0 } } } }
|
||||
},
|
||||
fade_ticks = 6
|
||||
}
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "resource",
|
||||
name = "peat",
|
||||
icon = Lignumis.graphics .. "icons/peat.png",
|
||||
flags = { "placeable-neutral" },
|
||||
order = "a-b-b",
|
||||
tree_removal_probability = 0.1,
|
||||
tree_removal_max_distance = 32 * 32,
|
||||
minable = {
|
||||
count = 2,
|
||||
mining_particle = "wooden-particle",
|
||||
mining_time = 1,
|
||||
results = {
|
||||
{
|
||||
type = "item",
|
||||
name = "peat",
|
||||
amount = 2
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "wood",
|
||||
amount_min = 1,
|
||||
amount_max = 8,
|
||||
probability = 0.1
|
||||
}
|
||||
}
|
||||
},
|
||||
walking_sound = sounds.plant,
|
||||
driving_sound = grass_driving_sound,
|
||||
collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
|
||||
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
autoplace = resource_autoplace.resource_autoplace_settings {
|
||||
name = "lignumis_peat",
|
||||
order = "b",
|
||||
base_density = 8,
|
||||
base_spots_per_km2 = 5,
|
||||
has_starting_area_placement = true,
|
||||
regular_rq_factor_multiplier = 1,
|
||||
starting_rq_factor_multiplier = 1,
|
||||
candidate_spot_count = 21
|
||||
},
|
||||
stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 },
|
||||
stages = {
|
||||
sheet = {
|
||||
filename = "__base__/graphics/entity/iron-ore/iron-ore.png",
|
||||
priority = "extra-high",
|
||||
size = 128,
|
||||
frame_count = 8,
|
||||
variation_count = 8,
|
||||
scale = 0.5,
|
||||
tint = { b = 0.24, g = 0.50, r = 0.79 }
|
||||
}
|
||||
},
|
||||
map_color = { 0.4, 0.2470, 0.1176 },
|
||||
mining_visualisation_tint = { b = 0.24, g = 0.50, r = 0.79 },
|
||||
factoriopedia_simulation = {
|
||||
init = " game.simulation.camera_position = {0, -0.5}\n\n game.surfaces[1].create_entity{name = \"peat\", position = {-2.5, -2.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-1.5, -2.5}, amount = 100}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, -2.5}, amount = 500}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, -2.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {0.5, -2.5}, amount = 200}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, -2.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-4.5, -0.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-3.5, -1.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-3.5, -0.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {-2.5, -1.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {-2.5, -0.5}, amount = 650}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, -0.5}, amount = 1000}\n game.surfaces[1].create_entity{name = \"peat\", position = {-1.5, -0.5}, amount = 850}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, -1.5}, amount = 800}\n game.surfaces[1].create_entity{name = \"peat\", position = {-1.5, -1.5}, amount = 650}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, -1.5}, amount = 450}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, -0.5}, amount = 1000}\n game.surfaces[1].create_entity{name = \"peat\", position = {0.5, -0.5}, amount = 1050}\n game.surfaces[1].create_entity{name = \"peat\", position = {0.5, -1.5}, amount = 850}\n game.surfaces[1].create_entity{name = \"peat\", position = {3.5, -1.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {3.5, -0.5}, amount = 250}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, -1.5}, amount = 250}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, -0.5}, amount = 500}\n game.surfaces[1].create_entity{name = \"peat\", position = {4.5, -0.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-2.5, 1.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-3.5, 0.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-2.5, 0.5}, amount = 200}\n game.surfaces[1].create_entity{name = \"peat\", position = {-1.5, 1.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, 1.5}, amount = 550}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, 0.5}, amount = 850}\n game.surfaces[1].create_entity{name = \"peat\", position = {-1.5, 0.5}, amount = 700}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, 1.5}, amount = 250}\n game.surfaces[1].create_entity{name = \"peat\", position = {0.5, 1.5}, amount = 300}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, 0.5}, amount = 550}\n game.surfaces[1].create_entity{name = \"peat\", position = {0.5, 0.5}, amount = 1000}\n game.surfaces[1].create_entity{name = \"peat\", position = {3.5, 1.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, 1.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {3.5, 0.5}, amount = 150}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, 0.5}, amount = 300}\n game.surfaces[1].create_entity{name = \"peat\", position = {4.5, 0.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {-0.5, 2.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {1.5, 2.5}, amount = 50}\n game.surfaces[1].create_entity{name = \"peat\", position = {2.5, 2.5}, amount = 50}\n "
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "peat",
|
||||
icon = Lignumis.graphics .. "icons/peat.png",
|
||||
subgroup = "raw-resource",
|
||||
order = "a[peat]",
|
||||
inventory_move_sound = item_sounds.landfill_inventory_move,
|
||||
pick_sound = item_sounds.landfill_inventory_pickup,
|
||||
drop_sound = item_sounds.landfill_inventory_move,
|
||||
stack_size = 100,
|
||||
weight = 2 * kg,
|
||||
random_tint_color = item_tints.iron_rust,
|
||||
fuel_category = "chemical",
|
||||
fuel_value = "8MJ",
|
||||
}
|
||||
})
|
||||
217
lignumis-base/prototypes/content/quality-assembler.lua
Normal file
217
lignumis-base/prototypes/content/quality-assembler.lua
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local QualityAssemblerFactory = require(MF.buildings .. "GravityAssembler")
|
||||
local QualityAssembler = QualityAssemblerFactory("quality-assembler")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "burner-usage",
|
||||
name = "quality-catalyst",
|
||||
empty_slot_sprite = {
|
||||
filename = Lignumis.graphics .. "empty-quality-catalyst-slot.png",
|
||||
priority = "extra-high-no-scale",
|
||||
size = 64,
|
||||
flags = { "gui-icon" },
|
||||
},
|
||||
empty_slot_caption = { "gui.quality-catalyst" },
|
||||
empty_slot_description = { "gui.quality-catalyst-description" },
|
||||
icon = {
|
||||
filename = Lignumis.graphics .. "quality-catalyst-icon-red.png",
|
||||
priority = "extra-high-no-scale",
|
||||
width = 64,
|
||||
height = 64,
|
||||
flags = { "icon" }
|
||||
},
|
||||
no_fuel_status = { "entity-status.no-quality-catalyst" },
|
||||
accepted_fuel_key = "description.accepted-catalysts",
|
||||
burned_in_key = "used-in", -- factoriopedia
|
||||
},
|
||||
{
|
||||
type = "fuel-category",
|
||||
name = "quality-catalyst",
|
||||
fuel_value_type = { "description.quality-catalyst-energy-value" }
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "gold-quality-catalyst",
|
||||
icon = Lignumis.graphics .. "icons/quality-gold-catalyst.png",
|
||||
subgroup = "raw-material",
|
||||
color_hint = { text = "C" },
|
||||
order = "a[smelting]-0[gold-plate]",
|
||||
inventory_move_sound = item_sounds.metal_small_inventory_move,
|
||||
pick_sound = item_sounds.metal_small_inventory_pickup,
|
||||
drop_sound = item_sounds.metal_small_inventory_move,
|
||||
stack_size = 50,
|
||||
fuel_category = "quality-catalyst",
|
||||
fuel_value = "2MJ",
|
||||
weight = 1000 / 50 * kg,
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "gold-quality-catalyst",
|
||||
category = "electromagnetics",
|
||||
energy_required = 60,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 10 },
|
||||
{ type = "item", name = "tungsten-carbide", amount = 2 },
|
||||
{ type = "item", name = "supercapacitor", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "gold-quality-catalyst", amount = 1 } },
|
||||
allow_productivity = true,
|
||||
allow_quality = false,
|
||||
enabled = false
|
||||
}
|
||||
})
|
||||
|
||||
QualityAssembler.EntityBuilder:new()
|
||||
:allowProductivity(false)
|
||||
:burnerEnergySource({
|
||||
burner_usage = "quality-catalyst",
|
||||
fuel_categories = { "quality-catalyst" },
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { noise = 100, pollution = 6 }
|
||||
})
|
||||
:pipes()
|
||||
:apply({
|
||||
energy_usage = "1MW",
|
||||
crafting_speed = 4,
|
||||
module_slots = 6,
|
||||
allowed_effects = { "consumption", "pollution", "quality" },
|
||||
effect_receiver = { base_effect = { quality = 3.5 } }
|
||||
})
|
||||
|
||||
QualityAssembler.ItemBuilder:new():apply()
|
||||
|
||||
QualityAssembler.RecipeBuilder:new()
|
||||
:ingredients({
|
||||
{ type = "item", name = "gold-plate", amount = 60 },
|
||||
{ type = "item", name = "tungsten-plate", amount = 40 },
|
||||
{ type = "item", name = "superconductor", amount = 50 },
|
||||
{ type = "item", name = "carbon-fiber", amount = 100 },
|
||||
{ type = "item", name = "quantum-processor", amount = 10 }
|
||||
})
|
||||
:apply({
|
||||
category = "electromagnetics-or-quality-assembling",
|
||||
})
|
||||
|
||||
QualityAssembler.TechnologyBuilder:new()
|
||||
:prerequisites({ "legendary-quality", "quantum-processor" })
|
||||
:count(5000)
|
||||
:ingredients({
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 },
|
||||
{ "automation-science-pack", 1 },
|
||||
{ "logistic-science-pack", 1 },
|
||||
{ "chemical-science-pack", 1 },
|
||||
{ "space-science-pack", 1 },
|
||||
{ "production-science-pack", 1 },
|
||||
{ "utility-science-pack", 1 },
|
||||
{ "metallurgic-science-pack", 1 },
|
||||
{ "agricultural-science-pack", 1 },
|
||||
{ "electromagnetic-science-pack", 1 },
|
||||
{ "cryogenic-science-pack", 1 }
|
||||
})
|
||||
:time(60)
|
||||
:additionalRecipes({ "gold-quality-catalyst" })
|
||||
:apply()
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = "experienced-quality-assembling-1",
|
||||
icons = {
|
||||
{ icon = "__quality__/graphics/technology/legendary-quality.png", icon_size = 256 },
|
||||
{ icon = Lignumis.graphics .. "icons/quality-gold-catalyst.png", icon_size = 64, scale = 1, shift = { 50, 50 }, draw_background = true }
|
||||
},
|
||||
level = 1,
|
||||
max_level = 1,
|
||||
show_levels_info = true,
|
||||
effects = {
|
||||
{ type = "change-recipe-productivity", recipe = "gold-quality-catalyst", change = 0.25 }
|
||||
},
|
||||
research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 1000 },
|
||||
prerequisites = { "quality-assembler" }
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "experienced-quality-assembling-2",
|
||||
icons = {
|
||||
{ icon = "__quality__/graphics/technology/legendary-quality.png", icon_size = 256 },
|
||||
{ icon = Lignumis.graphics .. "icons/quality-gold-catalyst.png", icon_size = 64, scale = 1, shift = { 50, 50 }, draw_background = true }
|
||||
},
|
||||
level = 2,
|
||||
max_level = 2,
|
||||
show_levels_info = true,
|
||||
effects = {
|
||||
{ type = "change-recipe-productivity", recipe = "gold-quality-catalyst", change = 0.5 }
|
||||
},
|
||||
research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 10000 },
|
||||
prerequisites = { "experienced-quality-assembling-1" }
|
||||
}
|
||||
})
|
||||
|
||||
local function convert_category(name)
|
||||
local quality_name = name .. "-or-quality-assembling"
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = quality_name
|
||||
}
|
||||
})
|
||||
|
||||
for _, assembler in pairs(data.raw["assembling-machine"]) do
|
||||
if assembler.crafting_categories and table.contains(assembler.crafting_categories, name) then
|
||||
table.insert(assembler.crafting_categories, quality_name)
|
||||
end
|
||||
end
|
||||
for _, character in pairs(data.raw["character"]) do
|
||||
if character.crafting_categories and table.contains(character.crafting_categories, name) then
|
||||
table.insert(character.crafting_categories, quality_name)
|
||||
end
|
||||
end
|
||||
table.insert(data.raw["assembling-machine"]["quality-assembler"].crafting_categories, quality_name)
|
||||
end
|
||||
|
||||
convert_category("wood-processing-or-assembling")
|
||||
convert_category("metallurgy-or-assembling")
|
||||
convert_category("metallurgy")
|
||||
convert_category("electronics")
|
||||
convert_category("electronics-or-assembling")
|
||||
convert_category("electromagnetics")
|
||||
convert_category("organic-or-assembling")
|
||||
convert_category("crafting")
|
||||
convert_category("cryogenics-or-assembling")
|
||||
|
||||
-- Lignumis
|
||||
data.raw.recipe["lumber-mill"].category = "wood-processing-or-assembling-or-quality-assembling"
|
||||
|
||||
-- Nauvis
|
||||
data.raw.recipe["logistic-robot"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["construction-robot"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["roboport"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["speed-module-3"].category = "electronics-or-quality-assembling"
|
||||
data.raw.recipe["productivity-module-3"].category = "electronics-or-quality-assembling"
|
||||
data.raw.recipe["efficiency-module-3"].category = "electronics-or-quality-assembling"
|
||||
data.raw.recipe["rocket-silo"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["cargo-bay"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["asteroid-collector"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["thruster"].category = "crafting-or-quality-assembling"
|
||||
|
||||
-- Vulcanus
|
||||
data.raw.recipe["foundry"].category = "metallurgy-or-assembling-or-quality-assembling"
|
||||
data.raw.recipe["big-mining-drill"].category = "metallurgy-or-quality-assembling"
|
||||
|
||||
-- Fulgora
|
||||
data.raw.recipe["electromagnetic-plant"].category = "electronics-or-assembling-or-quality-assembling"
|
||||
data.raw.recipe["lightning-collector"].category = "electromagnetics-or-quality-assembling"
|
||||
data.raw.recipe["mech-armor"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["quality-module-3"].category = "electronics-or-quality-assembling"
|
||||
data.raw.recipe["recycler"].category = "crafting-or-quality-assembling"
|
||||
|
||||
-- Gleba
|
||||
data.raw.recipe["biochamber"].category = "organic-or-assembling-or-quality-assembling"
|
||||
data.raw.recipe["stack-inserter"].category = "crafting-or-quality-assembling"
|
||||
data.raw.recipe["spidertron"].category = "crafting-or-quality-assembling"
|
||||
|
||||
-- Aquilo
|
||||
data.raw.recipe["cryogenic-plant"].category = "cryogenics-or-assembling-or-quality-assembling"
|
||||
113
lignumis-base/prototypes/content/steam-assembling-machine.lua
Normal file
113
lignumis-base/prototypes/content/steam-assembling-machine.lua
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local pipecovers = require("prototypes/content/gold/pipecovers")
|
||||
local machinepipes = require("prototypes/content/gold/machinepipes")
|
||||
|
||||
local gfx = Lignumis.graphics .. "entity/steam-assembling-machine/"
|
||||
|
||||
local assembling_machine = table.deepcopy(data.raw["assembling-machine"]["assembling-machine-2"])
|
||||
assembling_machine.name = "steam-assembling-machine"
|
||||
assembling_machine.icons = { { icon = Lignumis.graphics .. "icons/steam-assembling-machine.png", icon_size = 64 } }
|
||||
assembling_machine.minable.result = "steam-assembling-machine"
|
||||
assembling_machine.next_upgrade = "assembling-machine-1"
|
||||
assembling_machine.module_slots = 2
|
||||
assembling_machine.corpses = "steam-assembling-machine-remnants"
|
||||
assembling_machine.resistances = nil
|
||||
assembling_machine.graphics_set = table.deepcopy(data.raw["assembling-machine"]["assembling-machine-1"].graphics_set)
|
||||
assembling_machine.graphics_set.animation.layers[1].filename =
|
||||
gfx .. "steam-assembling-machine.png"
|
||||
assembling_machine.crafting_categories = {
|
||||
"basic-crafting",
|
||||
"crafting",
|
||||
"electronics",
|
||||
"pressing",
|
||||
"wood-processing-or-assembling",
|
||||
"organic-or-assembling",
|
||||
"electronics-or-assembling",
|
||||
"metallurgy-or-assembling",
|
||||
"crafting-with-steam"
|
||||
}
|
||||
assembling_machine.crafting_speed = 0.5
|
||||
assembling_machine.energy_usage = "25kW"
|
||||
assembling_machine.energy_source = {
|
||||
type = "fluid",
|
||||
maximum_temperature = 165,
|
||||
scale_fluid_usage = true,
|
||||
effectivity = 1,
|
||||
emissions_per_minute = { noise = 50 },
|
||||
fluid_box = {
|
||||
filter = "steam",
|
||||
production_type = "input",
|
||||
pipe_picture = machinepipes(),
|
||||
pipe_covers = pipecovers(),
|
||||
volume = 50,
|
||||
pipe_connections = {
|
||||
{ flow_direction = "input-output", direction = defines.direction.west, position = { -1, 0 } },
|
||||
{ flow_direction = "input-output", direction = defines.direction.east, position = { 1, 0 } }
|
||||
},
|
||||
secondary_draw_orders = { north = -1 }
|
||||
}
|
||||
}
|
||||
assembling_machine.fluid_boxes[1].pipe_picture = machinepipes()
|
||||
assembling_machine.fluid_boxes[1].pipe_covers = pipecovers()
|
||||
assembling_machine.fluid_boxes[2].pipe_picture = machinepipes()
|
||||
assembling_machine.fluid_boxes[2].pipe_covers = pipecovers()
|
||||
|
||||
local remnants = table.deepcopy(data.raw["corpse"]["assembling-machine-1-remnants"])
|
||||
remnants.name = "steam-assembling-machine-remnants"
|
||||
remnants.icon = Lignumis.graphics .. "icons/steam-assembling-machine.png"
|
||||
remnants.animation[1].filename = gfx .. "steam-assembling-machine-remnants.png"
|
||||
remnants.animation[2].filename = gfx .. "steam-assembling-machine-remnants.png"
|
||||
remnants.animation[3].filename = gfx .. "steam-assembling-machine-remnants.png"
|
||||
remnants.order = "1[steam-assembling-machine]"
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
name = "crafting-with-steam"
|
||||
},
|
||||
assembling_machine,
|
||||
remnants,
|
||||
{
|
||||
type = "item",
|
||||
name = "steam-assembling-machine",
|
||||
icon = Lignumis.graphics .. "icons/steam-assembling-machine.png",
|
||||
subgroup = "production-machine",
|
||||
order = "1[steam-assembling-machine]",
|
||||
inventory_move_sound = item_sounds.mechanical_inventory_move,
|
||||
pick_sound = item_sounds.mechanical_inventory_pickup,
|
||||
drop_sound = item_sounds.mechanical_inventory_move,
|
||||
place_result = "steam-assembling-machine",
|
||||
stack_size = 50,
|
||||
weight = 20 * kg
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "steam-assembling-machine",
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{ type = "item", name = "burner-assembling-machine", amount = 1 },
|
||||
{ type = "item", name = "gold-pipe", amount = 5 }
|
||||
},
|
||||
results = { { type = "item", name = "steam-assembling-machine", amount = 1 } },
|
||||
energy_required = 8
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "steam-automation",
|
||||
icon = Lignumis.graphics .. "technology/steam-automation.png",
|
||||
icon_size = 256,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "steam-assembling-machine"
|
||||
}
|
||||
},
|
||||
prerequisites = { "gold-fluid-handling" },
|
||||
unit = {
|
||||
count = 20,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 15
|
||||
},
|
||||
ignore_tech_cost_multiplier = false
|
||||
}
|
||||
})
|
||||
126
lignumis-base/prototypes/content/steam-science.lua
Normal file
126
lignumis-base/prototypes/content/steam-science.lua
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
local spoil = settings.startup["lignumis-sciences-spoil"].value
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "tool",
|
||||
name = "steam-science-pack",
|
||||
localised_description = { "item-description.science-pack" },
|
||||
icon = Lignumis.graphics .. "icons/steam-science-pack.png",
|
||||
subgroup = "science-pack",
|
||||
color_hint = { text = "A" },
|
||||
order = "1[steam-science-pack]",
|
||||
inventory_move_sound = item_sounds.science_inventory_move,
|
||||
pick_sound = item_sounds.science_inventory_pickup,
|
||||
drop_sound = item_sounds.science_inventory_move,
|
||||
stack_size = 200,
|
||||
weight = 1 * kg,
|
||||
durability = 1,
|
||||
durability_description_key = "description.science-pack-remaining-amount-key",
|
||||
factoriopedia_durability_description_key = "description.factoriopedia-science-pack-remaining-amount-key",
|
||||
durability_description_value = "description.science-pack-remaining-amount-value",
|
||||
random_tint_color = item_tints.iron_rust,
|
||||
default_import_location = "lignumis",
|
||||
spoil_result = spoil and "steam-science-pack-spoiled" or nil,
|
||||
spoil_ticks = spoil and 3600 * 5 or nil
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "steam-science-pack",
|
||||
category = "crafting-with-steam",
|
||||
enabled = false,
|
||||
energy_required = 20,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 2 }
|
||||
},
|
||||
results = { { type = "item", name = "steam-science-pack", amount = 2 } },
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
secondary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
},
|
||||
allow_productivity = true,
|
||||
surface_conditions = settings.startup["lignumis-restrict-sciences"].value and { { property = "pollutant-type", min = 3, max = 3 } } or nil
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "steam-science-pack-steam",
|
||||
localised_name = { "item-name.steam-science-pack" },
|
||||
category = "crafting-with-fluid",
|
||||
enabled = false,
|
||||
energy_required = 20,
|
||||
ingredients = {
|
||||
{ type = "item", name = "gold-plate", amount = 2 },
|
||||
{ type = "fluid", name = "steam", amount = 20 }
|
||||
},
|
||||
results = { { type = "item", name = "steam-science-pack", amount = 2 } },
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
secondary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
},
|
||||
allow_productivity = true,
|
||||
surface_conditions = settings.startup["lignumis-restrict-sciences"].value and { { property = "pollutant-type", min = 3, max = 3 } } or nil
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "steam-science-pack",
|
||||
icon = Lignumis.graphics .. "technology/steam-science-pack.png",
|
||||
icon_size = 256,
|
||||
essential = true,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "steam-science-pack"
|
||||
}
|
||||
},
|
||||
prerequisites = { "steam-automation" },
|
||||
unit = {
|
||||
count = 20,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 15
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if spoil then
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "steam-science-pack-spoiled",
|
||||
icon = Lignumis.graphics .. "icons/steam-science-pack-spoiled.png",
|
||||
subgroup = "science-pack",
|
||||
color_hint = { text = "A" },
|
||||
order = "2[steam-science-pack]",
|
||||
inventory_move_sound = item_sounds.science_inventory_move,
|
||||
pick_sound = item_sounds.science_inventory_pickup,
|
||||
drop_sound = item_sounds.science_inventory_move,
|
||||
stack_size = 200,
|
||||
weight = 1 * kg,
|
||||
random_tint_color = item_tints.iron_rust,
|
||||
default_import_location = "lignumis"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "refresh-steam-science-pack",
|
||||
category = "smelting",
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients = {
|
||||
{ type = "item", name = "steam-science-pack-spoiled", amount = 1 }
|
||||
},
|
||||
results = { { type = "item", name = "steam-science-pack", amount = 1 } },
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
secondary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
},
|
||||
allow_productivity = false,
|
||||
auto_recycle = false
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new("steam-science-pack"):addRecipe("refresh-steam-science-pack")
|
||||
end
|
||||
|
||||
Technology:new("automation-2"):addRecipe("steam-science-pack-steam")
|
||||
164
lignumis-base/prototypes/content/technology.lua
Normal file
164
lignumis-base/prototypes/content/technology.lua
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = "planet-discovery-lignumis",
|
||||
icons = PlanetsLib.technology_icons_moon(Lignumis.graphics .. "technology/lignumis.png", 256),
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-space-location",
|
||||
space_location = "lignumis",
|
||||
use_icon_overlay_constant = true
|
||||
}
|
||||
},
|
||||
prerequisites = { "automation-science-pack" },
|
||||
unit = {
|
||||
count = 10,
|
||||
ingredients = {
|
||||
{ "automation-science-pack", 1 },
|
||||
},
|
||||
time = 10
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "gold-fluid-handling",
|
||||
icon = Lignumis.graphics .. "technology/gold-fluid-handling.png",
|
||||
icon_size = 256,
|
||||
prerequisites = { "burner-automation" },
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "gold-pipe"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "gold-pipe-to-ground"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "gold-storage-tank"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "desiccation-furnace"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "moist-stromatolite-remnant-desiccation"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "moist-stromatolite-remnant-desiccation-without-steam"
|
||||
}
|
||||
},
|
||||
unit = {
|
||||
count = 20,
|
||||
ingredients = { { "wood-science-pack", 1 } },
|
||||
time = 15
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "provisional-rocketry",
|
||||
icon = Lignumis.graphics .. "technology/provisional-rocketry.png",
|
||||
icon_size = 256,
|
||||
essential = true,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "provisional-rocket-silo"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "provisional-rocket-part"
|
||||
}
|
||||
},
|
||||
prerequisites = { "wood-liquefaction" },
|
||||
unit = {
|
||||
count = 500,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
},
|
||||
time = 15
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = "planet-discovery-nauvis",
|
||||
icons = util.technology_icon_constant_planet(Lignumis.graphics .. "technology/nauvis.png"),
|
||||
icon_size = 256,
|
||||
essential = true,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-space-location",
|
||||
space_location = "nauvis",
|
||||
use_icon_overlay_constant = true
|
||||
},
|
||||
{
|
||||
type = "unlock-space-platforms",
|
||||
modifier = true,
|
||||
hidden = true
|
||||
}
|
||||
},
|
||||
prerequisites = { "provisional-rocketry" },
|
||||
unit = {
|
||||
count = 100,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
},
|
||||
time = 30
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "iron-processing",
|
||||
icon = "__base__/graphics/icons/iron-plate.png",
|
||||
icon_size = 64,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "iron-plate"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "iron-chest"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "iron-gear-wheel"
|
||||
}
|
||||
},
|
||||
prerequisites = { "planet-discovery-nauvis" },
|
||||
research_trigger = {
|
||||
type = "mine-entity",
|
||||
entity = "iron-ore"
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "copper-processing",
|
||||
icon = "__base__/graphics/icons/copper-plate.png",
|
||||
icon_size = 64,
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "copper-plate"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "copper-cable"
|
||||
}
|
||||
},
|
||||
prerequisites = { "planet-discovery-nauvis" },
|
||||
research_trigger = {
|
||||
type = "mine-entity",
|
||||
entity = "copper-ore"
|
||||
}
|
||||
}
|
||||
})
|
||||
2
lignumis-base/prototypes/content/updates.lua
Normal file
2
lignumis-base/prototypes/content/updates.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require("fuel-category-updates")
|
||||
require("lignumis/planet-updates")
|
||||
159
lignumis-base/prototypes/content/wood-lab.lua
Normal file
159
lignumis-base/prototypes/content/wood-lab.lua
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local gfx = Lignumis.graphics .. "entity/wood-lab/"
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "lab",
|
||||
name = "wood-lab",
|
||||
icon = Lignumis.graphics .. "icons/wood-lab.png",
|
||||
flags = { "placeable-player", "player-creation" },
|
||||
minable = { mining_time = 0.2, result = "wood-lab" },
|
||||
fast_replaceable_group = "lab",
|
||||
next_upgrade = "lab",
|
||||
max_health = 150,
|
||||
corpse = "lab-remnants",
|
||||
dying_explosion = "lab-explosion",
|
||||
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } },
|
||||
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
|
||||
damaged_trigger_effect = table.deepcopy(data.raw.lab["lab"].damaged_trigger_effect),
|
||||
on_animation = {
|
||||
layers = {
|
||||
{
|
||||
filename = gfx .. "wood-lab.png",
|
||||
width = 194,
|
||||
height = 174,
|
||||
frame_count = 33,
|
||||
line_length = 11,
|
||||
animation_speed = 1 / 3,
|
||||
shift = util.by_pixel(0, 1.5),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/lab/lab-integration.png",
|
||||
width = 242,
|
||||
height = 162,
|
||||
line_length = 1,
|
||||
repeat_count = 33,
|
||||
animation_speed = 1 / 3,
|
||||
shift = util.by_pixel(0, 15.5),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = gfx .. "wood-lab-light.png",
|
||||
blend_mode = "additive",
|
||||
draw_as_light = true,
|
||||
width = 216,
|
||||
height = 194,
|
||||
frame_count = 33,
|
||||
line_length = 11,
|
||||
animation_speed = 1 / 3,
|
||||
shift = util.by_pixel(0, 0),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/lab/lab-shadow.png",
|
||||
width = 242,
|
||||
height = 136,
|
||||
line_length = 1,
|
||||
repeat_count = 33,
|
||||
animation_speed = 1 / 3,
|
||||
shift = util.by_pixel(13, 11),
|
||||
scale = 0.5,
|
||||
draw_as_shadow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
off_animation = {
|
||||
layers = {
|
||||
{
|
||||
filename = gfx .. "wood-lab.png",
|
||||
width = 194,
|
||||
height = 174,
|
||||
shift = util.by_pixel(0, 1.5),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/lab/lab-integration.png",
|
||||
width = 242,
|
||||
height = 162,
|
||||
shift = util.by_pixel(0, 15.5),
|
||||
scale = 0.5
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/lab/lab-shadow.png",
|
||||
width = 242,
|
||||
height = 136,
|
||||
shift = util.by_pixel(13, 11),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
working_sound = {
|
||||
sound = { filename = "__base__/sound/lab.ogg", volume = 0.7, modifiers = { volume_multiplier("main-menu", 2.2), volume_multiplier("tips-and-tricks", 0.8) } },
|
||||
audible_distance_modifier = 0.7,
|
||||
fade_in_ticks = 4,
|
||||
fade_out_ticks = 20
|
||||
},
|
||||
impact_category = "wood",
|
||||
open_sound = { filename = "__base__/sound/open-close/lab-open.ogg", volume = 0.6 },
|
||||
close_sound = { filename = "__base__/sound/open-close/lab-close.ogg", volume = 0.6 },
|
||||
energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { pollution = 12, noise = 10 },
|
||||
light_flicker = { color = { 0, 0, 0 } },
|
||||
smoke = {
|
||||
{
|
||||
name = "smoke",
|
||||
deviation = { 0.1, 0.1 },
|
||||
frequency = 3
|
||||
}
|
||||
}
|
||||
},
|
||||
energy_usage = "150kW",
|
||||
researching_speed = 0.5,
|
||||
-- Applied again in final-fixes
|
||||
inputs = {
|
||||
"wood-science-pack",
|
||||
"steam-science-pack",
|
||||
"automation-science-pack",
|
||||
"logistic-science-pack"
|
||||
},
|
||||
icons_positioning = {
|
||||
{ inventory_index = defines.inventory.lab_modules, shift = { 0, 0.9 } },
|
||||
{ inventory_index = defines.inventory.lab_input, shift = { 0, 0 }, max_icons_per_row = 4, separation_multiplier = 1 / 1.1 }
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "wood-lab",
|
||||
icon = Lignumis.graphics .. "icons/wood-lab.png",
|
||||
subgroup = "production-machine",
|
||||
order = "y0[lab]",
|
||||
inventory_move_sound = item_sounds.lab_inventory_move,
|
||||
pick_sound = item_sounds.lab_inventory_pickup,
|
||||
drop_sound = item_sounds.lab_inventory_move,
|
||||
place_result = "wood-lab",
|
||||
stack_size = 10
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-lab",
|
||||
category = "wood-processing-or-assembling",
|
||||
energy_required = 2,
|
||||
ingredients = {
|
||||
{ type = "item", name = "lumber", amount = 6 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 4 },
|
||||
{ type = "item", name = "stone-brick", amount = 10 },
|
||||
{ type = "item", name = "gold-plate", amount = basic_circuit_board and 10 or 20 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 10 } or nil
|
||||
},
|
||||
results = { { type = "item", name = "wood-lab", amount = 1 } },
|
||||
enabled = false
|
||||
}
|
||||
})
|
||||
103
lignumis-base/prototypes/content/wood-liquefaction.lua
Normal file
103
lignumis-base/prototypes/content/wood-liquefaction.lua
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
local Technology = require("__cf-lib__/data/Technology")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "fluid",
|
||||
name = "wood-pulp",
|
||||
default_temperature = 150,
|
||||
fuel_value = "250kJ",
|
||||
base_color = { r = 0.57, g = 0.392, b = 0.114 },
|
||||
flow_color = { r = 0.57, g = 0.392, b = 0.114 },
|
||||
icon = Lignumis.graphics .. "icons/wood-pulp.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
subgroup = "fluid",
|
||||
order = "w[wood]"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-liquefaction",
|
||||
category = "crafting-with-steam",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/wood-pulp.png" },
|
||||
{ icon = "__base__/graphics/icons/wood.png", scale = 0.25, shift = { 8, 8 } },
|
||||
},
|
||||
subgroup = "fluid-recipes",
|
||||
order = "a[oil-processing]-d[wood-liquefaction]",
|
||||
enabled = false,
|
||||
energy_required = 3,
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
secondary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
tertiary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
quaternary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 }
|
||||
},
|
||||
ingredients = {
|
||||
{ type = "item", name = "wood", amount = 1 }
|
||||
},
|
||||
results = {
|
||||
{ type = "fluid", name = "wood-pulp", amount = 10 }
|
||||
},
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-liquefaction-steam",
|
||||
localised_name = { "recipe-name.wood-liquefaction" },
|
||||
category = "crafting-with-fluid",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
icons = {
|
||||
{ icon = Lignumis.graphics .. "icons/wood-pulp.png" },
|
||||
{ icon = "__base__/graphics/icons/wood.png", scale = 0.25, shift = { 8, 8 } },
|
||||
},
|
||||
subgroup = "fluid-recipes",
|
||||
order = "a[oil-processing]-d[wood-liquefaction]",
|
||||
enabled = false,
|
||||
energy_required = 3,
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
secondary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
tertiary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 },
|
||||
quaternary = { r = 0.57, g = 0.392, b = 0.114, a = 1.000 }
|
||||
},
|
||||
ingredients = {
|
||||
{ type = "item", name = "wood", amount = 1 },
|
||||
{ type = "fluid", name = "steam", amount = 10 }
|
||||
},
|
||||
results = {
|
||||
{ type = "fluid", name = "wood-pulp", amount = 15 }
|
||||
},
|
||||
allow_productivity = true
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "wood-liquefaction",
|
||||
icon_size = 256,
|
||||
icon_mipmaps = 4,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/technology/oil-processing.png", icon_size = 256 },
|
||||
{ icon = Lignumis.graphics .. "icons/wood-pulp.png", icon_size = 64, scale = 1 }
|
||||
},
|
||||
effects = {
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "wood-liquefaction"
|
||||
}
|
||||
},
|
||||
prerequisites = { "steam-science-pack" },
|
||||
unit = {
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
},
|
||||
time = 15,
|
||||
count = 50
|
||||
},
|
||||
order = "w"
|
||||
}
|
||||
})
|
||||
|
||||
Technology:new("automation-2"):addRecipe("wood-liquefaction-steam")
|
||||
104
lignumis-base/prototypes/content/wood-logistics.lua
Normal file
104
lignumis-base/prototypes/content/wood-logistics.lua
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
local BeltFactory = require(MF.logistics .. "Belts")
|
||||
local Belt = BeltFactory("wood", "brown", "slow")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
|
||||
Belt.EntityBuilder:new()
|
||||
:itemsPerSecond(7.5)
|
||||
:nextTier("")
|
||||
:undergroundDistance(4)
|
||||
:animationSpeedMultiplier(1.01)
|
||||
:apply({
|
||||
transportBelt = {
|
||||
emissions_per_second = { noise = 2 / 60 }
|
||||
},
|
||||
undergroundBelt = {
|
||||
emissions_per_second = { noise = 7.5 / 60 },
|
||||
factoriopedia_simulation = {
|
||||
init =
|
||||
[[
|
||||
game.simulation.camera_position = {0, 0.5}
|
||||
game.simulation.camera_zoom = 1.8
|
||||
game.surfaces[1].create_entities_from_blueprint_string
|
||||
{
|
||||
string = "0eNqVUNsKgzAM/Zc81+FEBfsrYwwvQQKaltpuivjvS3Wwh8HGnkKSc0tWaIaA1hF70CtMXNvEm6R31MV+Bl0oWECfNwXUGp5AXwRGPddDBHA9Imh4GNMlgTt0vTNSkwYHD5EjsznSrwqQPXnCQ2JvlhuHsUEnAPVdSoE1k7ANv2KlpyOYVLHpyGF7bHMFfrFRidiGGOLDLPvXLP9tZoLf3eRO8jjK5P1YBXd0004oyqzKq6ooqzLNinLbnvlmf6E=",
|
||||
position = {-0.5, 0}
|
||||
}
|
||||
]]
|
||||
}
|
||||
},
|
||||
splitter = {
|
||||
emissions_per_second = { noise = 20 / 60 }
|
||||
}
|
||||
})
|
||||
|
||||
local splitter_item = Belt.ItemBuilder:new()
|
||||
:itemsPerRocket("transportBelt", 200)
|
||||
:itemsPerRocket("undergroundBelt", 100)
|
||||
:itemsPerRocket("splitter", 100)
|
||||
:order("0")
|
||||
:apply()
|
||||
.splitter
|
||||
|
||||
Belt.RecipeBuilder:new()
|
||||
:beltAmount(2)
|
||||
:ingredients("transportBelt", {
|
||||
{ type = "item", name = "lumber", amount = 1 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 1 }
|
||||
})
|
||||
:ingredients("undergroundBelt", {
|
||||
{ type = "item", name = "lumber", amount = 1 },
|
||||
{ type = "item", name = "wood-transport-belt", amount = 4 },
|
||||
})
|
||||
:ingredients("splitter", {
|
||||
{ type = "item", name = "wood-transport-belt", amount = 2 },
|
||||
{ type = "item", name = "lumber", amount = 2 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or
|
||||
{ type = "item", name = "gold-cable", amount = 10 }
|
||||
})
|
||||
:apply({
|
||||
transportBelt = {
|
||||
category = "wood-processing-or-assembling"
|
||||
},
|
||||
undergroundBelt = {
|
||||
category = "wood-processing-or-assembling"
|
||||
},
|
||||
splitter = {
|
||||
category = "wood-processing-or-assembling"
|
||||
}
|
||||
})
|
||||
|
||||
Belt.TechnologyBuilder:new()
|
||||
:prerequisites({ "wood-science-pack" })
|
||||
:ingredients({ { "wood-science-pack", 1 } })
|
||||
:count(10)
|
||||
:time(10)
|
||||
:apply()
|
||||
|
||||
if not basic_circuit_board then
|
||||
data:extend({
|
||||
Belt.RecipeBuilder:new()
|
||||
:ingredients("splitter", {
|
||||
{ type = "item", name = "wood-transport-belt", amount = 2 },
|
||||
{ type = "item", name = "lumber", amount = 2 },
|
||||
{ type = "item", name = "electronic-circuit", amount = 2 }
|
||||
})
|
||||
:build({
|
||||
splitter = {
|
||||
name = "wood-splitter-electronic-circuit",
|
||||
localised_name = { "entity-name.wood-splitter" },
|
||||
icons = {
|
||||
{ icon = splitter_item.icon },
|
||||
{ icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
|
||||
},
|
||||
category = "wood-processing-or-assembling"
|
||||
}
|
||||
})
|
||||
.splitter
|
||||
})
|
||||
|
||||
table.insert(data.raw.technology["electronics"].effects, {
|
||||
type = "unlock-recipe",
|
||||
recipe = "wood-splitter-electronic-circuit"
|
||||
})
|
||||
end
|
||||
150
lignumis-base/prototypes/content/wood-military.lua
Normal file
150
lignumis-base/prototypes/content/wood-military.lua
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
-- Wooden military mod replaces the content here
|
||||
if mods["wood-military"] then
|
||||
return
|
||||
end
|
||||
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
local simulations = require("__base__.prototypes.factoriopedia-simulations")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "explosion",
|
||||
name = "explosion-hit-splinters",
|
||||
localised_name = { "entity-name.explosion-hit" },
|
||||
flags = { "not-on-map" },
|
||||
subgroup = "explosions",
|
||||
animations = util.empty_sprite(),
|
||||
smoke = "smoke-fast",
|
||||
smoke_count = 1,
|
||||
smoke_slow_down_factor = 1,
|
||||
created_effect = {
|
||||
type = "direct",
|
||||
action_delivery = {
|
||||
type = "instant",
|
||||
target_effects = {
|
||||
type = "create-particle",
|
||||
repeat_count = 2,
|
||||
particle_name = "wooden-chest-wooden-splinter-particle-small",
|
||||
offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||
initial_height = 0.5,
|
||||
initial_height_deviation = 0.04,
|
||||
initial_vertical_speed = 0.069,
|
||||
initial_vertical_speed_deviation = 0.025,
|
||||
speed_from_center = 0.01,
|
||||
speed_from_center_deviation = 0.023
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "ammo",
|
||||
name = "wood-darts-magazine",
|
||||
icon = Lignumis.graphics .. "icons/wood-darts-magazine.png",
|
||||
ammo_category = "bullet",
|
||||
ammo_type = {
|
||||
cooldown_modifier = 1 / 0.75,
|
||||
action = {
|
||||
type = "direct",
|
||||
action_delivery = {
|
||||
type = "instant",
|
||||
source_effects = {
|
||||
{
|
||||
type = "create-explosion",
|
||||
entity_name = "explosion-gunshot"
|
||||
}
|
||||
},
|
||||
target_effects = {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "explosion-hit-splinters",
|
||||
offsets = { { 0, 0.5 } },
|
||||
offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 3, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
magazine_size = 10,
|
||||
reload_time = 15,
|
||||
subgroup = "ammo",
|
||||
order = "a[basic-clips]-0[wood-darts-magazine]",
|
||||
inventory_move_sound = item_sounds.wood_inventory_move,
|
||||
pick_sound = item_sounds.wood_inventory_pickup,
|
||||
drop_sound = item_sounds.wood_inventory_move,
|
||||
stack_size = 100,
|
||||
weight = 5 * kg,
|
||||
default_import_location = "lignumis"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-darts-magazine",
|
||||
category = "wood-processing-or-assembling",
|
||||
energy_required = 1,
|
||||
ingredients = { { type = "item", name = "wood", amount = 2 } },
|
||||
results = { { type = "item", name = "wood-darts-magazine", amount = 1 } }
|
||||
},
|
||||
{
|
||||
type = "armor",
|
||||
name = "wood-armor",
|
||||
icon = Lignumis.graphics .. "icons/wood-armor.png",
|
||||
resistances = {
|
||||
{
|
||||
type = "physical",
|
||||
decrease = 2,
|
||||
percent = 10
|
||||
},
|
||||
{
|
||||
type = "acid",
|
||||
decrease = 0,
|
||||
percent = 10
|
||||
},
|
||||
{
|
||||
type = "explosion",
|
||||
decrease = 1,
|
||||
percent = 10
|
||||
},
|
||||
{
|
||||
type = "fire",
|
||||
decrease = 0,
|
||||
percent = -90
|
||||
}
|
||||
},
|
||||
subgroup = "armor",
|
||||
order = "0[light-armor]",
|
||||
factoriopedia_simulation = simulations.factoriopedia_light_armor,
|
||||
inventory_move_sound = item_sounds.armor_small_inventory_move,
|
||||
pick_sound = item_sounds.armor_small_inventory_pickup,
|
||||
drop_sound = item_sounds.armor_small_inventory_move,
|
||||
stack_size = 1,
|
||||
infinite = true,
|
||||
equipment_grid = "tiny-equipment-grid"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-armor",
|
||||
energy_required = 4,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wood", amount = 20 },
|
||||
{ type = "item", name = "gold-plate", amount = 4 }
|
||||
},
|
||||
results = { { type = "item", name = "wood-armor", amount = 1 } }
|
||||
},
|
||||
})
|
||||
|
||||
if settings.startup["lignumis-ammo-progression"].value then
|
||||
table.insert(
|
||||
data.raw.recipe["firearm-magazine"].ingredients,
|
||||
{ type = "item", name = "wood-darts-magazine", amount = 1 }
|
||||
)
|
||||
end
|
||||
|
||||
data.raw.recipe["firearm-magazine"].enabled = false
|
||||
data.raw.recipe["light-armor"].enabled = false
|
||||
table.assign(data.raw.technology["military"].effects, {
|
||||
{ type = "unlock-recipe", recipe = "firearm-magazine" },
|
||||
{ type = "unlock-recipe", recipe = "light-armor" }
|
||||
})
|
||||
70
lignumis-base/prototypes/content/wood-science.lua
Normal file
70
lignumis-base/prototypes/content/wood-science.lua
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
local spoil = settings.startup["lignumis-sciences-spoil"].value
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "tool",
|
||||
name = "wood-science-pack",
|
||||
localised_description = { "item-description.science-pack" },
|
||||
icon = Lignumis.graphics .. "icons/wood-science-pack.png",
|
||||
subgroup = "science-pack",
|
||||
color_hint = { text = "A" },
|
||||
order = "0[wood-science-pack]",
|
||||
inventory_move_sound = item_sounds.science_inventory_move,
|
||||
pick_sound = item_sounds.science_inventory_pickup,
|
||||
drop_sound = item_sounds.science_inventory_move,
|
||||
stack_size = 200,
|
||||
weight = 1 * kg,
|
||||
durability = 1,
|
||||
durability_description_key = "description.science-pack-remaining-amount-key",
|
||||
factoriopedia_durability_description_key = "description.factoriopedia-science-pack-remaining-amount-key",
|
||||
durability_description_value = "description.science-pack-remaining-amount-value",
|
||||
random_tint_color = item_tints.iron_rust,
|
||||
default_import_location = "lignumis",
|
||||
spoil_result = spoil and "spoilage" or nil,
|
||||
spoil_ticks = spoil and 3600 * 60 or nil
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wood-science-pack",
|
||||
enabled = false,
|
||||
energy_required = 5,
|
||||
ingredients = {
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 1 },
|
||||
{ type = "item", name = "stone-brick", amount = 1 }
|
||||
},
|
||||
results = { { type = "item", name = "wood-science-pack", amount = 1 } },
|
||||
crafting_machine_tint = {
|
||||
primary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
secondary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
|
||||
},
|
||||
allow_productivity = true,
|
||||
surface_conditions = settings.startup["lignumis-restrict-sciences"].value and { { property = "pollutant-type", min = 3, max = 3 } } or nil
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "wood-science-pack",
|
||||
icon = Lignumis.graphics .. "technology/wood-science-pack.png",
|
||||
icon_size = 256,
|
||||
essential = true,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "wood-lab"
|
||||
},
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "wood-science-pack"
|
||||
}
|
||||
},
|
||||
research_trigger =
|
||||
{
|
||||
type = "craft-item",
|
||||
item = "lumber",
|
||||
count = 10
|
||||
}
|
||||
}
|
||||
})
|
||||
25
lignumis-base/prototypes/content/wooden-gearwheel.lua
Normal file
25
lignumis-base/prototypes/content/wooden-gearwheel.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
local item_tints = require("__base__.prototypes.item-tints")
|
||||
local item_sounds = require("__base__.prototypes.item_sounds")
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "wooden-gear-wheel",
|
||||
icon = Lignumis.graphics .. "icons/wooden-gear-wheel.png",
|
||||
subgroup = "intermediate-product",
|
||||
order = "a[basic-intermediates]-0[wooden-gear-wheel]",
|
||||
inventory_move_sound = item_sounds.wood_inventory_move,
|
||||
pick_sound = item_sounds.wood_inventory_pickup,
|
||||
drop_sound = item_sounds.wood_inventory_move,
|
||||
stack_size = 100,
|
||||
random_tint_color = item_tints.iron_rust
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "wooden-gear-wheel",
|
||||
category = "wood-processing-or-assembling",
|
||||
ingredients = { { type = "item", name = "lumber", amount = 1 } },
|
||||
results = { { type = "item", name = "wooden-gear-wheel", amount = 2 } },
|
||||
allow_productivity = true
|
||||
}
|
||||
})
|
||||
162
lignumis-base/prototypes/content/wooden-rocket-silo.lua
Normal file
162
lignumis-base/prototypes/content/wooden-rocket-silo.lua
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
local pipecovers = require("prototypes/content/gold/pipecovers")
|
||||
local machinepipes = require("prototypes/content/gold/machinepipes")
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
|
||||
local silo = table.deepcopy(data.raw["rocket-silo"]["rocket-silo"])
|
||||
silo.name = "provisional-rocket-silo"
|
||||
silo.icon = Lignumis.graphics .. "icons/provisional-rocket-silo.png"
|
||||
silo.module_slots = 0
|
||||
silo.allowed_effects = { "consumption", "pollution", "speed" }
|
||||
silo.minable = { mining_time = 1, result = "provisional-rocket-silo" }
|
||||
silo.max_health = 1000
|
||||
silo.energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 1,
|
||||
emissions_per_minute = { noise = 10000 },
|
||||
smoke = {
|
||||
{
|
||||
name = "smoke",
|
||||
deviation = { 0.1, 0.1 },
|
||||
frequency = 20,
|
||||
position = { 2.0, -3.0 },
|
||||
starting_vertical_speed = 0.08,
|
||||
starting_frame_deviation = 60
|
||||
}
|
||||
}
|
||||
}
|
||||
silo.emissions_per_second = { noise = 1000 / 60 }
|
||||
silo.energy_usage = "1MW"
|
||||
silo.rocket_entity = "provisional-rocket"
|
||||
silo.fixed_recipe = "provisional-rocket-part"
|
||||
silo.door_opening_speed = 1 / (20 * 60)
|
||||
silo.base_day_sprite.filename = Lignumis.graphics .. "entity/wooden-rocket-silo/06-rocket-silo.png"
|
||||
silo.base_front_sprite.filename = Lignumis.graphics .. "entity/wooden-rocket-silo/14-rocket-silo-front.png"
|
||||
silo.arm_01_back_animation.filename = Lignumis.graphics .. "entity/wooden-rocket-silo/08-rocket-silo-arms-back.png"
|
||||
silo.arm_02_right_animation.filename = Lignumis.graphics .. "entity/wooden-rocket-silo/08-rocket-silo-arms-right.png"
|
||||
silo.arm_03_front_animation.filename = Lignumis.graphics .. "entity/wooden-rocket-silo/13-rocket-silo-arms-front.png"
|
||||
silo.fluid_boxes = {
|
||||
{
|
||||
production_type = "input",
|
||||
pipe_picture = machinepipes(),
|
||||
pipe_covers = pipecovers(),
|
||||
volume = 50,
|
||||
pipe_connections = { { flow_direction = "input", direction = defines.direction.south, position = { -2, 4 } } },
|
||||
secondary_draw_orders = { north = -1 }
|
||||
}
|
||||
}
|
||||
silo.fluid_boxes_off_when_no_fluid_recipe = true
|
||||
silo.launch_to_space_platforms = false
|
||||
silo.rocket_parts_required = 50
|
||||
silo.rocket_parts_storage_cap = 50
|
||||
silo.to_be_inserted_to_rocket_inventory_size = 0
|
||||
silo.clamps_on_trigger = {
|
||||
type = "script",
|
||||
effect_id = "provisional-rocket-ready"
|
||||
}
|
||||
|
||||
local silo_item = table.deepcopy(data.raw["item"]["rocket-silo"])
|
||||
silo_item.name = "provisional-rocket-silo"
|
||||
silo_item.order = "0[provisional-rocket-silo]"
|
||||
silo_item.place_result = "provisional-rocket-silo"
|
||||
silo_item.icon = Lignumis.graphics .. "icons/provisional-rocket-silo.png"
|
||||
|
||||
local silo_recipe = table.deepcopy(data.raw["recipe"]["rocket-silo"])
|
||||
silo_recipe.name = "provisional-rocket-silo"
|
||||
silo_recipe.results[1].name = "provisional-rocket-silo"
|
||||
silo_recipe.ingredients = {
|
||||
{ type = "item", name = "lumber", amount = 400 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 150 },
|
||||
{ type = "item", name = "stone-brick", amount = 400 },
|
||||
{ type = "item", name = "gold-plate", amount = 400 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 100 } or
|
||||
{ type = "item", name = "gold-cable", amount = 100 }
|
||||
}
|
||||
|
||||
local rocket = table.deepcopy(data.raw["rocket-silo-rocket"]["rocket-silo-rocket"])
|
||||
rocket.name = "provisional-rocket"
|
||||
rocket.inventory_size = 40
|
||||
rocket.rising_speed = 1 / (14 * 60)
|
||||
rocket.engine_starting_speed = 1 / (8 * 60)
|
||||
rocket.flying_speed = 1 / (3000 * 60)
|
||||
rocket.flying_acceleration = 0.007
|
||||
rocket.rocket_sprite.layers[1].filename = Lignumis.graphics .. "entity/wooden-rocket-silo/rocket-static-pod.png"
|
||||
|
||||
local rocket_part_recipe = {
|
||||
type = "recipe",
|
||||
name = "provisional-rocket-part",
|
||||
icon = Lignumis.graphics .. "icons/provisional-rocket-part.png",
|
||||
energy_required = 6,
|
||||
enabled = false,
|
||||
hide_from_player_crafting = true,
|
||||
category = "rocket-building",
|
||||
ingredients = {
|
||||
{ type = "item", name = "lumber", amount = basic_circuit_board and 3 or 5 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = basic_circuit_board and 4 or 5 },
|
||||
{ type = "item", name = "gold-plate", amount = 5 },
|
||||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or
|
||||
{ type = "item", name = "gold-cable", amount = 5 },
|
||||
{ type = "fluid", name = "wood-pulp", amount = 5 }
|
||||
},
|
||||
results = { { type = "item", name = "rocket-part", amount = 1 } },
|
||||
allow_productivity = true,
|
||||
auto_recycle = false,
|
||||
}
|
||||
|
||||
local silo_ready = {
|
||||
type = "container",
|
||||
name = "provisional-rocket-silo-ready",
|
||||
icon = silo.icon,
|
||||
minable = { mining_time = 1, result = nil },
|
||||
deconstruction_alternative = "provisional-rocket-silo",
|
||||
inventory_size = settings.startup["lignumis-double-rocket"].value and 80 or 40,
|
||||
inventory_type = "normal",
|
||||
quality_affects_inventory_size = false,
|
||||
placeable_by = { item = "provisional-rocket-silo", count = 1 },
|
||||
max_health = 1000,
|
||||
resistances = {
|
||||
{
|
||||
type = "fire",
|
||||
percent = 100
|
||||
},
|
||||
{
|
||||
type = "explosion",
|
||||
percent = 100
|
||||
}
|
||||
},
|
||||
create_ghost_on_death = false,
|
||||
surface_conditions = {
|
||||
{
|
||||
property = "pressure",
|
||||
min = 1
|
||||
}
|
||||
},
|
||||
flags = { "not-on-map", "not-blueprintable", "not-flammable", "not-repairable", "not-upgradable", "no-automated-item-insertion", "no-automated-item-removal", "not-in-kill-statistics" },
|
||||
allow_copy_paste = false,
|
||||
additional_pastable_entities = { "provisional-rocket-silo" },
|
||||
collision_mask = { layers = {} },
|
||||
collision_box = table.deepcopy(silo.collision_box),
|
||||
selection_box = table.deepcopy(silo.selection_box),
|
||||
}
|
||||
|
||||
local silo_ready_item = table.deepcopy(data.raw["item"]["rocket-silo"])
|
||||
silo_ready_item.name = "provisional-rocket-silo-ready"
|
||||
silo_ready_item.order = "0[provisional-rocket-silo-ready]"
|
||||
silo_ready_item.place_result = "provisional-rocket-silo-ready"
|
||||
silo_ready_item.icon = Lignumis.graphics .. "icons/provisional-rocket-silo.png"
|
||||
|
||||
data:extend({
|
||||
silo,
|
||||
silo_item,
|
||||
silo_recipe,
|
||||
rocket,
|
||||
rocket_part_recipe,
|
||||
silo_ready,
|
||||
silo_ready_item
|
||||
})
|
||||
|
||||
PlanetsLib.restrict_to_planet(silo, "lignumis")
|
||||
PlanetsLib.restrict_to_planet(silo_recipe, "lignumis")
|
||||
PlanetsLib.restrict_to_planet(rocket_part_recipe, "lignumis")
|
||||
Loading…
Add table
Add a link
Reference in a new issue