mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 01:57:01 +00:00
-Centcom announcement proc merged with generic priority announcement proc -Re-added the Captain Announces accompanied by a new pleasant sound, instead of the generic priority announcement -Captain Announcements will automatically generate a newscaster article -Priority announcements without any defined accompanying sound will play a generic "Attention" soundbyte as an audio cue -Communications consoles will display who is currently logged in
77 lines
3.0 KiB
Plaintext
77 lines
3.0 KiB
Plaintext
/datum/round_event_control/anomaly/anomaly_bluespace
|
|
name = "Bluespace Anomaly"
|
|
typepath = /datum/round_event/anomaly/anomaly_bluespace
|
|
max_occurrences = 1
|
|
weight = 5
|
|
|
|
/datum/round_event/anomaly/anomaly_bluespace
|
|
startWhen = 3
|
|
announceWhen = 10
|
|
endWhen = 55
|
|
|
|
|
|
/datum/round_event/anomaly/anomaly_bluespace/announce()
|
|
priority_announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
|
|
|
|
|
/datum/round_event/anomaly/anomaly_bluespace/start()
|
|
var/turf/T = pick(get_area_turfs(impact_area))
|
|
if(T)
|
|
newAnomaly = new /obj/effect/anomaly/bluespace(T.loc)
|
|
|
|
|
|
/datum/round_event/anomaly/anomaly_bluespace/end()
|
|
if(newAnomaly)//If it hasn't been neutralized, it's time to warp half the station away jeez
|
|
var/turf/T = pick(get_area_turfs(impact_area))
|
|
if(T)
|
|
// Calculate new position (searches through beacons in world)
|
|
var/obj/item/device/radio/beacon/chosen
|
|
var/list/possible = list()
|
|
for(var/obj/item/device/radio/beacon/W in world)
|
|
possible += W
|
|
|
|
if(possible.len > 0)
|
|
chosen = pick(possible)
|
|
|
|
if(chosen)
|
|
// Calculate previous position for transition
|
|
|
|
var/turf/FROM = T // the turf of origin we're travelling FROM
|
|
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
|
|
|
|
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
|
|
priority_announce("Massive bluespace translocation detected.", "Anomaly Alert")
|
|
|
|
var/list/flashers = list()
|
|
for(var/mob/living/carbon/human/M in viewers(TO, null))
|
|
if(M:eyecheck() <= 0)
|
|
flick("e_flash", M.flash) // flash dose faggots
|
|
flashers += M
|
|
|
|
var/y_distance = TO.y - FROM.y
|
|
var/x_distance = TO.x - FROM.x
|
|
for (var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
|
|
if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
|
|
if(A.anchored && istype(A, /obj/machinery)) continue
|
|
if(istype(A, /obj/structure/disposalpipe )) continue
|
|
if(istype(A, /obj/structure/cable )) continue
|
|
|
|
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
|
|
if(!A.Move(newloc)) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
|
|
A.loc = locate(A.x + x_distance, A.y + y_distance, TO.z)
|
|
|
|
spawn()
|
|
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
|
|
var/mob/M = A
|
|
if(M.client)
|
|
var/obj/blueeffect = new /obj(src)
|
|
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
|
blueeffect.icon = 'icons/effects/effects.dmi'
|
|
blueeffect.icon_state = "shieldsparkles"
|
|
blueeffect.layer = 17
|
|
blueeffect.mouse_opacity = 0
|
|
M.client.screen += blueeffect
|
|
sleep(20)
|
|
M.client.screen -= blueeffect
|
|
qdel(blueeffect)
|
|
qdel(newAnomaly) |