diff --git a/code/modules/background/space_sectors/tauceti.dm b/code/modules/background/space_sectors/tauceti.dm
index 528d9688b90..c465a3268c3 100644
--- a/code/modules/background/space_sectors/tauceti.dm
+++ b/code/modules/background/space_sectors/tauceti.dm
@@ -5,6 +5,7 @@
the Sol Alliance over the loss of such a wealthy system, while Nanotrasen continues to have a heavy hand in all levels of Tau Ceti."
cargo_price_coef = list("nt" = 0.8, "hpi" = 0.8, "zhu" = 0.8, "een" = 1, "get" = 0.8, "arz" = 1, "blm" = 1,
"iac" = 1, "zsc" = 1, "vfc" = 1, "bis" = 0,8, "xmg" = 0.8, "npi" = 0.8)
+ possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/desert)
/datum/space_sector/romanovich
name = SECTOR_ROMANOVICH
@@ -12,6 +13,7 @@
semi-precious metals as well as radioactive elements, the Romanovich Cloud is the source of nearly all the raw materials used within Tau Ceti. The cloud is also one of the few\
sources of Phoron, a volatile but highly-sought after compound, known for its uses in the biomedical and energy industries. Most of the sources of Phoron within the Romanovich \
Cloud are under control of NanoTrasen, which has consequently established many high-tech research facilities in the area in the past few years."
+ possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/snow)
/datum/space_sector/corp_zone
name = SECTOR_CORP_ZONE
@@ -19,3 +21,4 @@
The Zone, or the CRZ, is an area of instability and logistical chaos where once-Alliance colonies exist in relative peace compared to the adjacent Human Wildlands. This is owed to \
two factors: the presence of the lingering Stellar Corporate Conglomerate, and the federal authority of the Republic of Biesel backing them up. Warlords and major antagonistic \
factions (to Biesel) generally refrain from entering these territories to avoid the ire of the Conglomerate, much less the repercussions of engaging its allies."
+ possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/desert)
\ No newline at end of file
diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm
index e757bc62eba..0589167b129 100644
--- a/code/modules/events/brand_intelligence.dm
+++ b/code/modules/events/brand_intelligence.dm
@@ -8,7 +8,7 @@
/datum/event/brand_intelligence/announce()
- command_announcement.Announce("Rampant brand intelligence has been detected aboard the [station_name()]. The origin is believed to be \a \"[initial(originMachine.name)]\" type. Infection of other machines is likely.", "[station_name()] Machine Monitoring" , new_sound = 'sound/AI/brandintelligence.ogg')
+ command_announcement.Announce("Rampant brand intelligence has been detected aboard the [location_name()]. The origin is believed to be \a \"[initial(originMachine.name)]\" type. Infection of other machines is likely.", "[station_name()] Machine Monitoring" , new_sound = 'sound/AI/brandintelligence.ogg')
/datum/event/brand_intelligence/start()
diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm
index 11295714468..fe04239d4af 100644
--- a/code/modules/events/carp_migration.dm
+++ b/code/modules/events/carp_migration.dm
@@ -23,10 +23,10 @@
var/announcement = ""
var/soundfile = 'sound/AI/spacecarp.ogg'
if(severity == EVENT_LEVEL_MAJOR && deploy_drones)
- announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by. The NDV Icarus has dispatched combat drones to assist."
+ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by. The NDV Icarus has dispatched combat drones to assist."
soundfile = 'sound/AI/massivespacecarp.ogg'
else
- announcement = "Unknown biological [length(spawned_carp) == 1 ? "entity has" : "entities have"] been detected near [station_name()], please stand-by.[severity == EVENT_LEVEL_MODERATE ? " The NDV Icarus has dispatched combat drones to assist." : ""]"
+ announcement = "Unknown biological [length(spawned_carp) == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by.[severity == EVENT_LEVEL_MODERATE ? " The NDV Icarus has dispatched combat drones to assist." : ""]"
command_announcement.Announce(announcement, "Lifesign Alert", new_sound = soundfile)
/datum/event/carp_migration/start()
diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm
index ee2273b3881..4bc7fcc4bf1 100644
--- a/code/modules/events/communications_blackout.dm
+++ b/code/modules/events/communications_blackout.dm
@@ -10,9 +10,10 @@
"#4nd%;f4y6,>%-BZZZZZZZT")
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
- to_chat(A, "
")
- to_chat(A, "[alert]")
- to_chat(A, "
")
+ if(A.z in affecting_z)
+ to_chat(A, "
")
+ to_chat(A, "[alert]")
+ to_chat(A, "
")
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
command_announcement.Announce(alert, new_sound = sound('sound/AI/ionospheric.ogg', volume=25))
@@ -22,4 +23,5 @@
/datum/event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in telecomms_list)
- T.emp_act(1)
+ if(T.z in affecting_z)
+ T.emp_act(1)
diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm
index a31079a0801..0812fc8847b 100644
--- a/code/modules/events/electrical_storm.dm
+++ b/code/modules/events/electrical_storm.dm
@@ -1,28 +1,69 @@
/datum/event/electrical_storm
- var/lightsoutAmount = 1
- var/lightsoutRange = 25
+ announceWhen = 0 // Warn them shortly before it begins.
+ startWhen = 30
+ endWhen = 60 // Set in start()
ic_name = "an electrical storm"
+ var/list/valid_apcs
/datum/event/electrical_storm/announce()
- command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert", new_sound = 'sound/AI/electronicoverload.ogg')
+ ..()
+ switch(severity)
+ if(EVENT_LEVEL_MUNDANE)
+ command_announcement.Announce("A minor electrical storm has been detected near the [location_name()]. Please watch out for possible electrical discharges.", "[location_name()] Sensor Array", new_sound = 'sound/AI/electronicoverload.ogg')
+ if(EVENT_LEVEL_MODERATE)
+ command_announcement.Announce("The [location_name()] is about to pass through an electrical storm. Please secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array", new_sound = 'sound/AI/electronicoverload.ogg')
+ if(EVENT_LEVEL_MAJOR)
+ command_announcement.Announce("Alert. A strong electrical storm has been detected in proximity of the [location_name()]. It is recommended to immediately secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array", new_sound = 'sound/AI/electronicoverload.ogg')
/datum/event/electrical_storm/start()
- var/list/epicentreList = list()
+ ..()
+ valid_apcs = list()
+ for(var/obj/machinery/power/apc/A in SSmachinery.all_machines)
+ if(A.z in affecting_z)
+ valid_apcs.Add(A)
+ endWhen = (severity * 60) + startWhen
- for(var/i=1, i <= lightsoutAmount, i++)
- var/list/possibleEpicentres = list()
- for(var/obj/effect/landmark/newEpicentre in landmarks_list)
- if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
- possibleEpicentres += newEpicentre
- if(possibleEpicentres.len)
- epicentreList += pick(possibleEpicentres)
+/datum/event/electrical_storm/start()
+ ..()
+ valid_apcs = list()
+ for(var/obj/machinery/power/apc/A in SSmachinery.all_machines)
+ if(A.z in affecting_z)
+ valid_apcs.Add(A)
+ endWhen = (severity * 60) + startWhen
+
+/datum/event/electrical_storm/tick()
+ ..()
+ if(!valid_apcs.len)
+ CRASH("No valid APCs found for electrical storm event! This is likely a bug.")
+ var/list/picked_apcs = list()
+ for(var/i=0, i< severity*2, i++) // up to 2/4/6 APCs per tick depending on severity
+ picked_apcs |= pick(valid_apcs)
+
+ for(var/obj/machinery/power/apc/T in picked_apcs)
+ // Main breaker is turned off. Consider this APC protected.
+ if(!T.operating)
+ continue
+
+ // Decent chance to overload lighting circuit.
+ if(prob(3 * severity))
+ T.overload_lighting()
+
+ // Relatively small chance to emag the apc as apc_damage event does.
+ if(prob(0.2 * severity))
+ T.emagged = 1
+ T.update_icon()
+
+ if(T.is_critical)
+ T.energy_fail(10 * severity)
+ continue
else
- break
+ T.energy_fail(10 * severity * rand(severity * 2, severity * 4))
- if(!epicentreList.len)
- return
+ // Very tiny chance to completely break the APC. Has a check to ensure we don't break critical APCs such as the Engine room, or AI core. Does not occur on Mundane severity.
+ if(prob((0.2 * severity) - 0.2))
+ T.set_broken()
- for(var/obj/effect/landmark/epicentre in epicentreList)
- for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
- apc.overload_lighting()
+/datum/event/electrical_storm/end()
+ ..()
+ command_announcement.Announce("The [location_name()] has cleared the electrical storm. Please repair any electrical overloads.", "Electrical Storm Alert")
\ No newline at end of file
diff --git a/code/modules/events/event.dm b/code/modules/events/event.dm
index 4f51f2ad71e..e63a47adf17 100644
--- a/code/modules/events/event.dm
+++ b/code/modules/events/event.dm
@@ -58,6 +58,7 @@
var/startedAt = 0 //When this event started.
var/endedAt = 0 //When this event ended.
var/datum/event_meta/event_meta = null
+ var/list/affecting_z
var/no_fake = 0
//If set to 1, this event will not be picked for false announcements
@@ -174,5 +175,15 @@
SSevents.active_events += src
startedAt = world.time
+ if(!affecting_z)
+ affecting_z = current_map.station_levels
+
setup()
..()
+
+/datum/event/proc/location_name()
+ if(!current_map.use_overmap)
+ return station_name()
+
+ var/obj/effect/overmap/O = map_sectors["[pick(affecting_z)]"]
+ return O ? O.name : "Unknown Location"
\ No newline at end of file
diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm
index 5dc318accf4..96c59bf1c99 100644
--- a/code/modules/events/meteors.dm
+++ b/code/modules/events/meteors.dm
@@ -19,16 +19,16 @@
endWhen = worst_case_end()
/datum/event/meteor_wave/announce()
- command_announcement.Announce(current_map.meteors_detected_message, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
+ command_announcement.Announce(current_map.meteors_detected_message, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg', zlevels = affecting_z)
/datum/event/meteor_wave/start()
- command_announcement.Announce(current_map.meteor_contact_message, "Meteor Alert")
+ command_announcement.Announce(current_map.meteor_contact_message, "Meteor Alert", zlevels = affecting_z)
/datum/event/meteor_wave/end(var/faked)
if(faked)
return
spawn(100)//We give 10 seconds before announcing, for the last wave of meteors to hit the station
- command_announcement.Announce(current_map.meteor_end_message, "Meteor Alert")
+ command_announcement.Announce(current_map.meteor_end_message, "Meteor Alert", zlevels = affecting_z)
/datum/event/meteor_wave/tick()
@@ -40,7 +40,7 @@
/datum/event/meteor_wave/proc/send_wave()
var/pick_side = prob(80) ? start_side : (prob(50) ? turn(start_side, 90) : turn(start_side, -90))
- spawn() spawn_meteors(get_wave_size(), get_meteors(), pick_side, pick(current_map.meteor_levels))
+ spawn() spawn_meteors(get_wave_size(), get_meteors(), pick_side, pick(affecting_z))
next_meteor += rand(next_meteor_lower, next_meteor_upper) / severity
waves--
endWhen = worst_case_end()
@@ -102,16 +102,16 @@
return downed_ship_meteors
/datum/event/meteor_wave/downed_ship/announce()
- command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert", new_sound = 'sound/AI/unknownvesseldowned.ogg')
+ command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert", new_sound = 'sound/AI/unknownvesseldowned.ogg', zlevels = affecting_z)
/datum/event/meteor_wave/downed_ship/start()
- command_announcement.Announce(current_map.ship_meteor_contact_message, "Ship Debris Alert")
+ command_announcement.Announce(current_map.ship_meteor_contact_message, "Ship Debris Alert", zlevels = affecting_z)
/datum/event/meteor_wave/downed_ship/end(var/faked)
if(faked)
return
spawn(100)//We give 10 seconds before announcing, for the last wave of meteors to hit the station
- command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert")
+ command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert", zlevels = affecting_z)
/datum/event/meteor_wave/overmap
next_meteor_lower = 5
@@ -121,6 +121,9 @@
/datum/event/meteor_wave/overmap/announce()
return
+/datum/event/meteor_wave/get_wave_size()
+ return INFINITY
+
/datum/event/meteor_wave/dust
ic_name = "a dust belt"
@@ -146,3 +149,6 @@
/datum/event/meteor_wave/dust/overmap/announce()
return
+
+/datum/event/meteor_wave/get_wave_size()
+ return INFINITY
\ No newline at end of file
diff --git a/code/modules/overmap/events/event.dm b/code/modules/overmap/events/event.dm
index bf2f5b98b33..c571c3d46d7 100644
--- a/code/modules/overmap/events/event.dm
+++ b/code/modules/overmap/events/event.dm
@@ -74,6 +74,7 @@
var/datum/event/E = new event_type(EM)
E.startWhen = 0
E.endWhen = INFINITY
+ E.affecting_z = ship.map_z
if("victim" in E.vars)//for meteors and other overmap events that uses ships//might need a better solution
E.vars["victim"] = ship
LAZYADD(ship_events[ship], E)
diff --git a/maps/sccv_horizon/code/sccv_horizon.dm b/maps/sccv_horizon/code/sccv_horizon.dm
index 713ba77b0ba..82239f62ae1 100644
--- a/maps/sccv_horizon/code/sccv_horizon.dm
+++ b/maps/sccv_horizon/code/sccv_horizon.dm
@@ -33,6 +33,9 @@
command_spawn_message = "Welcome to the SCCV Horizon!"
use_overmap = TRUE
+ num_exoplanets = 2
+ planet_size = list(50,50)
+ overmap_event_areas = 15
station_networks = list(
NETWORK_COMMAND,