diff --git a/README.md b/README.md index f6fa08b..31d1a97 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ The following mods can be a great addition for this mod: Sorted by priority -- Integrate [PlanetsLib](https://mods.factorio.com/mod/PlanetsLib) - Move pollution surface property to PlanetsLib - Fix pipe graphics on desiccation furnace, provisionary rocket silo and quality assembler - Ban huge rocks with coal from Nauvis diff --git a/lignumis/graphics/orbit-lignumis.png b/lignumis/graphics/orbit-lignumis.png new file mode 100644 index 0000000..c095a95 Binary files /dev/null and b/lignumis/graphics/orbit-lignumis.png differ diff --git a/lignumis/info.json b/lignumis/info.json index e7a0715..02cc7ed 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -9,6 +9,7 @@ "dependencies": [ "base", "space-age >= 2.0.28", + "PlanetsLib >= 1.1.21", "astroponics >= 1.2.0", "cf-lib >= 0.0.2", "mf-core >= 1.0.3", diff --git a/lignumis/prototypes/content/lignumis/planet.lua b/lignumis/prototypes/content/lignumis/planet.lua index 46f2f46..ec2c48b 100644 --- a/lignumis/prototypes/content/lignumis/planet.lua +++ b/lignumis/prototypes/content/lignumis/planet.lua @@ -7,7 +7,7 @@ local lignumis_chunks = 0.025 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 } + { position = 0.9, probability = lignumis_chunks, angle_when_stopped = asteroid_util.chunk_angle } }, type_ratios = { { position = 0.1, ratios = asteroid_util.nauvis_ratio }, @@ -15,24 +15,30 @@ local nauvis_lignumis = { } } -data:extend({ - { - type = "surface-property", - name = "pollution-type", - default_value = 0 - }, +PlanetsLib:extend({ { type = "planet", name = "lignumis", + orbit = { + parent = { + type = "planet", + name = "nauvis" + }, + 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 = 512, gravity_pull = 4, - distance = 16.5, - orientation = 0.2625, - magnitude = 0.35, - order = "0[lignumis]", - subgroup = "planets", + order = "a[nauvis]-a[lignumis]", map_seed_offset = 100, map_gen_settings = planet_map_gen, pollutant_type = "noise", @@ -64,42 +70,51 @@ data:extend({ 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}) - }) + 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}) - }) + 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}) - }) + 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}) + }) } } } }) +PlanetsLib.borrow_music(data.raw.planet["nauvis"], data.raw.planet["lignumis"]) data:extend({ + { + type = "surface-property", + name = "pollution-type", + default_value = 0 + }, { type = "space-connection", name = "nauvis-lignumis", @@ -110,4 +125,4 @@ data:extend({ length = 2000, asteroid_spawn_definitions = asteroid_util.spawn_definitions(nauvis_lignumis) }, -}) \ No newline at end of file +}) diff --git a/lignumis/prototypes/content/technology.lua b/lignumis/prototypes/content/technology.lua index 9486317..dc09f1d 100644 --- a/lignumis/prototypes/content/technology.lua +++ b/lignumis/prototypes/content/technology.lua @@ -2,8 +2,7 @@ data:extend({ { type = "technology", name = "planet-discovery-lignumis", - icons = util.technology_icon_constant_planet("__lignumis__/graphics/technology/lignumis.png"), - icon_size = 256, + icons = PlanetsLib.technology_icons_moon("__lignumis__/graphics/technology/lignumis.png", 256), essential = true, effects = { { diff --git a/sources/orbit-lignumis.afphoto b/sources/orbit-lignumis.afphoto new file mode 100644 index 0000000..fb79f65 Binary files /dev/null and b/sources/orbit-lignumis.afphoto differ