///////////////////////////////////////////////////////////////////////////////// // RELAY ///////////////////////////////////////////////////////////////////////////////// /obj/flock_structure/relay icon = 'icons/misc/featherzone-160x160.dmi' icon_state = "structure-relay" anchored = 1 density = 1 name = "titanic polyhedron" desc = "The sight of the towering geodesic sphere fills you with dread. A thousand voices whisper to you." flock_id = "Signal Relay Broadcast Amplifier" build_time = 30 health = 5000 bound_width = 160 bound_height = 160 pixel_x = -64 pixel_y = -64 bound_x = -64 bound_y = -64 var/last_time_sound_played_in_seconds = 0 var/sound_length_in_seconds = 27 var/charge_time_length = 600 // also in seconds var/final_charge_time_length = 18 var/col_r = 0.1 var/col_g = 0.7 var/col_b = 0.6 var/datum/light/light var/brightness = 0.5 /obj/flock_structure/relay/New() ..() // start playing sound play_sound() flock_speak(null, "RELAY CONSTRUCTED! DEFEND THE RELAY!!", src.flock) SPAWN_DBG(1 SECOND) radial_flock_conversion(src, 20) /obj/flock_structure/relay/get_desc() var/time_remaining = round(src.charge_time_length - getTimeInSecondsSinceTime(src.time_started)) if(time_remaining > 0) return "
\[[time_remaining] second[s_es(time_remaining)] remaining until broadcast.\]" /obj/flock_structure/relay/building_specific_info() var/time_remaining = round(src.charge_time_length - getTimeInSecondsSinceTime(src.time_started)) if(time_remaining > 0) return "Approximately [time_remaining] second[time_remaining == 1 ? "" : "s"] left until broadcast." else return "BROADCASTING IN PROGRESS" /obj/flock_structure/relay/process() var/elapsed = getTimeInSecondsSinceTime(src.time_started) if(elapsed >= last_time_sound_played_in_seconds + sound_length_in_seconds) play_sound() if(elapsed >= charge_time_length/2) if(icon_state == "structure-relay") icon_state = "structure-relay-glow" // halfway point, start playing radio noises at people too for(var/mob/M in mobs) if(prob(20)) M.playsound_local(M, "sound/effects/radio_sweep[rand(1,5)].ogg", 20, 1) if(prob(50)) boutput(M, "... [radioGarbleText("the signal will set you free")] ...") if(elapsed >= charge_time_length) // IT'S TIME, FINISH IT NOW unleash_the_signal() /obj/flock_structure/relay/proc/play_sound() // reset the sound clock src.last_time_sound_played_in_seconds = getTimeInSecondsSinceTime(src.time_started) var/center_loc = get_turf(src) for(var/mob/M in mobs) M.playsound_local(M, "sound/ambience/spooky/Flock_Reactor.ogg", 35, 0, 2) boutput(M, "You hear something unworldly coming from the [dir2text(get_dir(M, center_loc))]!") /obj/flock_structure/relay/proc/unleash_the_signal() processing_items -= src var/turf/location = get_turf(src) overlays += "structure-relay-sparks" desc = "Your life is flashing before your eyes. Looks like this is the end." flock_speak(null, "!!! TRANSMITTING SIGNAL !!!", src.flock) src.visible_message("[src] begins sparking wildly! The air is charged with static!") for(var/mob/M in mobs) M.playsound_local(M, "sound/misc/flockmind/flock_broadcast_charge.ogg", 60, 0, 2) sleep(final_charge_time_length * 10) // BOOOOOM for(var/mob/M in mobs) M.playsound_local(M, "sound/misc/flockmind/flock_broadcast_kaboom.ogg", 60, 0, 2) M.flash(30) SPAWN_DBG(1 SECOND) emergency_shuttle.incall() emergency_shuttle.can_recall = 0 // yeah centcom's coming no matter what boutput(world, "Alert: The emergency shuttle has been called.") boutput(world, "- - - Reason: Hostile transmission intercepted. Sending emergency shuttle.") boutput(world, "It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.") sleep(20) for(var/x = -2 to 2) for(var/y = -2 to 2) flockdronegibs(locate(location.x + x, location.y + y, location.z)) explosion_new(src, location, 2000) gib(location)