mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Overmap Announcements Overhaul (#16460)
* Overmap Announcements * overdoing it a little * update cl * whoops
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
var/datum/trade_destination/affected_dest
|
||||
|
||||
/datum/event/economic_event/start()
|
||||
..()
|
||||
|
||||
affected_dest = pickweight(weighted_randomevent_locations)
|
||||
if(affected_dest.viable_random_events.len)
|
||||
endWhen = rand(60,300)
|
||||
@@ -93,6 +95,8 @@
|
||||
SSnews.SubmitArticle(body, author, ch, null, 1)
|
||||
|
||||
/datum/event/economic_event/end()
|
||||
..()
|
||||
|
||||
for(var/good_type in dearer_goods)
|
||||
affected_dest.temp_price_change[good_type] = 1
|
||||
for(var/good_type in cheaper_goods)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/datum/event/apc_damage
|
||||
var/apcSelectionRange = 25
|
||||
no_fake = 1
|
||||
|
||||
/datum/event/apc_damage/start()
|
||||
..()
|
||||
|
||||
var/obj/machinery/power/apc/A = acquire_random_apc()
|
||||
|
||||
var/severity_range = 0
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
ic_name = "a biohazard"
|
||||
|
||||
/datum/event/blob/announce()
|
||||
level_seven_announcement()
|
||||
level_seven_announcement(affecting_z)
|
||||
|
||||
/datum/event/blob/start()
|
||||
..()
|
||||
|
||||
var/turf/T = pick_subarea_turf(/area/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
|
||||
if(!T)
|
||||
log_and_message_admins("Blob failed to find a viable turf.")
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
|
||||
|
||||
/datum/event/brand_intelligence/announce()
|
||||
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')
|
||||
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', zlevels = affecting_z)
|
||||
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
..()
|
||||
|
||||
for(var/obj/machinery/vending/V in SSmachinery.processing)
|
||||
if(isNotStationLevel(V.z)) continue
|
||||
vendingMachines.Add(V)
|
||||
@@ -53,6 +55,8 @@
|
||||
)
|
||||
|
||||
/datum/event/brand_intelligence/end(var/faked)
|
||||
..()
|
||||
|
||||
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
|
||||
infectedMachine.shut_up = 1
|
||||
infectedMachine.shoot_inventory = 0
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/datum/event/camera_damage/start()
|
||||
..()
|
||||
|
||||
var/obj/machinery/camera/C = acquire_random_camera()
|
||||
if(!C)
|
||||
return
|
||||
|
||||
@@ -20,19 +20,18 @@
|
||||
despawn_turfs = typecacheof(despawn_turfs)
|
||||
|
||||
/datum/event/carp_migration/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
var/announcement = ""
|
||||
var/soundfile = 'sound/AI/carp_migration.ogg'
|
||||
if(severity == EVENT_LEVEL_MAJOR && deploy_drones)
|
||||
announcement = "A massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
soundfile = 'sound/AI/massivespacecarp.ogg'
|
||||
else
|
||||
announcement = "Unknown biological [length(spawned_carp) == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert", new_sound = soundfile)
|
||||
break
|
||||
var/announcement = ""
|
||||
var/soundfile = 'sound/AI/carp_migration.ogg'
|
||||
if(severity == EVENT_LEVEL_MAJOR && deploy_drones)
|
||||
announcement = "A massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
soundfile = 'sound/AI/massivespacecarp.ogg'
|
||||
else
|
||||
announcement = "Unknown biological [length(spawned_carp) == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert", new_sound = soundfile, zlevels = affecting_z)
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
..()
|
||||
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
spawn_fish(length(GLOB.landmarks_list), spawn_drones = deploy_drones)
|
||||
spawn_caverndweller(length(GLOB.landmarks_list), spawn_drones = deploy_drones)
|
||||
@@ -95,6 +94,8 @@
|
||||
i++
|
||||
|
||||
/datum/event/carp_migration/end(var/faked)
|
||||
..()
|
||||
|
||||
for (var/carp_ref in spawned_carp)
|
||||
var/datum/weakref/carp_weakref = carp_ref
|
||||
var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve()
|
||||
@@ -102,13 +103,12 @@
|
||||
qdel(fish)
|
||||
|
||||
/datum/event/carp_migration/cozmo/start()
|
||||
..()
|
||||
|
||||
spawn_fish(7, 3, 5)
|
||||
|
||||
/datum/event/carp_migration/cozmo/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce("A migration of non-hostile entities has been detected near the ship.", "Lifesign Alert", 'sound/AI/cozmo_migration.ogg')
|
||||
break
|
||||
command_announcement.Announce("A migration of non-hostile entities has been detected near the ship.", "Lifesign Alert", 'sound/AI/cozmo_migration.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/carp_migration/cozmo/spawn_fish(var/num_groups, var/group_size_min = 3, var/group_size_max = 5, var/spawn_drones = FALSE)
|
||||
set waitfor = FALSE
|
||||
@@ -132,6 +132,10 @@
|
||||
despawn_turfs = list(/turf/space)
|
||||
deploy_drones = FALSE
|
||||
|
||||
/datum/event/carp_migration/overmap/setup_for_overmap(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard)
|
||||
. = ..()
|
||||
if(!announce_to_sensor_console)
|
||||
announceWhen = 0
|
||||
|
||||
/datum/event/carp_migration/overmap/setup()
|
||||
announceWhen = 1
|
||||
despawn_turfs = typecacheof(despawn_turfs)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
no_fake = 1
|
||||
|
||||
/datum/event/ccia_general_notice/start()
|
||||
..()
|
||||
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
LOG_DEBUG("CCIA Autoamtic General Notice - Could not establish database connection")
|
||||
return
|
||||
@@ -18,4 +20,4 @@
|
||||
|
||||
/datum/event/ccia_general_notice/announce()
|
||||
if(announce)
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1);
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1)
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
to_chat(A, "<br>")
|
||||
|
||||
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)
|
||||
command_announcement.Announce(alert, zlevels = affecting_z)
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
..()
|
||||
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
if(T.z in affecting_z)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
|
||||
@@ -19,32 +19,32 @@
|
||||
return res
|
||||
|
||||
/datum/event/electrical_storm/announce()
|
||||
..()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
break
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
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/electrical_storm.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/electrical_storm/start()
|
||||
..()
|
||||
/datum/event/electrical_storm/setup()
|
||||
valid_apcs = list()
|
||||
for(var/obj/machinery/power/apc/A in SSmachinery.machinery)
|
||||
if(A.z in affecting_z && !A.is_critical)
|
||||
valid_apcs.Add(A)
|
||||
if(!valid_apcs.len)
|
||||
kill(TRUE)
|
||||
if((A.z in affecting_z) && !A.is_critical)
|
||||
valid_apcs += A
|
||||
endWhen = (severity * 60) + startWhen
|
||||
|
||||
/datum/event/electrical_storm/end(faked)
|
||||
..()
|
||||
|
||||
valid_apcs = null
|
||||
|
||||
/datum/event/electrical_storm/tick()
|
||||
..()
|
||||
if(!valid_apcs.len)
|
||||
CRASH("No valid APCs found for electrical storm event! This is likely a bug.")
|
||||
|
||||
if(!length(valid_apcs))
|
||||
return
|
||||
|
||||
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)
|
||||
@@ -69,10 +69,7 @@
|
||||
if(prob((0.2 * severity) - 0.2))
|
||||
T.set_broken()
|
||||
|
||||
/datum/event/electrical_storm/end()
|
||||
..()
|
||||
valid_apcs = null
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce("The [location_name()] has cleared the electrical storm. Please repair any electrical overloads.", "Electrical Storm Alert", zlevels = affecting_z)
|
||||
break
|
||||
/datum/event/electrical_storm/announce_end()
|
||||
. = ..()
|
||||
if(.)
|
||||
command_announcement.Announce("The [location_name()] has cleared the electrical storm. Please repair any electrical overloads.", "Electrical Storm Alert", zlevels = affecting_z)
|
||||
|
||||
@@ -90,6 +90,8 @@
|
||||
//used for events that run secondary announcements, like releasing maint access.
|
||||
|
||||
var/has_skybox_image = FALSE
|
||||
var/obj/effect/overmap/visitable/ship/affected_ship
|
||||
var/announce_to_sensor_console = FALSE
|
||||
|
||||
/datum/event/nothing
|
||||
no_fake = 1
|
||||
@@ -105,9 +107,10 @@
|
||||
//Allows you to start before announcing or vice versa.
|
||||
//Only called once.
|
||||
/datum/event/proc/start()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(has_skybox_image)
|
||||
SSskybox.rebuild_skyboxes(affecting_z)
|
||||
return
|
||||
announce_start()
|
||||
|
||||
//Called when the tick is equal to the announceWhen variable.
|
||||
//Allows you to announce before starting or vice versa.
|
||||
@@ -115,6 +118,18 @@
|
||||
/datum/event/proc/announce()
|
||||
return
|
||||
|
||||
/datum/event/proc/announce_start()
|
||||
if(announce_to_sensor_console)
|
||||
send_sensor_message("Entering [ic_name].")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/event/proc/announce_end(var/faked)
|
||||
if(announce_to_sensor_console)
|
||||
send_sensor_message("Exiting [ic_name].")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//Called on or after the tick counter is equal to startWhen.
|
||||
//You can include code related to your event or add your own
|
||||
//time stamped events.
|
||||
@@ -129,8 +144,9 @@
|
||||
//For example: if(activeFor == myOwnVariable + 30) doStuff()
|
||||
//Only called once.
|
||||
//faked indicates this is a false alarm. Used to prevent announcements and other things from happening during false alarms.
|
||||
/datum/event/proc/end()
|
||||
return
|
||||
/datum/event/proc/end(var/faked)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
announce_end(faked)
|
||||
|
||||
//Returns the latest point of event processing.
|
||||
/datum/event/proc/lastProcessAt()
|
||||
@@ -181,7 +197,7 @@
|
||||
SSevents.event_complete(src)
|
||||
|
||||
|
||||
/datum/event/New(var/datum/event_meta/EM = null, var/is_dummy = 0)
|
||||
/datum/event/New(var/datum/event_meta/EM = null, var/is_dummy = 0, var/obj/effect/overmap/visitable/ship/overmap_ship, var/obj/effect/overmap/event/overmap_hazard)
|
||||
dummy = is_dummy
|
||||
event_meta = EM
|
||||
if (event_meta)
|
||||
@@ -193,14 +209,18 @@
|
||||
|
||||
if (dummy)
|
||||
return
|
||||
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
|
||||
SSevents.active_events += src
|
||||
startedAt = world.time
|
||||
|
||||
setup()
|
||||
if(overmap_ship && overmap_hazard)
|
||||
setup_for_overmap(overmap_ship, overmap_hazard)
|
||||
|
||||
if(!affecting_z)
|
||||
affecting_z = current_map.station_levels
|
||||
|
||||
setup()
|
||||
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
|
||||
SSevents.active_events += src
|
||||
startedAt = world.time
|
||||
|
||||
..()
|
||||
|
||||
/datum/event/proc/location_name()
|
||||
@@ -212,3 +232,17 @@
|
||||
|
||||
/datum/event/proc/get_skybox_image()
|
||||
return
|
||||
|
||||
/datum/event/proc/setup_for_overmap(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard)
|
||||
startWhen = 0
|
||||
endWhen = INFINITY
|
||||
affecting_z = ship.map_z
|
||||
affected_ship = ship
|
||||
announce_to_sensor_console = istype(ship, /obj/effect/overmap/visitable/ship/landable)
|
||||
if(announce_to_sensor_console)
|
||||
announceWhen = -1
|
||||
ic_name = hazard.name
|
||||
|
||||
/datum/event/proc/send_sensor_message(var/message)
|
||||
for(var/obj/machinery/computer/ship/sensors/console in affected_ship.consoles)
|
||||
console.display_message(message)
|
||||
|
||||
@@ -214,7 +214,10 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_SURGEON = 25)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 100),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 50, list(ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_JANITOR = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 100),
|
||||
// see comment at code/modules/events/gravity.dm
|
||||
// tl;dr gravity is handled globally, meaning if the horizon loses gravity, everyone does
|
||||
// this needs to be fixed before we can uncomment this
|
||||
// new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 100),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 45, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 6, ASSIGNMENT_SCIENTIST = 6)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 15, ASSIGNMENT_CYBORG = 20), TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Containment Error - Xenobiology", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENTIST = 15, ASSIGNMENT_CYBORG = 20), TRUE),
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
|
||||
/datum/event/false_alarm/end(var/faked)
|
||||
..()
|
||||
|
||||
command_announcement.Announce("Error, It appears our previous announcement about [eventname] was a sensor glitch. There is no cause for alarm, please return to your stations.", "False Alarm", new_sound = 'sound/AI/falsealarm.ogg', zlevels = affecting_z)
|
||||
if(two_part)
|
||||
E.end() //This does not return TRUE for var/faked because two-part events like radiation storms need to do things such as revoking maint access
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
endWhen = rand(15, 60)
|
||||
|
||||
/datum/event/gravity/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce("Feedback surge detected in the gravity generation systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes.", "Gravity Failure", zlevels = affecting_z)
|
||||
break
|
||||
command_announcement.Announce("Feedback surge detected in the gravity generation systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes.", "Gravity Failure", zlevels = affecting_z)
|
||||
|
||||
/datum/event/gravity/start()
|
||||
..()
|
||||
|
||||
// TO-DO: I'm not gonna touch this can of worms right now, but this effectively means that gravity is global for everyone,
|
||||
// meaning, if the horizon loses gravity, EVERYONE DOES. this seriously needs to be fixed, and i'm commenting out the gravity flux event until that is done
|
||||
GLOB.gravity_is_on = 0
|
||||
for(var/A in SSmachinery.gravity_generators)
|
||||
var/obj/machinery/gravity_generator/main/B = A
|
||||
if(B.z in affecting_z)
|
||||
B.eventshutofftoggle()
|
||||
for(var/obj/machinery/gravity_generator/main/generator in SSmachinery.gravity_generators)
|
||||
if(generator.z in affecting_z)
|
||||
generator.eventshutofftoggle()
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
no_fake = 1
|
||||
|
||||
/datum/event/grid_check/start()
|
||||
..()
|
||||
|
||||
power_failure(0, severity)
|
||||
|
||||
/datum/event/grid_check/announce()
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
choose_mobs()
|
||||
|
||||
/datum/event/infestation/start()
|
||||
..()
|
||||
|
||||
spawn_mobs()
|
||||
|
||||
/datum/event/infestation/proc/choose_area()
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
var/botEmagChance = 0.5
|
||||
var/list/players = list()
|
||||
var/cloud_hueshift
|
||||
var/station_level = FALSE //Is this event happening on a station level?
|
||||
no_fake = 1
|
||||
has_skybox_image = TRUE
|
||||
|
||||
@@ -15,32 +14,28 @@
|
||||
res.blend_mode = BLEND_ADD
|
||||
return res
|
||||
|
||||
|
||||
/datum/event/ionstorm/setup()
|
||||
//Need to make sure that a ghost role ship doesn't trigger stuff on the main map
|
||||
if(!current_map.use_overmap)
|
||||
station_level = TRUE
|
||||
else
|
||||
for(var/zlevel in affecting_z)
|
||||
if(isStationLevel(zlevel))
|
||||
station_level = TRUE
|
||||
break
|
||||
|
||||
/datum/event/ionstorm/announce()
|
||||
endWhen = rand(1500, 2000) //Since nothing gets reset at the end of this law, this mostly just prevents it from happening too often
|
||||
|
||||
//Only give an ion law/mess with spam filters if it's the station ship that passed through the storm
|
||||
if(station_level)
|
||||
give_ion_law()
|
||||
give_ion_law()
|
||||
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
MS.spamfilter.Cut()
|
||||
var/filter_num = rand(1, MS.spamfilter_limit)
|
||||
for (var/i = 1, i <= filter_num, i++)
|
||||
MS.spamfilter += pick("maint","NT","Heph","Idris","Zavod","SCC","drugs", "[current_map.station_short]", \
|
||||
"PMCG","Zeng","Goddess","fek","Pun Pun","monkey","Ian","Crusher","Ginny","message","spam",\
|
||||
"director", "Hello", "Hi!", "filter","crate","Canary","Intrepid", "Command", "thrusters",\
|
||||
"slime", "Solarian", "phoron", "RCON")
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
if(!(MS.z in affecting_z))
|
||||
continue
|
||||
MS.spamfilter.Cut()
|
||||
var/filter_num = rand(1, MS.spamfilter_limit)
|
||||
for (var/i = 1, i <= filter_num, i++)
|
||||
MS.spamfilter += pick("maint","NT","Heph","Idris","Zavod","SCC","drugs", "[current_map.station_short]", \
|
||||
"PMCG","Zeng","Goddess","fek","Pun Pun","monkey","Ian","Crusher","Ginny","message","spam",\
|
||||
"director", "Hello", "Hi!", "filter","crate","Canary","Intrepid", "Command", "thrusters",\
|
||||
"slime", "Solarian", "phoron", "RCON")
|
||||
|
||||
/datum/event/ionstorm/announce_end(var/faked)
|
||||
. = ..()
|
||||
if(.)
|
||||
spawn(rand(5000,8000))
|
||||
if(prob(50))
|
||||
ion_storm_announcement(affecting_z)
|
||||
|
||||
/datum/event/ionstorm/tick()
|
||||
if(botEmagChance)
|
||||
@@ -48,21 +43,19 @@
|
||||
if(prob(botEmagChance) && (bot.z in affecting_z))
|
||||
bot.emag_act(1)
|
||||
|
||||
/datum/event/ionstorm/end(var/faked)
|
||||
..()
|
||||
spawn(rand(5000,8000))
|
||||
if(prob(50) && station_level)
|
||||
ion_storm_announcement()
|
||||
|
||||
/datum/event/ionstorm/proc/give_ion_law()
|
||||
for(var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
if( !player.mind || player_is_antag(player.mind, only_offstation_roles = TRUE) || player.client.inactivity > MinutesToTicks(10))
|
||||
var/turf/player_turf = get_turf(player)
|
||||
if(!(player_turf.z in affecting_z))
|
||||
continue
|
||||
var/turf/p_loc = get_turf(player)
|
||||
if(isStationLevel(p_loc.z)) //Only choose those who are on station. Should stop from selecting ghost roles.
|
||||
players += player.real_name
|
||||
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = TRUE) || player.client.inactivity > MinutesToTicks(10))
|
||||
continue
|
||||
players += player.real_name
|
||||
|
||||
for(var/mob/living/silicon/ai/target in GLOB.silicon_mob_list)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!(target_turf.z in affecting_z))
|
||||
continue
|
||||
var/random_player = "The Captain"
|
||||
if(length(players))
|
||||
random_player = pick(players) //Random player's name, to be used in laws.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/datum/event/rogue_maint_drones/start()
|
||||
..()
|
||||
|
||||
var/drons = severity * 2 - 1
|
||||
var/groups = rand(3, 8)
|
||||
|
||||
|
||||
@@ -25,27 +25,22 @@
|
||||
endWhen = worst_case_end()
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce(current_map.meteors_detected_message, "Meteor Alert", new_sound = 'sound/AI/meteors_detected_message.ogg', zlevels = affecting_z)
|
||||
break
|
||||
command_announcement.Announce(current_map.meteors_detected_message, "Meteor Alert", new_sound = 'sound/AI/meteors_detected_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/start()
|
||||
..()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce(current_map.meteor_contact_message, "Meteor Alert", zlevels = affecting_z)
|
||||
break
|
||||
/datum/event/meteor_wave/announce_start()
|
||||
. = ..()
|
||||
if(.)
|
||||
command_announcement.Announce(current_map.meteor_contact_message, "Meteor Alert", zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/end(var/faked)
|
||||
..()
|
||||
/datum/event/meteor_wave/announce_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", zlevels = affecting_z)
|
||||
. = ..()
|
||||
if(.)
|
||||
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", zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/tick()
|
||||
|
||||
if(waves && activeFor >= next_meteor)
|
||||
send_wave()
|
||||
|
||||
@@ -79,19 +74,20 @@
|
||||
return SSatlas.current_sector.downed_ship_meteors
|
||||
|
||||
/datum/event/meteor_wave/downed_ship/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert", new_sound = 'sound/AI/meteor_end_message.ogg', zlevels = affecting_z)
|
||||
break
|
||||
command_announcement.Announce(current_map.ship_meteor_end_message, "Ship Debris Alert", new_sound = 'sound/AI/meteor_end_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/downed_ship/start()
|
||||
command_announcement.Announce(current_map.ship_meteor_contact_message, "Ship Debris Alert", new_sound = 'sound/AI/meteor_contact_message.ogg', zlevels = affecting_z)
|
||||
/datum/event/meteor_wave/downed_ship/announce_start()
|
||||
. = ..()
|
||||
if(.)
|
||||
command_announcement.Announce(current_map.ship_meteor_contact_message, "Ship Debris Alert", new_sound = 'sound/AI/meteor_contact_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/downed_ship/end(var/faked)
|
||||
/datum/event/meteor_wave/downed_ship/announce_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", new_sound = 'sound/AI/meteor_end_message.ogg', zlevels = affecting_z)
|
||||
. = ..()
|
||||
if(.)
|
||||
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", new_sound = 'sound/AI/meteor_end_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/overmap
|
||||
next_meteor_lower = 5
|
||||
@@ -101,23 +97,25 @@
|
||||
/datum/event/meteor_wave/overmap/announce()
|
||||
return
|
||||
|
||||
|
||||
/datum/event/meteor_wave/dust
|
||||
ic_name = "a dust belt"
|
||||
|
||||
/datum/event/meteor_wave/dust/announce()
|
||||
for (var/zlevel in affecting_z)
|
||||
if(zlevel in current_map.station_levels)
|
||||
command_announcement.Announce(current_map.dust_detected_message, "Dust Belt Alert", new_sound = 'sound/AI/dust_detected_message.ogg', zlevels = affecting_z)
|
||||
break
|
||||
command_announcement.Announce(current_map.dust_detected_message, "Dust Belt Alert", new_sound = 'sound/AI/dust_detected_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/dust/start()
|
||||
command_announcement.Announce(current_map.dust_contact_message, "Dust Belt Alert", new_sound = 'sound/AI/dust_contact_message.ogg', zlevels = affecting_z)
|
||||
/datum/event/meteor_wave/dust/announce_start()
|
||||
. = ..()
|
||||
if(.)
|
||||
command_announcement.Announce(current_map.dust_contact_message, "Dust Belt Alert", new_sound = 'sound/AI/dust_contact_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/dust/end(var/faked)
|
||||
/datum/event/meteor_wave/dust/announce_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.dust_end_message, "Dust Belt Alert", , new_sound = 'sound/AI/dust_end_message.ogg', zlevels = affecting_z)
|
||||
. = ..()
|
||||
if(.)
|
||||
spawn(100)//We give 10 seconds before announcing, for the last wave of meteors to hit the station
|
||||
command_announcement.Announce(current_map.dust_end_message, "Dust Belt Alert", , new_sound = 'sound/AI/dust_end_message.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/meteor_wave/dust/get_meteors()
|
||||
return SSatlas.current_sector.meteors_dust
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
if(!MS.use_power) continue
|
||||
if(!MS.use_power || !(MS.z in affecting_z))
|
||||
continue
|
||||
MS.send_rc_message("Executive Officer's Desk", my_department, message, "", "", 2)
|
||||
|
||||
|
||||
@@ -32,6 +33,8 @@
|
||||
endWhen = activeFor + 10
|
||||
|
||||
/datum/event/money_hacker/end(var/faked)
|
||||
..()
|
||||
|
||||
var/message
|
||||
if(affected_account && !affected_account.suspended && !faked)
|
||||
//hacker wins
|
||||
@@ -62,5 +65,6 @@
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
if(!MS.use_power) continue
|
||||
if(!MS.use_power || !(MS.z in affecting_z))
|
||||
continue
|
||||
MS.send_rc_message("Executive Officer's Desk", my_department, message, "", "", 2)
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
var/deposit_success = 0
|
||||
|
||||
/datum/event/money_lotto/start()
|
||||
..()
|
||||
|
||||
winner_sum = pick(1, 50, 100, 500, 1000, 2000, 5000)
|
||||
if(SSeconomy.all_money_accounts.len)
|
||||
var/datum/money_account/D = SSeconomy.get_account(pick(SSeconomy.all_money_accounts))
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
..()
|
||||
|
||||
for(var/area/A in GLOB.the_station_areas)
|
||||
if(is_type_in_list(A,areaType) && !is_type_in_list(A,areaNotType))
|
||||
areas += A
|
||||
@@ -69,5 +71,7 @@
|
||||
|
||||
|
||||
/datum/event/prison_break/end(var/faked)
|
||||
..()
|
||||
|
||||
for(var/area/A in shuffle(areas))
|
||||
A.prison_break()
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
return
|
||||
|
||||
/datum/event/random_antag/start()
|
||||
..()
|
||||
|
||||
var/list/valid_types = list()
|
||||
for(var/antag_type in GLOB.all_antag_types)
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
spawner = SSghostroles.get_spawner(spawner_name)
|
||||
|
||||
/datum/event/rescue_pod/start()
|
||||
..()
|
||||
|
||||
if(istype(spawner))
|
||||
spawner.enable()
|
||||
|
||||
@@ -27,5 +29,7 @@
|
||||
..()
|
||||
|
||||
/datum/event/rescue_pod/burglar/start()
|
||||
..()
|
||||
|
||||
if(istype(spawner))
|
||||
spawner.enable()
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
ic_name = "combat drones"
|
||||
|
||||
/datum/event/rogue_drone/start()
|
||||
..()
|
||||
|
||||
//spawn them at the same place as carp
|
||||
var/list/possible_spawns = list()
|
||||
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
|
||||
@@ -26,9 +28,11 @@
|
||||
our_sound = possible_sounds[message_index]
|
||||
else
|
||||
our_sound = possible_sounds[1]
|
||||
command_announcement.Announce(message, "Rogue Drone Alert", new_sound = our_sound)
|
||||
command_announcement.Announce(message, "Rogue Drone Alert", new_sound = our_sound, zlevels = affecting_z)
|
||||
|
||||
/datum/event/rogue_drone/end(var/faked)
|
||||
..()
|
||||
|
||||
var/num_recovered = 0
|
||||
for(var/drone in drones_list)
|
||||
var/mob/living/simple_animal/hostile/icarus_drone/malf/D = drone
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
ic_name = "a biohazard"
|
||||
|
||||
/datum/event/spacevine/start()
|
||||
..()
|
||||
|
||||
spacevine_infestation()
|
||||
spacevines_spawned = 1
|
||||
|
||||
/datum/event/spacevine/announce()
|
||||
level_seven_announcement()
|
||||
level_seven_announcement(affecting_z)
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
..()
|
||||
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSmachinery.processing)
|
||||
if(!temp_vent.welded && temp_vent.network && isStationLevel(temp_vent.loc.z))
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
no_fake = 1
|
||||
|
||||
/datum/event/spontaneous_appendicitis/start()
|
||||
..()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
|
||||
if((H.client && H.stat != DEAD) && (!player_is_antag(H.mind)))
|
||||
var/obj/item/organ/internal/appendix/A = H.internal_organs_by_name[BP_APPENDIX]
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
announceWhen = rand(0,80)
|
||||
|
||||
/datum/event/supply_drop/start()
|
||||
..()
|
||||
|
||||
var/rarity = 4
|
||||
var/quantity = rand(10,25)
|
||||
|
||||
|
||||
@@ -6,5 +6,7 @@
|
||||
spawner = SSghostroles.get_spawner("visitor")
|
||||
|
||||
/datum/event/visitor/start()
|
||||
..()
|
||||
|
||||
if(istype(spawner))
|
||||
spawner.enable()
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
command_announcement.Announce("Harmful fungi detected at coordinates ([origin_turf.x], [origin_turf.y], [origin_turf.z]). The structure may be contaminated.", "Biohazard Alert", new_sound = 'sound/AI/fungi.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/wallrot/start()
|
||||
..()
|
||||
|
||||
handle_wallrot()
|
||||
|
||||
/datum/event/wallrot/proc/handle_wallrot()
|
||||
set waitfor = FALSE
|
||||
|
||||
// 100 attempts
|
||||
|
||||
@@ -71,12 +71,7 @@
|
||||
if(is_event_active(ship,event_type, hazard.difficulty))//event's already active, don't bother
|
||||
continue
|
||||
var/datum/event_meta/EM = new(hazard.difficulty, "Overmap event - [hazard.name]", event_type, add_to_queue = FALSE, is_one_shot = TRUE)
|
||||
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
|
||||
var/datum/event/E = new event_type(EM, FALSE, ship, hazard)
|
||||
LAZYADD(ship_events[ship], E)
|
||||
|
||||
/singleton/overmap_event_handler/proc/stop_hazard(var/obj/effect/overmap/visitable/ship/ship, var/obj/effect/overmap/event/hazard)
|
||||
@@ -297,10 +292,12 @@
|
||||
opacity = 1
|
||||
difficulty = EVENT_LEVEL_MAJOR
|
||||
|
||||
/obj/effect/overmap/event/gravity
|
||||
name = "dark matter influx"
|
||||
events = list(/datum/event/gravity)
|
||||
can_be_destroyed = FALSE
|
||||
// see comment at code/modules/events/gravity.dm
|
||||
// tl;dr gravity is handled globally, meaning if the horizon loses gravity, everyone does
|
||||
// /obj/effect/overmap/event/gravity
|
||||
// name = "dark matter influx"
|
||||
// events = list(/datum/event/gravity)
|
||||
// can_be_destroyed = FALSE
|
||||
|
||||
//These now are basically only used to spawn hazards. Will be useful when we need to spawn group of moving hazards
|
||||
/datum/overmap_event
|
||||
@@ -352,8 +349,11 @@
|
||||
opacity = 1
|
||||
hazards = /obj/effect/overmap/event/carp/major
|
||||
|
||||
/datum/overmap_event/gravity
|
||||
name = "dark matter influx"
|
||||
count = 12
|
||||
radius = 4
|
||||
hazards = /obj/effect/overmap/event/gravity
|
||||
// see comment at code/modules/events/gravity.dm
|
||||
// tl;dr gravity is handled globally, meaning if the horizon loses gravity, everyone does
|
||||
// this needs to be fixed before we can uncomment this
|
||||
// /datum/overmap_event/gravity
|
||||
// name = "dark matter influx"
|
||||
// count = 12
|
||||
// radius = 4
|
||||
// hazards = /obj/effect/overmap/event/gravity
|
||||
|
||||
@@ -80,6 +80,11 @@
|
||||
else if(sound_token)
|
||||
QDEL_NULL(sound_token)
|
||||
|
||||
/obj/machinery/computer/ship/sensors/proc/display_message(var/message)
|
||||
if(OPERABLE(src))
|
||||
playsound(src, 'sound/machines/triplebeep.ogg', 50)
|
||||
visible_message(SPAN_NOTICE("\The [src] beeps, [SPAN_ITALIC("\"" + message + "\"")]"))
|
||||
|
||||
/obj/machinery/computer/ship/sensors/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
are advised to cease any sensitive activities and report to medical personnel in case of damage.", \
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/nightlight_old.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/psi/end()
|
||||
priority_announcement.Announce( \
|
||||
"The psi-disturbance has ended and baseline normality has been re-asserted. \
|
||||
Anything you still can't cope with is therefore your own problem.", \
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/nightlight_old.ogg', zlevels = affecting_z)
|
||||
/datum/event/psi/announce_end()
|
||||
. = ..()
|
||||
if(.)
|
||||
priority_announcement.Announce( \
|
||||
"The psi-disturbance has ended and baseline normality has been re-asserted. \
|
||||
Anything you still can't cope with is therefore your own problem.", \
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/nightlight_old.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/psi/tick()
|
||||
for(var/thing in SSpsi.processing)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/security_level_old.ogg', zlevels = affecting_z)
|
||||
|
||||
/datum/event/minispasm/start()
|
||||
..()
|
||||
|
||||
var/list/victims = list()
|
||||
for(var/obj/item/device/radio/radio in GLOB.listening_objects)
|
||||
if(radio.is_on())
|
||||
@@ -55,7 +57,9 @@
|
||||
sleep(45)
|
||||
victim.psi.check_psionic_trigger(100, "a psionic scream", redactive = TRUE)
|
||||
|
||||
/datum/event/minispasm/end()
|
||||
command_announcement.Announce( \
|
||||
"PRIORITY ALERT: SIGNAL BROADCAST HAS CEASED. Personnel are cleared to resume use of non-hardened radio transmission equipment. Have a nice day.", \
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/nightlight_old.ogg', zlevels = affecting_z)
|
||||
/datum/event/minispasm/announce_end()
|
||||
. = ..()
|
||||
if(.)
|
||||
command_announcement.Announce( \
|
||||
"PRIORITY ALERT: SIGNAL BROADCAST HAS CEASED. Personnel are cleared to resume use of non-hardened radio transmission equipment. Have a nice day.", \
|
||||
"Nralakk Federation Observation Probe TC-203 Sensor Array", new_sound = 'sound/misc/announcements/nightlight_old.ogg', zlevels = affecting_z)
|
||||
|
||||
Reference in New Issue
Block a user