Skip to content

Commit

Permalink
Overmap 4.8: Asteroid Fields (#2095)
Browse files Browse the repository at this point in the history
## About The Pull Request


![image](https://github.com/shiptest-ss13/Shiptest/assets/118859017/34104d93-e5ac-4b0e-a010-f26aa9b13880)

large asteroids now use multibiome planet generation.

asteroids generate in fields of small to large asteroids, with space
carp spawning in the space between them.

space carp have been added to the mining faction, to avoid turf wars
between carp dens & other dens

## Why It's Good For The Game

large asteroids were large, featureless rocks packed with mobs and
resources. asteroid fields are infinitely cooler.

## Changelog

:cl:
tweak: Large asteroids have been reworked into asteroid fields.
/:cl:

---------

Signed-off-by: goober3 <[email protected]>
Signed-off-by: Mark Suckerberg <[email protected]>
Co-authored-by: Bjarl <[email protected]>
Co-authored-by: Mark Suckerberg <[email protected]>
  • Loading branch information
3 people authored Jul 21, 2023
1 parent a4c4270 commit 851a85d
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 78 deletions.
171 changes: 171 additions & 0 deletions code/datums/mapgen/planetary/AsteroidGenerator.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/datum/map_generator/planet_generator/asteroid
mountain_height = 0.65
perlin_zoom = 20

initial_closed_chance = 45
smoothing_iterations = 20
birth_limit = 4
death_limit = 3

primary_area_type = /area/overmap_encounter/planetoid/asteroid

biome_table = list(
BIOME_COLDEST = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid
),
BIOME_COLD = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid
),
BIOME_WARM = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid
),
BIOME_TEMPERATE = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid/carp
),
BIOME_HOT = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid/carp
),
BIOME_HOTTEST = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_LOW_HUMIDITY = /datum/biome/asteroid,
BIOME_MEDIUM_HUMIDITY = /datum/biome/asteroid,
BIOME_HIGH_HUMIDITY = /datum/biome/asteroid/carp,
BIOME_HIGHEST_HUMIDITY = /datum/biome/asteroid/carp //gee what a diverse place
)
)

cave_biome_table = list(
BIOME_COLDEST_CAVE = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_LOW_HUMIDITY = /datum/biome/cave/asteroid/ice,
BIOME_MEDIUM_HUMIDITY = /datum/biome/cave/asteroid/ice,
BIOME_HIGH_HUMIDITY = /datum/biome/cave/asteroid/ice,
BIOME_HIGHEST_HUMIDITY = /datum/biome/cave/asteroid/ice
),
BIOME_COLD_CAVE = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_LOW_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_MEDIUM_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_HIGH_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_HIGHEST_HUMIDITY = /datum/biome/cave/asteroid/ice
),
BIOME_WARM_CAVE = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_LOW_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_MEDIUM_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_HIGH_HUMIDITY = /datum/biome/cave/asteroid/carp_den,
BIOME_HIGHEST_HUMIDITY = /datum/biome/cave/asteroid/carp_den
),
BIOME_HOT_CAVE = list(
BIOME_LOWEST_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_LOW_HUMIDITY = /datum/biome/cave/asteroid/vanilla,
BIOME_MEDIUM_HUMIDITY = /datum/biome/cave/asteroid/carp_den,
BIOME_HIGH_HUMIDITY = /datum/biome/cave/asteroid/carp_den,
BIOME_HIGHEST_HUMIDITY = /datum/biome/cave/asteroid/carp_den
)
)

/datum/biome/asteroid
open_turf_types = list(
/turf/open/space = 1
)

/datum/biome/asteroid/carp
mob_spawn_list = list(
/mob/living/simple_animal/hostile/carp = 1
)

/datum/biome/cave/asteroid
closed_turf_types = list(
/turf/closed/mineral/random = 1
)
open_turf_types = list(
/turf/open/floor/plating/asteroid/airless = 1
)

/datum/biome/cave/asteroid/vanilla
flora_spawn_list = list(
/obj/structure/flora/ash/space/voidmelon = 1,
/obj/structure/flora/rock = 1,
/obj/structure/flora/rock/pile = 1
)

feature_spawn_list = list(
/obj/structure/geyser/random = 1,
/obj/structure/spawner/mining/goliath = 1,
/obj/structure/spawner/mining = 1,
/obj/structure/spawner/mining/hivelord = 1
)

mob_spawn_list = list(
/mob/living/simple_animal/hostile/asteroid/goliath = 25,
/mob/living/simple_animal/hostile/asteroid/basilisk = 25,
/mob/living/simple_animal/hostile/asteroid/hivelord = 25,
/mob/living/simple_animal/hostile/asteroid/goldgrub = 10
)

flora_spawn_chance = 2
feature_spawn_chance = 1
mob_spawn_chance = 6

/datum/biome/cave/asteroid/ice
open_turf_types = list(
/turf/open/floor/plating/ice/airless = 1
)

mob_spawn_list = list(
/mob/living/simple_animal/hostile/asteroid/goliath = 25,
/mob/living/simple_animal/hostile/asteroid/basilisk = 25,
/mob/living/simple_animal/hostile/asteroid/hivelord = 25,
/mob/living/simple_animal/hostile/asteroid/goldgrub = 10
)

mob_spawn_chance = 2

/datum/biome/cave/asteroid/carp_den
closed_turf_types = list(
/turf/closed/mineral/random = 5
)
open_turf_types = list(
/turf/open/floor/plating/asteroid/airless = 1
)

flora_spawn_list = list(
/obj/structure/flora/ash/space/voidmelon = 9,
/obj/structure/flora/rock = 1,
/obj/structure/flora/rock/pile = 1
)

feature_spawn_list = list(
/obj/structure/geyser/random = 1,
/obj/structure/spawner/mining/carp = 1
)

mob_spawn_list = list(
/mob/living/simple_animal/hostile/carp = 25,
/mob/living/simple_animal/hostile/carp/megacarp = 30
)

flora_spawn_chance = 15
feature_spawn_chance = 10
mob_spawn_chance = 18
72 changes: 0 additions & 72 deletions code/datums/mapgen/single_biome/AsteroidCaves.dm

This file was deleted.

7 changes: 7 additions & 0 deletions code/game/objects/structures/spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ GLOBAL_LIST_INIT(astroloot, list(
spawn_text = "crawls out of"
mob_types = list(/mob/living/simple_animal/hostile/asteroid/goldgrub, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/hivelord, /mob/living/simple_animal/hostile/asteroid/basilisk, /mob/living/simple_animal/hostile/asteroid/fugu)
faction = list("mining")
density = 0

/obj/structure/spawner/mining/deconstruct(disassembled)
adestroy_effect()
Expand Down Expand Up @@ -147,3 +148,9 @@ GLOBAL_LIST_INIT(astroloot, list(
name = "wumborian fugu den"
desc = "A den housing a nest of wumborian fugus, how do they all even fit in there?"
mob_types = list(/mob/living/simple_animal/hostile/asteroid/fugu)

/obj/structure/spawner/mining/carp
name = "carp den"
desc = "A den housing a nest of space carp, seems fishy!"
mob_types = list(/mob/living/simple_animal/hostile/carp)
spawn_text = "emerges from"
4 changes: 3 additions & 1 deletion code/game/turfs/open/floor/plating/misc_plating.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@
/turf/open/floor/plating/ice/iceberg/lit
light_range = 2
light_power = 1

/turf/open/floor/plating/ice/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS

/turf/open/floor/plating/ice/airless
initial_gas_mix = AIRLESS_ATMOS

/turf/open/floor/plating/snowed
name = "snowed-over plating"
desc = "A section of heated plating, helps keep the snow from stacking up too high."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/hostile/carp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
faction = list("carp")
faction = list("carp", "mining")
movement_type = FLYING
pressure_resistance = 200
gold_core_spawnable = HOSTILE_SPAWN
Expand Down
5 changes: 5 additions & 0 deletions code/modules/overmap/objects/dynamic_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@
area_flags = HIDDEN_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED //allows jaunters to work
ambientsounds = REEBE

/area/overmap_encounter/planetoid/asteroid
name = "\improper Asteroid Field"
sound_environment = SOUND_ENVIRONMENT_QUARRY
ambientsounds = SPACE

/area/overmap_encounter/planetoid/gas_giant
name = "\improper Gas Giant"
sound_environment = SOUND_ENVIRONMENT_MOUNTAINS
Expand Down
6 changes: 3 additions & 3 deletions code/modules/overmap/planets/planet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@
ruin_type = RUINTYPE_YELLOW

/datum/planet_type/asteroid
name = "large asteroid"
desc = "A large asteroid with significant traces of minerals."
name = "asteroid field"
desc = "A field of asteroids with significant traces of minerals."
planet = DYNAMIC_WORLD_ASTEROID
icon_state = "asteroid"
color = COLOR_GRAY
mapgen = /datum/map_generator/single_biome/asteroid
mapgen = /datum/map_generator/planet_generator/asteroid
// Space, because asteroid maps also include space turfs and the prospect of space turfs
// existing without space as their baseturf scares me.
default_baseturf = /turf/open/space
Expand Down
2 changes: 1 addition & 1 deletion shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#include "code\datums\mapgen\SingleTurf.dm"
#include "code\datums\mapgen\Whitesandsatmos.dm"
#include "code\datums\mapgen\planetary\_PlanetGenerator.dm"
#include "code\datums\mapgen\planetary\AsteroidGenerator.dm"
#include "code\datums\mapgen\planetary\BeachGenerator.dm"
#include "code\datums\mapgen\planetary\JungleGenerator.dm"
#include "code\datums\mapgen\planetary\LavaGenerator.dm"
Expand All @@ -663,7 +664,6 @@
#include "code\datums\mapgen\planetary\SnowGenerator.dm"
#include "code\datums\mapgen\planetary\WasteGenerator.dm"
#include "code\datums\mapgen\single_biome\_SingleBiome.dm"
#include "code\datums\mapgen\single_biome\AsteroidCaves.dm"
#include "code\datums\mapgen\single_biome\Gas_Giant.dm"
#include "code\datums\mapgen\single_biome\ReebeGenerator.dm"
#include "code\datums\martial\_martial.dm"
Expand Down

0 comments on commit 851a85d

Please sign in to comment.