diff --git a/graphics/planets/maraxsis-trench.png b/graphics/planets/maraxsis-trench.png new file mode 100644 index 00000000..2810be91 Binary files /dev/null and b/graphics/planets/maraxsis-trench.png differ diff --git a/graphics/technology/maraxsis-trench.png b/graphics/technology/maraxsis-trench.png new file mode 100644 index 00000000..b8618de2 Binary files /dev/null and b/graphics/technology/maraxsis-trench.png differ diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index 4015c6df..079575bb 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -9,6 +9,7 @@ description=Dive into the uncharted waters of Maraxsis, a world where the sea co [space-location-name] maraxsis=Maraxsis +maraxsis-trench=Trench [space-location-description] maraxsis=A planet fully covered by vast oceans. The pressure is extreme here, anything will succumb to the ocean without the protection of a submarine. Preliminary surface scans show an average temperature of 101°F. It's not too hot and not too cold, the perfect Goldilocks zone for liquid water. diff --git a/prototypes/planet/maraxsis.lua b/prototypes/planet/maraxsis.lua index 8bf1e6ce..f4d705e8 100644 --- a/prototypes/planet/maraxsis.lua +++ b/prototypes/planet/maraxsis.lua @@ -20,18 +20,46 @@ data:extend {maraxsis.merge(data.raw.planet.gleba, { solar_power_in_space = 150, map_gen_settings = planet_map_gen.maraxsis(), distance = 15, - orientation = 0.95, + draw_orbit = false, + orientation = 0.515, flying_robot_energy_usage_multiplier = 1.5, -- todo: this doesnt work })} +data:extend {maraxsis.merge(data.raw.planet.gleba, { + name = "maraxsis-trench", + starting_area = 1, + surface_properties = { + ["day-night-cycle"] = 5 * minute, + ["magnetic-field"] = 25, + ["solar-power"] = 30, + pressure = 200000, + gravity = 20, + }, + starmap_icon = "__maraxsis__/graphics/planets/maraxsis-trench.png", + starmap_icon_size = 512, + icon = "__maraxsis__/graphics/technology/maraxsis-trench.png", + icon_size = 256, + order = "ce[maraxsis]-[trench]", + pollutant_type = "nil", + draw_orbit = false, + solar_power_in_space = 150, + map_gen_settings = planet_map_gen.maraxsis_trench(), + distance = 15.6, + label_orientation = 0.3, + magnitude = 0.65, + orientation = 0.5, + auto_save_on_first_trip = false, + asteroid_spawn_definitions = "nil", + flying_robot_energy_usage_multiplier = 1.5, -- todo: this doesnt work +})} data:extend {{ type = "space-connection", name = "vulcanus-maraxsis", subgroup = "planet-connections", - from = "vulcanus", - to = "maraxsis", + from = "maraxsis", + to = "vulcanus", order = "f", - length = 20000, + length = 100000, asteroid_spawn_definitions = asteroid_util.spawn_definitions(asteroid_util.gleba_aquilo) }} diff --git a/prototypes/planet/planet-map-gen.lua b/prototypes/planet/planet-map-gen.lua index 2627c4e1..fb09ae39 100644 --- a/prototypes/planet/planet-map-gen.lua +++ b/prototypes/planet/planet-map-gen.lua @@ -13,8 +13,7 @@ planet_map_gen.maraxsis = function() { terrain_segmentation = 1, water = 0, - property_expression_names = - { + property_expression_names = { elevation = "maraxsis_elevation", temperature = "temperature_basic", moisture = "maraxsis_moisture", @@ -22,23 +21,19 @@ planet_map_gen.maraxsis = function() cliffiness = "1", cliff_elevation = "cliff_elevation_from_elevation", }, - cliff_settings = - { + cliff_settings = { name = "cliff-maraxsis", cliff_elevation_0 = 0.03, cliff_elevation_interval = 0.1, cliff_smoothing = 0, -- This is critical for correct cliff placement on the trench entrance. richness = 0.98 }, - autoplace_controls = - { + autoplace_controls = { ["iron-ore"] = {}, }, autoplace_settings = { - ["tile"] = - { - settings = - { + ["tile"] = { + settings = { ["maraxsis-trench-entrance"] = {}, ["sand-1-underwater"] = {}, ["sand-2-underwater"] = {}, @@ -46,10 +41,8 @@ planet_map_gen.maraxsis = function() ["dirt-5-underwater"] = {}, } }, - ["decorative"] = - { - settings = - { + ["decorative"] = { + settings = { ["urchin-cactus"] = {}, -- nauvis decoratives @@ -127,4 +120,42 @@ planet_map_gen.maraxsis = function() } end +planet_map_gen.maraxsis_trench = function() + return { + terrain_segmentation = 1, + water = 0, + property_expression_names = { + elevation = "maraxsis_elevation", + temperature = "temperature_basic", + moisture = "maraxsis_moisture", + aux = "aux_basic", + cliffiness = "1", + cliff_elevation = "cliff_elevation_from_elevation", + }, + autoplace_controls = { + ["iron-ore"] = {}, + }, + autoplace_settings = { + ["tile"] = { + settings = { + ["maraxsis-trench-entrance"] = {}, + ["sand-1-underwater"] = {}, + ["sand-2-underwater"] = {}, + ["sand-3-underwater"] = {}, + ["dirt-5-underwater"] = {}, + } + }, + ["decorative"] = { + settings = { + } + }, + ["entity"] = { + settings = { + + }, + }, + } + } +end + return planet_map_gen diff --git a/prototypes/technology.lua b/prototypes/technology.lua index 139bd6f6..77bfc2c1 100644 --- a/prototypes/technology.lua +++ b/prototypes/technology.lua @@ -12,6 +12,11 @@ data:extend {{ space_location = "maraxsis", use_icon_overlay_constant = true }, + { + type = "unlock-space-location", + space_location = "maraxsis-trench", + use_icon_overlay_constant = true + }, { type = "unlock-recipe", recipe = "maraxsis-hydro-plant", diff --git a/scripts/constants.lua b/scripts/constants.lua index 0afd78cf..d2b0416d 100644 --- a/scripts/constants.lua +++ b/scripts/constants.lua @@ -1,8 +1,8 @@ local TRENCH_MOVEMENT_FACTOR = 2 -- each tile moved in the trench layer = 2 tiles in the surface layer local SUBMARINES = { - ["maraxsis-diesel-submarine"] = true, - ["maraxsis-nuclear-submarine"] = true, + ["maraxsis-diesel-submarine"] = {r = 255, g = 195, b = 0, a = 0.5}, + ["maraxsis-nuclear-submarine"] = {r = 0.3, g = 0.8, b = 0.3, a = 0.5}, } local TRENCH_SURFACE_NAME = "Trench" diff --git a/scripts/map-gen/surfaces/maraxsis-trench.lua b/scripts/map-gen/surfaces/maraxsis-trench.lua index af5d2c77..3208901a 100644 --- a/scripts/map-gen/surfaces/maraxsis-trench.lua +++ b/scripts/map-gen/surfaces/maraxsis-trench.lua @@ -1,41 +1,5 @@ local function get_surface() - local surface = game.surfaces[maraxsis.TRENCH_SURFACE_NAME] - - if not surface then - surface = game.create_surface(maraxsis.TRENCH_SURFACE_NAME, { - seed = maraxsis.prototypes[maraxsis.MARAXSIS_SURFACE_NAME].get_surface().map_gen_settings.seed, - autoplace_settings = { - entity = { - treat_missing_as_default = false, - maraxsis_trench_wall = {}, - }, - tile = { - treat_missing_as_default = false, - }, - decorative = { - treat_missing_as_default = false, - }, - }, - cliff_settings = { - cliff_elevation_0 = 1024 - } - }) - - surface.daytime = 0.5 - surface.freeze_daytime = true - surface.show_clouds = false - surface.brightness_visual_weights = {r = 1, g = 1, b = 1} - surface.min_brightness = 0 - end - - return surface -end - --- uses game.player, call this from the ingame terminal -function teleport_to_maraxsis_trench() - local player = game.player - local surface = get_surface() - player.teleport({0, 0}, surface) + return game.surfaces[maraxsis.TRENCH_SURFACE_NAME] end return {