Skip to content

Commit

Permalink
Trenches are now on the starmap
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Nov 25, 2024
1 parent 2fac643 commit 87c2bd9
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 57 deletions.
Binary file added graphics/planets/maraxsis-trench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/technology/maraxsis-trench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 32 additions & 4 deletions prototypes/planet/maraxsis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}}
59 changes: 45 additions & 14 deletions prototypes/planet/planet-map-gen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,36 @@ 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",
aux = "aux_basic",
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"] = {},
["sand-3-underwater"] = {},
["dirt-5-underwater"] = {},
}
},
["decorative"] =
{
settings =
{
["decorative"] = {
settings = {
["urchin-cactus"] = {},

-- nauvis decoratives
Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions prototypes/technology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions scripts/constants.lua
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
38 changes: 1 addition & 37 deletions scripts/map-gen/surfaces/maraxsis-trench.lua
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 87c2bd9

Please sign in to comment.