Skip to content

Commit

Permalink
Makes Moon Station actually a moon because people made fun of me for …
Browse files Browse the repository at this point in the history
…the map not actually being a moon once (Bubberstation#1087)

![image](https://github.com/Bubberstation/Bubberstation/assets/8602857/176874cb-ec9b-4ae5-b4c1-5323b814772d)

## About The Pull Request

Moon Station is now a "planetary" map!

### Atmospherics

The atmos is a very cool 60 Celsius with a custom mixture of gas that is
still breathable. Special precautions should be taken with the
supermatter as cooling it is now harder (but still possible). The
default setup with one emitter and no altered pipes (and just using the
passive cooling) generates 1MW and doesn't overheat the supermatter.
Supematter events do cause the cooling to fail, which is why 3 powered
coolers are provided in case that happens.

### Ruins and Lavaland

Given the planetary nature of the map, there are no longer any space
ruins. There also isn't a lower level yet, so in the meantime Miners can
fly down to lavaland. Soon I will be adding a custom cave jungle system
that miners will use for mining, with custom bosses and other cool
content.

### Lighting

I added Planetary lighting exclusive to Moon Station from my other
coderbase. The lightning does not have a day/night cycle (too
performance heavy!) but it still looks pretty cool and lights up the
entire outside area. This also means that solars basically has a
generous boost of power 24/7.

## Current Issues

Non discovered... so far.

## Changelog

:cl: BurgerBB
add: Makes Moon Station actually a moon now because people made fun of
me.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->
  • Loading branch information
BurgerLUA authored Feb 15, 2024
1 parent 5b34922 commit 2713e00
Show file tree
Hide file tree
Showing 26 changed files with 200,976 additions and 64,780 deletions.
264,759 changes: 200,012 additions & 64,747 deletions _maps/map_files/moonstation/moonstation.dmm

Large diffs are not rendered by default.

43 changes: 41 additions & 2 deletions _maps/moonstation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,50 @@
"map_name": "Moon Station",
"map_path": "map_files/moonstation",
"map_file": "moonstation.dmm",
"emergency_override": 1,
"space_ruin_levels": 0,
"space_empty_levels": 0,
"planetary": 1,
"shuttles": {
"emergency": "emergency_moonstation",
"ferry": "ferry_skyrat",
"cargo": "cargo_skyrat",
"whiteship": "whiteship_delta"
}
},
"traits": [
{
"Up": true,
"Mining": true,
"Linkage": null,
"Gravity": true,
"Lava Ruins": true,
"Baseturf": "/turf/open/lava/smooth/lava_land_surface",
"No Parallax": true,
"Weather_Ashstorm": true
},
{
"Up": true,
"Down": true,
"Mining": true,
"Linkage": null,
"Gravity": true,
"Baseturf": "/turf/open/misc/moonstation_rock",
"No Parallax": true
},
{
"Down": true,
"Mining": true,
"Linkage": null,
"Gravity": true,
"Baseturf": "/turf/open/misc/moonstation_rock",
"No Parallax": true,
"Weather_Sandstorm": true
}
],
"minetype": "none",
"job_changes": {
"Captain": {
"special_charter": "moon"
}
},
"emergency_override": 1
}
4 changes: 4 additions & 0 deletions code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,10 @@
if(length(GLOB.jobspawn_overrides[job_spawn_title])) //We're doing something special today.
return pick(GLOB.jobspawn_overrides[job_spawn_title])
// SKYRAT EDIT END
//BUBBERSTATION CHANGE START: MOONSTATION CRYO SPAWNS.
if(length(SSjob.latejoin_override_trackers))
return pick(SSjob.latejoin_override_trackers)
//BUBBERSTATION CHANGE END
if(length(SSjob.latejoin_trackers))
return pick(SSjob.latejoin_trackers)
return SSjob.get_last_resort_spawn_points()
Expand Down
7 changes: 7 additions & 0 deletions code/modules/transport/tram/tram_displays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@
update_appearance()
return

//BUBBERSTATION CHANGE START: FIXES 2-DESTINATION TRAMS
if(travel_direction == NONE)
sign_face = null
update_appearance()
return
//BUBBERSTATION CHANGE END: FIXES 2-DESTINATION TRAMS

sign_face = ""
sign_face += "[base_icon_state]_"
if(!LAZYFIND(available_faces, controller.specific_transport_id))
Expand Down
4 changes: 4 additions & 0 deletions modular_zubbers/code/__DEFINES/moonstation_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define MOONSTATION_ATMOS GAS_O2 + "=20.2;" + GAS_N2 + "=78.5;" + GAS_CO2 + "=4.6;" + GAS_WATER_VAPOR + "=1.1;TEMP=347.65"
#define MOONSTATION_ATMOS_CAVE LAVALAND_DEFAULT_ATMOS

#define ZTRAIT_SANDSTORM "Weather_Sandstorm"
79 changes: 79 additions & 0 deletions modular_zubbers/code/datums/mapgen/Cavegens/moonstation.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
//Surface
/datum/map_generator/cave_generator/moonstation

weighted_open_turf_types = list(/turf/open/misc/moonstation_sand = 1)
weighted_closed_turf_types = list(/turf/closed/mineral/random/lunar = 1)

weighted_flora_spawn_list = list(
/obj/structure/flora/scrap = 10,
/obj/structure/flora/ash/cacti = 20,
/obj/structure/flora/bush/ferny = 5,
/obj/structure/flora/bush/grassy/style_random = 1,
/obj/structure/flora/bush/leavy/style_random = 1,
/obj/structure/flora/bush/sparsegrass/style_random = 3,
/obj/structure/flora/bush/stalky/style_random = 5,
)

weighted_mob_spawn_list = list(
/mob/living/basic/mining/cazador = 10,
/mob/living/basic/mining/scorpion = 40,
/obj/effect/decal/cleanable/ants/fire = 50
)

weighted_feature_spawn_list = list(
/obj/structure/geyser/random = 1
)

mob_spawn_chance = 1
initial_closed_chance = 30
smoothing_iterations = 50
birth_limit = 4
death_limit = 3


//Underground
/datum/map_generator/cave_generator/moonstation/cave

weighted_open_turf_types = list(/turf/open/misc/moonstation_rock/cave = 1)
weighted_closed_turf_types = list(/turf/closed/mineral/random/lunar_cave = 1)


weighted_mob_spawn_list = list(
SPAWN_MEGAFAUNA = 2,
/mob/living/basic/mining/basilisk = 20,
/mob/living/basic/mining/bileworm = 30,
/obj/effect/spawner/random/lavaland_mob/goliath = 10,
/obj/effect/spawner/random/lavaland_mob/legion = 20,
/mob/living/basic/mining/watcher = 30,
/mob/living/basic/mining/goldgrub = 10,
/mob/living/basic/mining/brimdemon = 10,
/obj/structure/spawner/mining/goliath = 5,
/mob/living/basic/spider/giant/tangle = 5
)

weighted_flora_spawn_list = list(
/obj/structure/flora/rock/style_random = 5,
/obj/structure/flora/ash/cap_shroom = 10,
/obj/structure/flora/ash/leaf_shroom = 5,
/obj/structure/flora/ash/stem_shroom = 5,
/obj/structure/flora/ash/tall_shroom = 5,
)

///Note that this spawn list is also in the lavaland and icemoon generator
weighted_feature_spawn_list = list(
/obj/structure/geyser/hollowwater = 10,
/obj/structure/geyser/plasma_oxide = 10,
/obj/structure/geyser/protozine = 10,
/obj/structure/geyser/random = 2,
/obj/structure/geyser/wittel = 10,
/obj/structure/ore_vent/random = 5
)

mob_spawn_chance = 4
initial_closed_chance = 45
smoothing_iterations = 50
birth_limit = 4
death_limit = 3



138 changes: 138 additions & 0 deletions modular_zubbers/code/datums/weather/weather_types/sand_storm.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
a//Basically a reskinned Ash Storm

/datum/weather/sand_storm
name = "sand storm"
desc = "An intense atmospheric storm lifts sand off of the planet's surface and billows it down across the area, dealing intense burn damage to the unprotected."

telegraph_message = "<span class='boldwarning'>Stacks of dark clouds and cloudy sand cover the horizon. Seek shelter.</span>"
telegraph_duration = 600
telegraph_overlay = "sandstorm_light"

weather_message = "<span class='userdanger'><i>Smoldering particles of sand billow down around you! Get inside!</i></span>"
weather_duration_lower = 1200
weather_duration_upper = 2400
weather_overlay = "sandstorm"

end_message = "<span class='boldannounce'>The shrieking wind whips away the last of the sand and falls to its usual murmur. It should be safe to go outside now.</span>"
end_duration = 600
end_overlay = "sandstorm_light"

area_type = /area
protect_indoors = TRUE
target_trait = ZTRAIT_SANDSTORM

immunity_type = TRAIT_ASHSTORM_IMMUNE

probability = 75

barometer_predictable = TRUE
var/list/weak_sounds = list()
var/list/strong_sounds = list()

/datum/weather/sand_storm/telegraph()
var/list/eligible_areas = list()
for (var/z in impacted_z_levels)
eligible_areas += SSmapping.areas_in_z["[z]"]
for(var/i in 1 to eligible_areas.len)
var/area/place = eligible_areas[i]
if(place.outdoors)
weak_sounds[place] = /datum/looping_sound/weak_outside_ashstorm
strong_sounds[place] = /datum/looping_sound/active_outside_ashstorm
else
weak_sounds[place] = /datum/looping_sound/weak_inside_ashstorm
strong_sounds[place] = /datum/looping_sound/active_inside_ashstorm
CHECK_TICK

//We modify this list instead of setting it to weak/stron sounds in order to preserve things that hold a reference to it
//It's essentially a playlist for a bunch of components that chose what sound to loop based on the area a player is in
GLOB.ash_storm_sounds += weak_sounds
return ..()

/datum/weather/sand_storm/start()
GLOB.ash_storm_sounds -= weak_sounds
GLOB.ash_storm_sounds += strong_sounds
return ..()

/datum/weather/sand_storm/wind_down()
GLOB.ash_storm_sounds -= strong_sounds
GLOB.ash_storm_sounds += weak_sounds
return ..()

/datum/weather/sand_storm/can_weather_act(mob/living/mob_to_check)
. = ..()
if(!. || !ishuman(mob_to_check))
return
var/mob/living/carbon/human/human_to_check = mob_to_check
if(human_to_check.get_thermal_protection() >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
return FALSE

/datum/weather/sand_storm/weather_act(mob/living/victim)
victim.adjustFireLoss(1)
victim.adjustBruteLoss(2)
victim.adjust_bodytemperature(rand(2, 4))

/datum/weather/sand_storm/end()
GLOB.ash_storm_sounds -= weak_sounds
return ..()

/// Copied from the base weather.dm file to make this modular. I fucking hate modularity.
/datum/weather/sand_storm/generate_overlay_cache()
// We're ending, so no overlays at all
if(stage == END_STAGE)
return list()

var/weather_state = ""
switch(stage)
if(STARTUP_STAGE)
weather_state = telegraph_overlay
if(MAIN_STAGE)
weather_state = weather_overlay
if(WIND_DOWN_STAGE)
weather_state = end_overlay

// Use all possible offsets
// Yes this is a bit annoying, but it's too slow to calculate and store these from turfs, and it shouldn't (I hope) look weird
var/list/gen_overlay_cache = list()
for(var/offset in 0 to SSmapping.max_plane_offset)
// Note: what we do here is effectively apply two overlays to each area, for every unique multiz layer they inhabit
// One is the base, which will be masked by lighting. the other is "glowing", and provides a nice contrast
// This method of applying one overlay per z layer has some minor downsides, in that it could lead to improperly doubled effects if some have alpha
// I prefer it to creating 2 extra plane masters however, so it's a cost I'm willing to pay
// LU
var/mutable_appearance/glow_overlay = mutable_appearance('modular_zubbers/icons/effects/glow_weather.dmi', weather_state, overlay_layer, null, ABOVE_LIGHTING_PLANE, 100, offset_const = offset)
glow_overlay.color = weather_color
gen_overlay_cache += glow_overlay

var/mutable_appearance/weather_overlay = mutable_appearance('modular_zubbers/icons/effects/weather_effects.dmi', weather_state, overlay_layer, plane = overlay_plane, offset_const = offset)
weather_overlay.color = weather_color
gen_overlay_cache += weather_overlay

return gen_overlay_cache

/datum/weather/sand_storm/can_get_alert(mob/player)
if(!..())
return FALSE

if(!is_station_level(player.z))
return TRUE // bypass checks

if(isobserver(player))
return TRUE

if(HAS_MIND_TRAIT(player, TRAIT_DETECT_STORM))
return TRUE

if(istype(get_area(player), /area/mine))
return TRUE


for(var/area/snow_area in impacted_areas)
if(locate(snow_area) in view(player))
return TRUE

return FALSE

/mob/Login()
. = ..()
if(.)
AddElement(/datum/element/weather_listener, /datum/weather/sand_storm, ZTRAIT_SANDSTORM, GLOB.ash_storm_sounds)
28 changes: 0 additions & 28 deletions modular_zubbers/code/game/area/areas/burgerstation.dm

This file was deleted.

Loading

0 comments on commit 2713e00

Please sign in to comment.