From 4844fbc2f2ea77f96781c01a7d03b6b605010962 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 15 Jan 2025 00:12:06 +0100 Subject: [PATCH] Tweak generation of decoratives --- lignumis/prototypes/content/data.lua | 1 + lignumis/prototypes/content/decoratives.lua | 23 +++++++++++++++++++ .../prototypes/content/gold/stromatolite.lua | 2 +- .../prototypes/content/lignumis/mapgen.lua | 7 +++++- 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 lignumis/prototypes/content/decoratives.lua diff --git a/lignumis/prototypes/content/data.lua b/lignumis/prototypes/content/data.lua index bc2576c..86bbe3a 100644 --- a/lignumis/prototypes/content/data.lua +++ b/lignumis/prototypes/content/data.lua @@ -26,5 +26,6 @@ require("basic-radar") require("mid-game-recipes") require("active-noise-cancelling-tower") require("quality-assembler") +require("decoratives") require("noise") diff --git a/lignumis/prototypes/content/decoratives.lua b/lignumis/prototypes/content/decoratives.lua new file mode 100644 index 0000000..90d3c79 --- /dev/null +++ b/lignumis/prototypes/content/decoratives.lua @@ -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) + } +}) diff --git a/lignumis/prototypes/content/gold/stromatolite.lua b/lignumis/prototypes/content/gold/stromatolite.lua index ee08f86..eed7a04 100644 --- a/lignumis/prototypes/content/gold/stromatolite.lua +++ b/lignumis/prototypes/content/gold/stromatolite.lua @@ -5,7 +5,7 @@ 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/3}", + "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) diff --git a/lignumis/prototypes/content/lignumis/mapgen.lua b/lignumis/prototypes/content/lignumis/mapgen.lua index a5f599c..5eed97a 100644 --- a/lignumis/prototypes/content/lignumis/mapgen.lua +++ b/lignumis/prototypes/content/lignumis/mapgen.lua @@ -60,7 +60,12 @@ return { ["green-bush-mini"] = {}, ["medium-rock"] = {}, ["small-rock"] = {}, - ["tiny-rock"] = {} + ["tiny-rock"] = {}, + ["knobbly-roots"] = {}, + ["crater-large"] = {}, + ["crater-small"] = {}, + ["waves-decal"] = {}, + ["gold-rock-cluster"] = {} } }, ["entity"] = {