Merge pull request #322 from Markolie/master

Refactor announcement system, crew monitor overhaul, z-level checks, add portable crew monitor, fixes
This commit is contained in:
ZomgPonies
2015-02-17 14:05:49 -05:00
156 changed files with 1641 additions and 1201 deletions
+32 -2
View File
@@ -82,7 +82,7 @@
// Used to get a sanitized input.
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
var/name = input(user, message, title, default)
return strip_html_simple(name, max_length)
return strip_html_properly(name, max_length)
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
@@ -311,4 +311,34 @@ proc/checkhtml(var/t)
var/new_text = ""
for(var/i = length(text); i > 0; i--)
new_text += copytext(text, i, i+1)
return new_text
return new_text
//This proc strips html properly, but it's not lazy like the other procs.
//This means that it doesn't just remove < and > and call it a day.
//Also limit the size of the input, if specified.
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
var/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(closetag && opentag)
if(closetag < opentag)
input = copytext(input, (closetag + 1))
else
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
else if(closetag || opentag)
if(opentag)
input = copytext(input, 1, opentag)
else
input = copytext(input, (closetag + 1))
else
break
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
return trim(strip_html_properly(input, max_length))
+1 -7
View File
@@ -411,13 +411,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//world << "<b>[newname] is the AI!</b>"
//world << sound('sound/AI/newAI.ogg')
// Set eyeobj name
if(A.eyeobj)
A.eyeobj.name = "[newname] (AI Eye)"
// Set ai pda name
if(A.aiPDA)
A.aiPDA.owner = newname
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
A.SetName(newname)
fully_replace_character_name(oldname,newname)
+1 -2
View File
@@ -503,8 +503,7 @@
if("Crew Monitoring")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
var/obj/machinery/computer/crew/C = locate(/obj/machinery/computer/crew)
C.attack_ai(AI)
AI.nano_crew_monitor()
if("Show Crew Manifest")
if(isAI(usr))
+1 -1
View File
@@ -66,7 +66,7 @@
/obj/machinery/teleport/hub/attack_ghost(mob/user as mob)
var/atom/l = loc
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
if(com.locked)
if(com && com.locked)
user.loc = get_turf(com.locked)
/obj/effect/portal/attack_ghost(mob/user as mob)
+17
View File
@@ -135,6 +135,11 @@
var/default_laws = 0 //Controls what laws the AI spawns with.
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
var/const/minutes_to_ticks = 60 * 10
// Event settings
var/expected_round_length = 60 * 2 * minutes_to_ticks // 2 hours
@@ -458,6 +463,18 @@
if("max_maint_drones")
config.max_maint_drones = text2num(value)
if("station_levels")
config.station_levels = text2numlist(value, ";")
if("admin_levels")
config.admin_levels = text2numlist(value, ";")
if("contact_levels")
config.contact_levels = text2numlist(value, ";")
if("player_levels")
config.player_levels = text2numlist(value, ";")
if("expected_round_length")
config.expected_round_length = MinutesToTicks(text2num(value))
@@ -18,7 +18,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
var/departed = 0 //if the shuttle has left the station at least once
var/datum/announcement/priority/emergency_shuttle_docked = new(0, new_sound = sound('sound/AI/shuttledock.ogg'))
var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg'))
var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg'))
/datum/emergency_shuttle_controller/proc/process()
if (wait_for_launch)
@@ -29,7 +32,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
if (!shuttle.location) //leaving from the station
if(is_stranded())
captain_announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
wait_for_launch = 0
return
//launch the pods!
@@ -49,10 +52,9 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
if (evac)
captain_announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.")
world << sound('sound/AI/shuttledock.ogg')
emergency_shuttle_docked.Announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.")
else
captain_announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.")
priority_announcement.Announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.")
//arm the escape pods
if (evac)
@@ -81,8 +83,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
evac = 1
captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
emergency_shuttle_called.Announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
@@ -101,7 +102,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
//reset the shuttle transit time if we need to
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
captain_announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
priority_announcement.Announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
//recalls the shuttle
/datum/emergency_shuttle_controller/proc/recall()
@@ -111,15 +112,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
shuttle.cancel_launch(src)
if (evac)
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.")
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
evac = 0
else
captain_announce("The scheduled crew transfer has been cancelled.")
priority_announcement.Announce("The scheduled crew transfer has been cancelled.")
/datum/emergency_shuttle_controller/proc/can_call()
if (deny_shuttle)
+2 -2
View File
@@ -190,7 +190,7 @@
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(destination.z == 2) //centcomm z-level
if((destination.z in config.admin_levels)) //centcomm z-level
if(istype(teleatom, /obj/mecha))
var/obj/mecha/MM = teleatom
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
@@ -200,6 +200,6 @@
return 0
if(destination.z > 7) //Away mission z-levels
if(!(destination.z in config.player_levels)) //Away mission z-levels
return 0
return 1
+7 -6
View File
@@ -8,6 +8,7 @@
author = "Nanotrasen Editor"
channel_name = "Tau Ceti Daily"
can_be_redacted = 0
message_type = "Story"
revolution_inciting_event
@@ -129,12 +130,6 @@ proc/check_for_newscaster_updates(type)
proc/announce_newscaster_news(datum/news_announcement/news)
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
var/datum/feed_channel/sendto
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == news.channel_name)
@@ -148,6 +143,12 @@ proc/announce_newscaster_news(datum/news_announcement/news)
sendto.locked = 1
sendto.is_admin_channel = 1
news_network.network_channels += sendto
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author ? news.author : sendto.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
newMsg.message_type = news.message_type
sendto.messages += newMsg
+1 -1
View File
@@ -60,7 +60,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
caster.reset_view(0)
return 0
if(user.z == 2 && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
if((user.z in config.admin_levels) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(!skipcharge)
+6 -51
View File
@@ -16,7 +16,7 @@
rate = -rate
solar_next_update = world.time // init the timer
angle = rand (0,360) // the station position to the sun is randomised at round start
/hook/startup/proc/createSun()
sun = new /datum/sun()
return 1
@@ -50,54 +50,9 @@
dx = s/abs(s)
dy = c / abs(s)
for(var/obj/machinery/power/M in solars_list)
if(!M.powernet)
solars_list.Remove(M)
//now tell the solar control computers to update their status and linked devices
for(var/obj/machinery/power/solar_control/SC in solars_list)
if(!SC.powernet)
solars_list.Remove(SC)
continue
// Solar Tracker
if(istype(M, /obj/machinery/power/tracker))
var/obj/machinery/power/tracker/T = M
T.set_angle(angle)
// Solar Control
else if(istype(M, /obj/machinery/power/solar_control))
var/obj/machinery/power/solar_control/C = M
if(C.track == 1) //if manual tracking...
C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking)
// Solar Panel
else if(istype(M, /obj/machinery/power/solar))
var/obj/machinery/power/solar/S = M
if(S.control)
occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
var/turf/T = null
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
if(T.density) // if we hit a solid turf, panel is obscured
S.obscured = 1
return
S.obscured = 0 // if hit the edge or stepped 20 times, not obscured
S.update_solar_exposure()
SC.update()
+121
View File
@@ -0,0 +1,121 @@
/var/datum/announcement/priority/priority_announcement = new(do_log = 0)
/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1)
/datum/announcement
var/title = "Attention"
var/announcer = ""
var/log = 0
var/sound
var/newscast = 0
var/channel_name = "Station Announcements"
var/announcement_type = "Announcement"
var/disable_newscasts = 1 // Bay also adds announcements to their newscaster system - set this to 0 to also use that system
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
sound = new_sound
log = do_log
newscast = do_newscast
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "Priority Announcement"
announcement_type = "Priority Announcement"
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "[command_name()] Update"
announcement_type = "[command_name()] Update"
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "Security Announcement"
announcement_type = "Security Announcement"
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast)
if(!message)
return
var/tmp/message_title = new_title ? new_title : title
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
message = trim_strip_html_properly(message)
message_title = html_encode(message_title)
Message(message, message_title)
if(do_newscast)
NewsCast(message, message_title)
Sound(message_sound)
Log(message, message_title)
datum/announcement/proc/Message(message as text, message_title as text)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << "<h2 class='alert'>[title]</h2>"
M << "<span class='alert'>[message]</span>"
if (announcer)
M << "<span class='alert'> -[html_encode(announcer)]</span>"
datum/announcement/minor/Message(message as text, message_title as text)
world << "<b>[message]</b>"
datum/announcement/priority/Message(message as text, message_title as text)
world << "<h1 class='alert'>[message_title]</h1>"
world << "<span class='alert'>[message]</span>"
if(announcer)
world << "<span class='alert'> -[html_encode(announcer)]</span>"
world << "<br>"
datum/announcement/priority/command/Message(message as text, message_title as text)
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (message_title)
command += "<br><h2 class='alert'>[message_title]</h2>"
command += "<br><span class='alert'>[message]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << command
datum/announcement/priority/security/Message(message as text, message_title as text)
world << "<font size=4 color='red'>[message_title]</font>"
world << "<font color='red'>[message]</font>"
datum/announcement/proc/NewsCast(message as text, message_title as text)
if(disable_newscasts)
return
if(!newscast)
return
var/datum/news_announcement/news = new
news.channel_name = channel_name
news.author = announcer
news.message = message
news.message_type = announcement_type
news.can_be_redacted = 0
announce_newscaster_news(news)
datum/announcement/proc/PlaySound(var/message_sound)
if(!message_sound)
return
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << message_sound
datum/announcement/proc/Sound(var/message_sound)
PlaySound(message_sound)
datum/announcement/priority/Sound(var/message_sound)
if(sound)
world << sound
datum/announcement/priority/command/Sound(var/message_sound)
PlaySound(message_sound)
datum/announcement/proc/Log(message as text, message_title as text)
if(log)
log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]")
message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1)
/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
-5
View File
@@ -1,5 +0,0 @@
/proc/captain_announce(var/text)
world << "<h1 class='alert'>Priority Announcement</h1>"
world << "<span class='alert'>[html_encode(text)]</span>"
world << "<br>"
-11
View File
@@ -1,11 +0,0 @@
/proc/command_alert(var/text, var/title = "")
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (title && length(title) > 0)
command += "<br><h2 class='alert'>[html_encode(title)]</h2>"
command += "<br><span class='alert'>[html_encode(text)]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << command
+3 -3
View File
@@ -70,7 +70,7 @@ var/list/teleportlocs = list()
var/list/turfs = get_area_turfs(AR.type)
if(turfs.len)
var/turf/picked = pick(turfs)
if (picked.z == 1)
if ((picked.z in config.station_levels))
teleportlocs += AR.name
teleportlocs[AR.name] = AR
@@ -83,13 +83,13 @@ var/list/ghostteleportlocs = list()
/hook/startup/proc/setupGhostTeleportLocs()
for(var/area/AR in world)
if(ghostteleportlocs.Find(AR.name)) continue
if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome))
if(istype(AR, /area/tdome))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
var/list/turfs = get_area_turfs(AR.type)
if(turfs.len)
var/turf/picked = pick(turfs)
if (picked.z == 1 || picked.z == 5 || picked.z == 3)
if ((picked.z in config.player_levels))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
+5 -8
View File
@@ -58,7 +58,7 @@ var/list/blob_nodes = list()
/datum/game_mode/blob/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
nukecode = bomb.r_code
return nukecode
@@ -92,7 +92,7 @@ var/list/blob_nodes = list()
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space))
if(!(location.z in config.station_levels) || istype(location, /turf/space))
location = null
C.gib()
@@ -175,17 +175,14 @@ var/list/blob_nodes = list()
return
if (1)
command_alert("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/blob_confirmed.ogg')
command_announcement.Announce("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg')
return
if (2)
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg')
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
send_intercept(2)
+1 -1
View File
@@ -62,7 +62,7 @@ datum/game_mode/proc/auto_declare_completion_blob()
if (istype(T, /turf/space))
numSpace += 1
else if(istype(T, /turf))
if (M.z!=1)
if (!(M.z in config.station_levels))
numOffStation += 1
else
numAlive += 1
+2 -2
View File
@@ -61,7 +61,7 @@
proc/count()
for(var/turf/T in world)
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
if(istype(T,/turf/simulated/floor))
@@ -83,7 +83,7 @@
src.r_wall += 1
for(var/obj/O in world)
if(O.z != 1)
if(!(O.z in config.station_levels))
continue
if(istype(O, /obj/structure/window))
+1 -1
View File
@@ -39,7 +39,7 @@
return 0 // not enough candidates for borer
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == STATION_Z) // No more spawning in atmos. Assuming the mappers did their jobs, anyway.
if(!v.welded && (v.z in config.station_levels))
found_vents.Add(v)
// for each 2 possible borers, add one borer and one host
+1 -1
View File
@@ -149,7 +149,7 @@
announce_to_kill_crew()
stage = 2
else if(stage == 2 && cruiser_seconds() <= 60 * 5)
command_alert("Inbound cruiser detected on collision course. Scans indicate the ship to be armed and ready to fire. Estimated time of arrival: 5 minutes.", "[station_name()] Early Warning System")
command_announcement.Announce("Inbound cruiser detected on collision course. Scans indicate the ship to be armed and ready to fire. Estimated time of arrival: 5 minutes.", "[station_name()] Early Warning System")
stage = 3
else if(stage == 3 && cruiser_seconds() <= 0)
crew_lose()
+24 -37
View File
@@ -30,10 +30,7 @@
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
@@ -42,22 +39,18 @@
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/granomalies.ogg')
command_announcement.Announce("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if((T.z in config.station_levels))
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
@@ -107,8 +100,7 @@
/*
/proc/viral_outbreak(var/virus = null)
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
// world << sound('sound/AI/outbreak7.ogg')
// command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
var/virus_type
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/advance/flu,/datum/disease/advance/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
@@ -140,7 +132,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
for(var/datum/disease/D in H.viruses)
foundAlready = 1
@@ -167,17 +159,14 @@
H.viruses += D
break
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
*/
/proc/alien_infestation(var/spawncount = 1) // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
//world << sound('sound/AI/aliens.ogg')
//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')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
@@ -197,7 +186,7 @@
spawncount--
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
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')
for(var/mob/M in player_list)
M << sound('sound/AI/aliens.ogg')
@@ -205,7 +194,7 @@
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(L.z != 1) continue
if(!(L.z in config.station_levels)) continue
L.flicker(50)
sleep(100)
@@ -214,9 +203,11 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
if(istype(H,/mob/living/carbon/human))
if(H.species.flags & IS_SYNTHETIC)
return
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
@@ -231,13 +222,11 @@
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/radiation.ogg')
command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
@@ -276,9 +265,9 @@
temp_timer.releasetime = 1
sleep(150)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
world.log << "ERROR: Could not initate grey-tide virus. Unable find prison or brig area."
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in landmarks_list)
@@ -286,13 +275,11 @@
new /mob/living/simple_animal/hostile/carp(C.loc)
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/commandreport.ogg')
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
@@ -442,21 +429,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
if((APC.z in config.station_levels))
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
if((SMES.z in config.station_levels))
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
@@ -465,7 +452,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
firedoornum++;
spawn(0)
D.ion_act()
+3 -3
View File
@@ -1,18 +1,18 @@
/datum/event/portalstorm
Announce()
command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
command_announcement.Announce("Subspace disruption detected around the vessel", "Anomaly Alert")
LongTerm()
var/list/turfs = list( )
var/turf/picked
for(var/turf/T in world)
if(T.z < 5 && istype(T,/turf/simulated/floor))
if((T.z in config.player_levels) && istype(T,/turf/simulated/floor))
turfs += T
for(var/turf/T in world)
if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
if(prob(10) && (T.z in config.player_levels) && istype(T,/turf/simulated/floor))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/portal/P = new /obj/portal( T )
+3 -4
View File
@@ -13,11 +13,11 @@
if(prob(100)) // no lethal diseases outside virus mode!
infect_mob_random_lesser(H)
if(prob(20))//don't want people to know that the virus alert = greater virus
command_alert("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
command_announcement.Announce("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
else
infect_mob_random_greater(H)
if(prob(80))
command_alert("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
command_announcement.Announce("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
break
//overall virus alert happens 26% of the time, might need to be higher
else
@@ -73,8 +73,7 @@
H.viruses += D
break
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
Tick()
ActiveFor = Lifetime //killme
+2 -2
View File
@@ -78,7 +78,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
walk_towards(immrod, end,1)
sleep(1)
while (immrod)
if (immrod.z != 1)
if ((immrod.z in config.station_levels))
immrod.z = 1
if(immrod.loc == end)
del(immrod)
@@ -86,4 +86,4 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
for(var/obj/effect/immovablerod/imm in world)
return
sleep(50)
command_alert("What the fuck was that?!", "General Alert")
command_announcement.Announce("What the fuck was that?!", "General Alert")
@@ -1,6 +1,6 @@
/proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
if(!(xmas.z in config.station_levels)) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
@@ -171,7 +171,7 @@ var/global/Holiday = null
*/
/* var/list/obj/containers = list()
for(var/obj/item/weapon/storage/S in world)
if(S.z != 1) continue
if(!(S.z in config.station_levels)) continue
containers += S
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
+2 -5
View File
@@ -12,10 +12,7 @@
spawn(3000)
blobevent = 0
spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/outbreak5.ogg')
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
@@ -24,7 +21,7 @@
sleep(-1)
if(!blob_cores.len) break
var/obj/effect/blob/B = pick(blob_cores)
if(B.z != 1)
if(!(B.z in config.station_levels))
continue
B.Life()
spawn(30)
+7 -13
View File
@@ -1,16 +1,14 @@
/proc/power_failure(var/announce = 1)
if(announce)
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.charge = 0
S.output = 0
@@ -21,7 +19,7 @@
for(var/obj/machinery/power/apc/C in world)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = 0
@@ -31,18 +29,16 @@
var/list/skipped_areas_apc = list(/area/engine/engineering)
if(announce)
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in machines)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.charge = S.capacity
S.output = 200000
@@ -53,9 +49,7 @@
/proc/power_restore_quick(var/announce = 1)
if(announce)
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in machines)
if(S.z != 1)
continue
+2 -2
View File
@@ -2,12 +2,12 @@
spawn()
var/list/pick_turfs = list()
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if((T.z in config.station_levels))
pick_turfs += T
if(pick_turfs.len)
//All ready. Announce that bad juju is afoot.
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/spanomalies.ogg')
+1 -4
View File
@@ -323,10 +323,7 @@ Implants;
comm.messagetext.Add(intercepttext)
/* world << sound('sound/AI/commandreport.ogg') */
command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/intercept.ogg')
command_announcement.Announce("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.", new_sound = 'sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
+9 -8
View File
@@ -246,12 +246,12 @@ var/global/datum/controller/gameticker/ticker
var/obj/structure/stool/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
if(station_missed)
for(var/mob/living/M in living_mob_list)
for(var/mob/M in living_mob_list)
M.buckled = temp_buckle //buckles the mob so it can't do anything
if(M.client)
M.client.screen += cinematic //show every client the cinematic
else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived"
for(var/mob/living/M in living_mob_list)
for(var/mob/M in mob_list)
M.buckled = temp_buckle
if(M.client)
M.client.screen += cinematic
@@ -259,12 +259,13 @@ var/global/datum/controller/gameticker/ticker
switch(M.z)
if(0) //inside a crate or something
var/turf/T = get_turf(M)
if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and
M.health = 0
M.stat = DEAD
if(T && (T.z in config.station_levels))
M.death(0)
if(1) //on a z-level 1 turf.
M.health = 0
M.stat = DEAD
M.death(0)
for(var/obj/effect/blob/core in blob_cores)
core.health = -10
core.update_icon()
//Now animate the cinematic
switch(station_missed)
@@ -319,7 +320,7 @@ var/global/datum/controller/gameticker/ticker
world << sound('sound/effects/explosionfar.ogg')
cinematic.icon_state = "summary_selfdes"
for(var/mob/living/M in living_mob_list)
if(M.loc.z == 1)
if((M.loc.z in config.station_levels))
M.death()//No mercy
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
@@ -90,6 +90,8 @@ rcd light flash thingy on matter drain
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in airlocks)
if(!(D.z in config.contact_levels))
continue
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
+7 -10
View File
@@ -74,12 +74,12 @@
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
malf.current << {"\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font><br />
\black<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B><br />
<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B><br />
The process takes one minute per APC, during which you cannot interface with any other station objects.<br />
Remember that only APCs that are on the station can help you take over the station.<br />
When you feel you have enough APCs under your control, you may begin the takeover attempt."}
malf.current << "\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>"
malf.current << "<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B>"
malf.current << "<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B>"
malf.current << "The process takes one minute per APC, during which you cannot interface with any other station objects."
malf.current << "Remember that only APCs that are on the station can help you take over the station."
malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt."
return
@@ -172,7 +172,7 @@
if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes")
return
command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert")
command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg')
set_security_level("delta")
for(var/obj/item/weapon/pinpointer/point in world)
@@ -184,9 +184,6 @@
ticker.mode:malf_mode_declared = 1
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/aimalf.ogg')
/datum/game_mode/malfunction/proc/ai_win()
@@ -42,7 +42,7 @@
if(emergency_shuttle.call_evac())
spawn(20 SECONDS)
var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
command_alert(text, "Emergency Transmission")
command_announcement.Announce(text, "Emergency Transmission")
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
if(activated)
+2 -2
View File
@@ -27,7 +27,7 @@ datum/game_mode/mutiny
proc/reveal_directives()
spawn(rand(1 MINUTES, 3 MINUTES))
command_alert("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
spawn(rand(3 MINUTES, 5 MINUTES))
send_pda_message()
spawn(rand(3 MINUTES, 5 MINUTES))
@@ -67,7 +67,7 @@ datum/game_mode/mutiny
"classified security operations",
"science-defying raw elemental chaos"
)
command_alert("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
+1 -1
View File
@@ -28,7 +28,7 @@ datum/game_mode/nations
return ..()
/datum/game_mode/nations/send_intercept()
command_alert("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \
command_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \
affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \
assets of the Centcom Division in order to pay the massive legal fees that will be incurred \
during the following centuries long court process. Therefore, all current employment contracts \
+1 -1
View File
@@ -1398,7 +1398,7 @@ datum
var/turf/T = get_turf(target.current)
if(target.current.stat == 2)
return 1
else if((T) && (T.z != 1))//If they leave the station they count as dead for this
else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this
return 2
else
return 0
+1 -1
View File
@@ -409,7 +409,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
var/off_station = 0
var/turf/bomb_location = get_turf(src)
if( bomb_location && (bomb_location.z == 1) )
if( bomb_location && (bomb_location.z in config.station_levels) )
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1
else
+3 -3
View File
@@ -104,7 +104,7 @@ datum/objective/mutiny
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
return 2
return 0
return 1
@@ -139,7 +139,7 @@ datum/objective/mutiny/rp
if(target in ticker.mode:head_revolutionaries)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
rval = 2
return 0
return rval
@@ -255,7 +255,7 @@ datum/objective/maroon
if(target && target.current)
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
return 1
if(target.current.z == 2)
if((target.current.z in config.admin_levels))
return 0
return 1
@@ -134,7 +134,7 @@
/datum/game_mode/anti_revolution/proc/check_crew_victory()
for(var/datum/mind/head_mind in heads)
var/turf/T = get_turf(head_mind.current)
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600))
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z in config.station_levels) && !head_mind.is_brigged(600))
if(ishuman(head_mind.current))
return 0
return 1
+4 -4
View File
@@ -347,7 +347,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == 1))
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z in config.station_levels))
if(ishuman(rev_mind.current))
return 0
return 1
@@ -376,7 +376,7 @@
if(headrev.current)
if(headrev.current.stat == DEAD)
text += "died"
else if(headrev.current.z != 1)
else if(!(headrev.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -399,7 +399,7 @@
if(rev.current)
if(rev.current.stat == DEAD)
text += "died"
else if(rev.current.z != 1)
else if(!(rev.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -426,7 +426,7 @@
if(head.current)
if(head.current.stat == DEAD)
text += "died"
else if(head.current.z != 1)
else if(!(head.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -124,7 +124,7 @@
// probably wanna export this stuff into a separate function for use by both
// revs and heads
//assume that only carbon mobs can become rev heads for now
if(!rev_mind.current:handcuffed && T && T.z == 1)
if(!rev_mind.current:handcuffed && T && (T.z in config.station_levels))
return 0
return 1
+5 -5
View File
@@ -26,13 +26,13 @@
// Who is alive/dead, who escaped
for (var/mob/living/silicon/ai/I in mob_list)
if (I.stat == 2 && I.z == 1)
if (I.stat == 2 && (I.z in config.station_levels))
score_deadaipenalty = 1
score_deadcrew += 1
for (var/mob/living/carbon/human/I in mob_list)
// for (var/datum/ailment/disease/V in I.ailments)
// if (!V.vaccine && !V.spread != "Remissive") score_disease++
if (I.stat == 2 && I.z == 1) score_deadcrew += 1
if (I.stat == 2 && (I.z in config.station_levels)) score_deadcrew += 1
if (I.job == "Clown")
for(var/thing in I.attack_log)
if(findtext(thing, "<font color='orange'>")) score_clownabuse++
@@ -102,7 +102,7 @@
if (location in bad_zone1) score_disc = 0
if (location in bad_zone2) score_disc = 0
if (location in bad_zone3) score_disc = 0
if (A.loc.z != 1) score_disc = 0
if (!(A.loc.z in config.station_levels)) score_disc = 0
*/
if (score_nuked)
for (var/obj/machinery/nuclearbomb/NUKE in machines)
@@ -132,13 +132,13 @@
// Check station's power levels
for (var/obj/machinery/power/apc/A in machines)
if (A.z != 1) continue
if (!(A.z in config.station_levels)) continue
for (var/obj/item/weapon/stock_parts/cell/C in A.contents)
if (C.charge < 2300) score_powerloss += 1 // 200 charge leeway
// Check how much uncleaned mess is on the station
for (var/obj/effect/decal/cleanable/M in world)
if (M.z != 1) continue
if (!(M.z in config.station_levels)) continue
if (istype(M, /obj/effect/decal/cleanable/blood/gibs/)) score_mess += 3
if (istype(M, /obj/effect/decal/cleanable/blood/)) score_mess += 1
// if (istype(M, /obj/effect/decal/cleanable/greenpuke)) score_mess += 1
+3 -3
View File
@@ -200,10 +200,10 @@
else
if(playeralienratio >= gammaratio && !gammacalled)
gammacalled = 1
command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
return ..()
@@ -238,7 +238,7 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || emergency_shuttle.departed && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
+1 -1
View File
@@ -140,7 +140,7 @@
H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
// H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
+2 -1
View File
@@ -1,3 +1,4 @@
var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
/datum/job/captain
title = "Captain"
flag = CAPTAIN
@@ -35,7 +36,7 @@
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>Captain [H.real_name] on deck!</b>"
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
+1
View File
@@ -526,6 +526,7 @@ var/global/datum/controller/occupations/job_master
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = C.assignment
pda.ownrank = C.rank
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
if(usr.stat || (!ishuman(usr) && !isrobot(usr)) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
return
var/mob/living/L = O
+2 -2
View File
@@ -4,7 +4,7 @@
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
if(!T)
return 1
if(T.z == 2)
if((T.z in config.station_levels))
return 1
if(T.z > 6)
return 1
@@ -224,7 +224,7 @@
/proc/trackable(atom/movable/M)
var/turf/T = get_turf(M)
if(T && (T.z == 1 || T.z == 3 || T.z == 5))
if(T && (T.z in config.contact_levels))
return 1
return near_camera(M)
+20 -14
View File
@@ -55,14 +55,20 @@ var/shuttle_call/shuttle_calls[0]
var/stat_msg1
var/stat_msg2
var/display_type="blank"
var/datum/announcement/priority/crew_announcement = new
l_color = "#0000FF"
/obj/machinery/computer/communications/New()
..()
crew_announcement.newscast = 1
/obj/machinery/computer/communications/Topic(href, href_list)
if(..(href, href_list))
return 1
if (!(src.z in list(STATION_Z,CENTCOMM_Z)))
if ((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
@@ -83,10 +89,12 @@ var/shuttle_call/shuttle_calls[0]
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if(20 in I.access)
if(access_captain in I.access)
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if("logout")
authenticated = 0
crew_announcement.announcer = ""
setMenuState(usr,COMM_SCREEN_MAIN)
// ALART LAVUL
@@ -127,14 +135,14 @@ var/shuttle_call/shuttle_calls[0]
usr << "You need to swipe your ID."
if("announce")
if(src.authenticated==2 && !issilicon(usr))
if(message_cooldown) return
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
if(src.authenticated==2)
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
if(!input || !(usr in view(1,src)))
return
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
log_say("[key_name(usr)] has made a captain announcement: [input]")
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
crew_announcement.Announce(input)
message_cooldown = 1
spawn(600)//One minute cooldown
message_cooldown = 0
@@ -204,7 +212,7 @@ var/shuttle_call/shuttle_calls[0]
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
if(!input || !(usr in view(1,src)))
return
Centcomm_announce(input, usr)
@@ -398,7 +406,7 @@ var/shuttle_call/shuttle_calls[0]
return
if(emergency_shuttle.going_to_centcom())
user << "The shuttle may not be called while returning to CentCom."
user << "The shuttle may not be called while returning to Central Command."
return
if(emergency_shuttle.online())
@@ -408,11 +416,11 @@ var/shuttle_call/shuttle_calls[0]
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
user << "Centcom does not currently have a shuttle available in your sector. Please try again later."
user << "Central Command does not currently have a shuttle available in your sector. Please try again later."
return
if(sent_strike_team == 1)
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
user << "Central Command will not allow the shuttle to be called. Consider all contracts terminated."
return
if(world.time < 54000) // 30 minute grace period to let the game get going
@@ -426,8 +434,6 @@ var/shuttle_call/shuttle_calls[0]
emergency_shuttle.call_transfer()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.estimate_arrival_time()/60)] minutes.")
return
+6 -102
View File
@@ -1,18 +1,15 @@
/obj/machinery/computer/crew
name = "Crew Monitoring Computer"
name = "crew monitoring computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew"
use_power = 1
idle_power_usage = 250
active_power_usage = 500
circuit = "/obj/item/weapon/circuitboard/crew"
var/list/tracked = list( )
l_color = "#0000FF"
var/obj/nano_module/crew_monitor/crew_monitor
/obj/machinery/computer/crew/New()
tracked = list()
crew_monitor = new(src)
..()
@@ -27,6 +24,8 @@
return
ui_interact(user)
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
/obj/machinery/computer/crew/update_icon()
@@ -40,100 +39,5 @@
icon_state = initial(icon_state)
stat &= ~NOPOWER
/obj/machinery/computer/crew/Topic(href, href_list)
if(..())
return 1
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return 0
if( href_list["close"] )
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
usr.unset_machine()
ui.close()
return 0
if(href_list["update"])
src.updateDialog()
return 1
/obj/machinery/computer/crew/interact(mob/user)
ui_interact(user)
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
src.scan()
var/data[0]
var/list/crewmembers = list()
for(var/obj/item/clothing/under/C in src.tracked)
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
if(istype(C.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C.loc
var/list/crewmemberData = list()
crewmemberData["sensor_type"] = C.sensor_mode
crewmemberData["dead"] = H.stat > 1
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
crewmemberData["name"] = "Unknown"
crewmemberData["rank"] = "Unknown"
if(H.wear_id && istype(H.wear_id, /obj/item/weapon/card/id) )
var/obj/item/weapon/card/id/I = H.wear_id
crewmemberData["name"] = I.name
crewmemberData["rank"] = I.rank
else if(H.wear_id && istype(H.wear_id, /obj/item/device/pda) )
var/obj/item/device/pda/P = H.wear_id
crewmemberData["name"] = (P.id ? P.id.name : "Unknown")
crewmemberData["rank"] = (P.id ? P.id.rank : "Unknown")
var/area/A = get_area(H)
crewmemberData["area"] = sanitize(A.name)
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
// Works around list += list2 merging lists; it's not pretty but it works
crewmembers += "temporary item"
crewmembers[crewmembers.len] = crewmemberData
crewmembers = sortByKey(crewmembers, "name")
data["crewmembers"] = crewmembers
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800)
// adding a template with the key "mapContent" enables the map ui functionality
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
// we want to show the map by default
ui.set_show_map(1)
ui.set_initial_data(data)
ui.open()
// should make the UI auto-update; doesn't seem to?
ui.set_auto_update(1)
/obj/machinery/computer/crew/proc/scan()
for(var/mob/living/carbon/human/H in mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if (C.has_sensor)
tracked |= C
return 1
crew_monitor.ui_interact(user)
+1 -1
View File
@@ -17,7 +17,7 @@
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
return 1
if (src.z > 1)
if (!(src.z in config.station_levels))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
usr.set_machine(src)
+1 -1
View File
@@ -65,7 +65,7 @@
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
loc_display = mob_loc.loc
if(T.malfunction)
+19 -10
View File
@@ -5,6 +5,7 @@
/datum/feed_message
var/author =""
var/body =""
var/message_type ="Story"
//var/parent_channel
var/backup_body =""
var/backup_author =""
@@ -39,6 +40,12 @@
src.backup_author = ""
src.censored = 0
src.is_admin_channel = 0
/datum/feed_channel/proc/announce_news()
return "Breaking news from [channel_name]!"
/datum/feed_channel/station/announce_news()
return "New Station Announcement Available"
/datum/feed_network
var/list/datum/feed_channel/network_channels = list()
@@ -213,7 +220,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
switch(screen)
if(0)
dat += {"Welcome to Newscasting Unit #[src.unit_no].<BR> Interface & News networks Operational.
<BR><FONT SIZE=1>Property of Nanotransen Inc</FONT>"}
<BR><FONT SIZE=1>Property of Nanotrasen</FONT>"}
if(news_network.wanted_issue)
dat+= "<HR><A href='?src=\ref[src];view_wanted=1'>Read Wanted Issue</A>"
dat+= {"<HR><BR><A href='?src=\ref[src];create_channel=1'>Create Feed Channel</A>
@@ -248,7 +255,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR><BR>"
else
for(var/datum/feed_message/MESSAGE in CHANNEL.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"*/
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"*/
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
@@ -334,7 +341,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(MESSAGE.img)
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
dat+="<BR><A href='?src=\ref[src];setScreen=[1]'>Back</A>"
if(10)
@@ -369,7 +376,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR>"
else
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<FONT SIZE=2><A href='?src=\ref[src];censor_channel_story_body=\ref[MESSAGE]'>[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")]</A> - <A href='?src=\ref[src];censor_channel_story_author=\ref[MESSAGE]'>[(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]</A></FONT><BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[10]'>Back</A>"
if(13)
@@ -383,7 +390,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR>"
else
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[11]'>Back</A>"
if(14)
@@ -516,7 +523,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_new_message"])
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
src.msg = strip_html(input(usr, "Write your feed story", "Network Channel Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.updateUsrDialog()
@@ -535,13 +542,15 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(photo)
newMsg.img = photo.img
feedback_inc("newscaster_stories",1)
var/announcement = ""
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.channel_name)
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
announcement = FC.announce_news()
break
src.screen=4
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert(src.channel_name)
NEWSCASTER.newsAlert(announcement)
src.updateUsrDialog()
@@ -986,11 +995,11 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not
// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list.
/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile.
/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile.
var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ
if(channel)
if(news_call)
for(var/mob/O in hearers(world.view-1, T))
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"Breaking news from [channel]!\"</span>",2)
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"[news_call]\"</span>",2)
src.alert = 1
src.update_icon()
spawn(300)
+16 -9
View File
@@ -55,6 +55,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/dpt = ""; //the department which will be receiving the message
var/priority = -1 ; //Priority of the message being sent
luminosity = 0
var/datum/announcement/announcement = new
/obj/machinery/requests_console/power_change()
..()
@@ -70,6 +71,10 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/New()
..()
announcement.title = "[department] announcement"
announcement.newscast = 1
name = "[department] Requests Console"
allConsoles += src
//req_console_departments += department
@@ -189,7 +194,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
else //main menu
screen = 0
announceAuth = 0
reset_announce()
if (newmessagepriority == 1)
dat += text("<FONT COLOR='RED'>There are new messages</FONT><BR>")
if (newmessagepriority == 2)
@@ -240,17 +245,13 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if("2") priority = 2
else priority = -1
else
message = ""
announceAuth = 0
reset_announce()
screen = 0
if(href_list["sendAnnouncement"])
if(!announcementConsole) return
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << "<b><font size = 3><font color = red>[department] announcement:</font color> [message]</font size></b>"
announceAuth = 0
message = ""
announcement.Announce(message)
reset_announce()
screen = 0
if( href_list["department"] && message )
@@ -389,8 +390,9 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/obj/item/weapon/card/id/ID = O
if (access_RC_announce in ID.GetAccess())
announceAuth = 1
announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
else
announceAuth = 0
reset_announce()
user << "\red You are not authorized to send announcements."
updateUsrDialog()
if (istype(O, /obj/item/weapon/stamp))
@@ -399,3 +401,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
msgStamped = text("<font color='blue'><b>Stamped with the [T.name]</b></font>")
updateUsrDialog()
return
/obj/machinery/requests_console/proc/reset_announce()
announceAuth = 0
message = ""
announcement.announcer = ""
+2 -1
View File
@@ -1,3 +1,4 @@
var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0)
/obj/machinery/slot_machine
name = "Slot Machine"
desc = "Gambling for the antisocial."
@@ -55,7 +56,7 @@
if (roll == 1)
for(var/mob/O in hearers(src, null))
O.show_message(text("<b>[]</b> says, 'JACKPOT! You win [src.money]!'", src), 1)
command_alert("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner")
slotmachine_announcement.Announce("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner")
usr.mind.initial_account.money += src.money
src.money = 0
else if (roll > 1 && roll <= 10)
+3 -3
View File
@@ -178,7 +178,7 @@
var/turf/T = get_turf(R)
if (!T)
continue
if(T.z == 2 || T.z > 7)
if((T.z in config.admin_levels) || T.z > 7)
continue
if(R.syndicate == 1 && emagged == 0)
continue
@@ -199,7 +199,7 @@
continue
var/turf/T = get_turf(M)
if(!T) continue
if(T.z == 2) continue
if((T.z in config.admin_levels)) continue
var/tmpname = M.real_name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
@@ -221,7 +221,7 @@
var/turf/T = get_turf(R)
if (!T || !R.teleporter_hub || !R.teleporter_console)
continue
if(T.z == 2 || T.z > 7)
if((T.z in config.admin_levels) || T.z > 7)
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])
+2 -2
View File
@@ -407,8 +407,8 @@
if(src.shock(user, 100))
return
ui_interact(user)
wires.Interact(user)
ui_interact(user)
/**
* Display the NanoUI window for the vending machine.
@@ -885,7 +885,7 @@
/obj/item/weapon/reagent_containers/glass/bottle/stoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,
/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/syringe = 12,
/obj/item/device/healthanalyzer = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4, /obj/item/weapon/reagent_containers/dropper = 2,
/obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2)
/obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2)
contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3,/obj/item/weapon/reagent_containers/pill/stox = 4,/obj/item/weapon/reagent_containers/pill/antitox = 6)
+2 -2
View File
@@ -389,7 +389,7 @@
range = RANGED
action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
var/turf/T = get_turf(target)
if(T)
set_ready_state(0)
@@ -410,7 +410,7 @@
action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
var/list/theareas = list()
for(var/area/AR in orange(100, chassis))
if(AR in theareas) continue
+23 -19
View File
@@ -183,36 +183,40 @@ steam.start() -- spawns the effect
return
/datum/effect/effect/system/spark_spread
set_up(n = 3, c = 0, loca)
number = n > 10 ? 10 : n
cardinals = c
var/total_sparks = 0 // To stop it being spammed and lagging!
if (istype(loca, /turf/))
set_up(n = 3, c = 0, loca)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
start()
for (var/i = 1 to number)
spawn()
if (holder)
location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = getFromPool(/obj/effect/effect/sparks, location)
playsound(location, "sparks", 100, 1)
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
src.total_sparks++
var/direction
if (cardinals)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for (var/j = 0, j < pick(1, 2, 3), j++)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(sparks, direction)
sleep(20)
returnToPool(sparks)
step(sparks,direction)
spawn(20)
if(sparks)
sparks.delete()
src.total_sparks--
/////////////////////////////////////////////
//// SMOKE SYSTEMS
+8 -1
View File
@@ -51,6 +51,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above
var/ownrank = null // this one is rank, never alt title
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
@@ -217,9 +218,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
detonate = 0
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text)
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text, newrank as null|text)
owner = newname
ownjob = newjob
if(newrank)
ownrank = newrank
else
ownrank = ownjob
name = newname + " (" + ownjob + ")"
@@ -575,6 +580,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
ownrank = id.rank
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
@@ -1069,6 +1075,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
ownrank = idcard.rank
name = "PDA-[owner] ([ownjob])"
user << "<span class='notice'>Card scanned.</span>"
else
@@ -0,0 +1,18 @@
/obj/item/device/sensor_device
name = "handheld crew monitor"
desc = "A miniature machine that tracks suit sensors across the station."
icon = 'icons/obj/device.dmi'
icon_state = "scanner"
w_class = 2.0
slot_flags = SLOT_BELT
origin_tech = "biotech=3;materials=3;magnets=3"
var/obj/nano_module/crew_monitor/crew_monitor
/obj/item/device/sensor_device/New()
crew_monitor = new(src)
/obj/item/device/sensor_device/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
+114
View File
@@ -399,6 +399,120 @@
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
else
user << "<span class='notice'>You need to target your patient's chest with [src].</span>"
return
/obj/item/weapon/borg_defib
name = "defibrillator paddles"
desc = "A pair of mounted paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
force = 0
w_class = 4
canremove = 0
var/revivecost = 1000
var/cooldown = 0
var/busy = 0
/obj/item/weapon/borg_defib/attack(mob/M, mob/user)
var/tobehealed
var/threshold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
if(busy)
return
if(cooldown)
user << "<span class='notice'>[src] is recharging.</span>"
if(!ishuman(M))
user << "<span class='notice'>This unit is only designed to work on humanoid lifeforms.</span>"
return
else
if(user.a_intent == "harm")
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
cooldown = 1
busy = 0
update_icon()
spawn(50)
cooldown = 0
update_icon()
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
var/tplus = world.time - H.timeofdeath
var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
for(var/datum/organ/external/O in H.organs)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(H.health <= config.health_threshold_dead && total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(M_NOCLONE in H.mutations))
tobehealed = health + threshold
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='notice'>[user] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
H.stat = 1
H.update_revive()
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
if(ghost)
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = 1
spawn(50)
cooldown = 0
update_icon()
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
else
user << "<span class='notice'>You need to target your patient's chest with [src].</span>"
return
@@ -95,7 +95,8 @@
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/color/latex",
"/obj/item/weapon/reagent_containers/hypospray/autoinjector"
"/obj/item/weapon/reagent_containers/hypospray/autoinjector",
"/obj/item/device/sensor_device"
)
@@ -48,7 +48,7 @@ Frequency:
if (usr.stat || usr.restrained())
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
if(!current_location||(current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
usr << "The [src] is malfunctioning."
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
@@ -138,7 +138,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
+8 -4
View File
@@ -21,11 +21,15 @@
// Reagent ID => friendly name
var/list/reagents_to_log=list()
/obj/Topic(href, href_list, var/nowindow = 0)
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
// Calling Topic without a corresponding window open causes runtime errors
if(nowindow)
return 0
return ..()
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0
/obj/Destroy()
machines -= src
@@ -234,4 +234,6 @@
sleep(2)
new /obj/item/clothing/suit/space/eva/paramedic(src)
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
new /obj/item/device/sensor_device(src)
return
+2 -2
View File
@@ -142,11 +142,11 @@ proc/trigger_armed_response_team(var/force = 0)
// there's only a certain chance a team will be sent
if(!prob(send_team_chance))
command_alert("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "Central Command")
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "Central Command")
can_call_ert = 0 // Only one call per round, ladies.
return
command_alert("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "Central Command")
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "Central Command")
can_call_ert = 0 // Only one call per round, gentleman.
send_emergency_team = 1
+1 -1
View File
@@ -781,7 +781,7 @@ var/global/nologevent = 0
/datum/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin"
set name = "Unprison"
if (M.z == 2)
if ((M.z in config.admin_levels))
M.loc = pick(latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
+12 -13
View File
@@ -286,7 +286,7 @@
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("human") M.change_mob_type( /mob/living/carbon/human/human , null, null, delmob )
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob )
@@ -1091,6 +1091,7 @@
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]", 1)
H.monkeyize()
else if(href_list["corgione"])
if(!check_rights(R_SPAWN)) return
@@ -1429,7 +1430,7 @@
foo += text("<B>Is an AI</B> | ")
else
foo += text("<A HREF='?src=\ref[];makeai=\ref[]'>Make AI</A> | ", src, M)
if(M.z != 2)
if(!(M.z in config.admin_levels))
foo += text("<A HREF='?src=\ref[];sendtoprison=\ref[]'>Prison</A> | ", src, M)
foo += text("<A HREF='?src=\ref[];sendtomaze=\ref[]'>Maze</A> | ", src, M)
else
@@ -1809,7 +1810,7 @@
return
else
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
if(F.z == 1)
if((F.z in config.station_levels))
if(!F.receivefax(P))
src.owner << "\red Message transmission to [F.department] failed."
@@ -2103,11 +2104,11 @@
if(gravity_is_on)
log_admin("[key_name(usr)] toggled gravity on.", 1)
message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1)
command_alert("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
else
log_admin("[key_name(usr)] toggled gravity off.", 1)
message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1)
command_alert("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
if("wave")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Meteor")
@@ -2206,7 +2207,7 @@
for(var/mob/living/carbon/human/H in mob_list)
var/turf/loc = find_loc(H)
var/security = 0
if(loc.z > 1 || prisonwarped.Find(H))
if(!(loc.z in config.station_levels) || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
continue
@@ -2519,7 +2520,7 @@
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
for(var/turf/simulated/floor/F in world)
if(F.z == 1)
if((F.z in config.station_levels))
F.name = "lava"
F.desc = "The floor is LAVA!"
F.overlays += "lava"
@@ -2544,7 +2545,7 @@
sleep(10)
for(var/turf/simulated/floor/F in world) // Reset everything.
if(F.z == 1)
if((F.z in config.station_levels))
F.name = initial(F.name)
F.desc = initial(F.desc)
F.overlays.Cut()
@@ -2592,11 +2593,10 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in world)
if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
command_alert("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.")
world << sound('sound/AI/commandreport.ogg')
command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg')
if("dorf")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
@@ -2611,8 +2611,7 @@
message_admins("[key_name_admin(usr)] triggered an ion storm")
var/show_log = alert(usr, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
if("carp")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Crp")
+4 -6
View File
@@ -209,8 +209,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
IonStorm(0)
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -642,8 +641,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
@@ -686,7 +684,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes")
command_alert(input, customname);
command_announcement.Announce(input, customname);
if("No")
world << "\red New Nanotrasen Update available at all communication consoles."
@@ -914,7 +912,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set desc = "switches between 1x and custom views"
if(view == world.view)
view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
view = input("Select view range:", "View Range", 9) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
else
view = world.view
@@ -42,7 +42,7 @@
if (usr.stat || usr.restrained()) return
if(src.reload < 180) return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
command_alert("Bluespace artillery fire detected. Brace for impact.")
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
@@ -55,7 +55,7 @@
var/A
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
var/area/thearea = teleportlocs[A]
command_alert("Bluespace artillery fire detected. Brace for impact.")
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
spawn(30)
var/list/L = list()
+15 -15
View File
@@ -2,22 +2,22 @@
var/list/preferences_datums = list()
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm. THE ORDER MATTERS
//some autodetection here.
"pAI" = 1, // 0
"traitor" = IS_MODE_COMPILED("traitor"), // 1
"changeling" = IS_MODE_COMPILED("changeling"), // 2
"vampire" = IS_MODE_COMPILED("vampire"), // 3
"revolutionary" = IS_MODE_COMPILED("revolution"), // 4
"blob" = IS_MODE_COMPILED("blob"), // 5
"operative" = IS_MODE_COMPILED("nuclear"), // 6
"cultist" = IS_MODE_COMPILED("cult"), // 7
"wizard" = IS_MODE_COMPILED("wizard"), // 8
"raider" = IS_MODE_COMPILED("heist"), // 9
"alien" = 1, // 10
"ninja" = 1, // 11
"mutineer" = IS_MODE_COMPILED("mutiny"), // 12
"malf AI" = IS_MODE_COMPILED("malfunction") // 13
"traitor" = IS_MODE_COMPILED("traitor"), // 1 / 1
"operative" = IS_MODE_COMPILED("nuclear"), // 2 / 2
"changeling" = IS_MODE_COMPILED("changeling"), // 4 / 3
"wizard" = IS_MODE_COMPILED("wizard"), // 8 / 4
"malf AI" = IS_MODE_COMPILED("malfunction"), // 16 / 5
"revolutionary" = IS_MODE_COMPILED("revolution"), // 32 / 6
"alien" = 1, // 62 / 7
"pAI" = 1, // 128 / 8
"cultist" = IS_MODE_COMPILED("cult"), // 256 / 9
"ninja" = 1, // 512 / 10
"raider" = IS_MODE_COMPILED("heist"), // 1024 / 11
"vampire" = IS_MODE_COMPILED("vampire"), // 2048 / 12
"mutineer" = IS_MODE_COMPILED("mutiny"), // 4096 / 13
"blob" = IS_MODE_COMPILED("blob") // 8192 / 14
)
var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles
num2text(BE_PAI) = 0,
@@ -42,6 +42,12 @@
var/status_display_freq = "1435"
var/stat_msg1
var/stat_msg2
var/datum/announcement/priority/crew_announcement = new
New()
..()
crew_announcement.newscast = 1
Reset()
..()
@@ -53,7 +59,7 @@
Topic(var/href, var/list/href_list)
if(!interactable() || !computer.radio || ..(href,href_list) )
return
if (computer.z > 1)
if (!(computer.z in config.station_levels))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
@@ -68,9 +74,11 @@
authenticated = 1
if(access_captain in I.GetAccess())
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if("logout" in href_list)
authenticated = 0
crew_announcement.announcer = ""
if("swipeidseclevel" in href_list)
var/mob/M = usr
@@ -102,13 +110,13 @@
usr << "You need to swipe your ID."
if("announce" in href_list)
if(authenticated==2)
if(message_cooldown) return
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
if(!input || !interactable())
return
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
log_say("[key_name(usr)] has made a captain announcement: [input]")
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
crew_announcement.Announce(input)
message_cooldown = 1
spawn(600)//One minute cooldown
message_cooldown = 0
+8
View File
@@ -67,7 +67,15 @@ var/setup_economy = 0
/proc/setup_economy()
if(setup_economy)
return
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Public Station Announcements"
newChannel.author = "Automated Announcement Listing"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.author = "CentComm Minister of Information"
newChannel.locked = 1
+2 -3
View File
@@ -15,14 +15,13 @@
/datum/event/alien_infestation/announce()
if(successSpawn)
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
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')
/datum/event/alien_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
+5 -6
View File
@@ -7,8 +7,7 @@
/datum/event/blob/announce()
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert")
world << sound('sound/AI/blob_confirmed.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg')
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
@@ -39,14 +38,14 @@
/datum/event/blob/proc/announce_nuke()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
nukecode = bomb.r_code
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert")
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
@@ -64,7 +63,7 @@
spawn(10)
if(Blob || blob_cores.len)
return
command_alert("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
command_announcement.Announce("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
+2 -3
View File
@@ -12,13 +12,12 @@
/datum/event/borer_infestation/announce()
if(successSpawn)
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
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')
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
+2 -2
View File
@@ -8,11 +8,11 @@
var/obj/machinery/vending/originMachine
/datum/event/brand_intelligence/announce()
command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
if(V.z != 1) continue
if(!(V.z in config.station_levels)) continue
vendingMachines.Add(V)
if(!vendingMachines.len)
+1 -1
View File
@@ -2,7 +2,7 @@
announceWhen = 5
/datum/event/cargo_bonus/announce()
command_alert("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert")
command_announcement.Announce("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert")
/datum/event/cargo_bonus/start()
supply_controller.points+=rand(100,500)
+1 -1
View File
@@ -8,7 +8,7 @@
endWhen = rand(600,1200)
/datum/event/carp_migration/announce()
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
/datum/event/carp_migration/start()
for(var/obj/effect/landmark/C in landmarks_list)
+1 -1
View File
@@ -1,6 +1,6 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
@@ -12,7 +12,7 @@
A << "<br>"
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
command_alert(alert)
command_announcement.Announce(alert)
/datum/event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in telecomms_list)
+2 -3
View File
@@ -3,8 +3,7 @@
oneShot = 1
/datum/event/disease_outbreak/announce()
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/setup()
announceWhen = rand(15, 30)
@@ -17,7 +16,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
for(var/datum/disease/D in H.viruses)
foundAlready = 1
+1 -1
View File
@@ -3,7 +3,7 @@
var/lightsoutRange = 25
/datum/event/electrical_storm/announce()
command_alert("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
/datum/event/electrical_storm/start()
var/list/epicentreList = list()
+13 -13
View File
@@ -135,8 +135,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 150),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mass Hallucination",/datum/event/mass_hallucination,200),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
)
/datum/event_container/moderate
@@ -145,9 +144,9 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 30)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
// new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
@@ -156,18 +155,19 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 15), 1),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mass Hallucination", /datum/event/mass_hallucination, 300),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Dimensional Tear", /datum/event/tear, 0, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vent Clog", /datum/event/vent_clog, 250),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Wormholes", /datum/event/wormholes, 150),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vortex Anomaly", /datum/event/anomaly/anomaly_vortex, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
// new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vortex Anomaly", /datum/event/anomaly/anomaly_vortex, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
)
/datum/event_container/major
+2 -5
View File
@@ -79,7 +79,7 @@ var/global/list/possibleEvents = list()
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"]
if(minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"]
// possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
@@ -152,10 +152,7 @@ var/global/list/possibleEvents = list()
/*switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave(10)
spawn_meteors()
+1 -3
View File
@@ -8,9 +8,7 @@
power_failure(0)
/datum/event/grid_check/announce()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
/datum/event/grid_check/end()
power_restore()
+1 -1
View File
@@ -102,7 +102,7 @@
/datum/event/infestation/announce()
command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert")
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert")
#undef LOC_KITCHEN
#undef LOC_ATMOS
+6 -6
View File
@@ -6,7 +6,7 @@
/datum/event/ionstorm/announce()
endWhen = rand(500, 1500)
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
// command_announcement.Announce("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
for (var/mob/living/carbon/human/player in world)
if(player.client)
players += player.real_name
@@ -86,7 +86,7 @@
/datum/event/ionstorm/end()
spawn(rand(5000,8000))
if(prob(50))
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
/*
/proc/IonStorm(botEmagChance = 10)
@@ -212,21 +212,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
if((APC.z in config.station_levels))
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
if((SMES.z in config.station_levels))
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
@@ -235,7 +235,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
firedoornum++;
spawn(0)
D.ion_act()
+1 -1
View File
@@ -3,4 +3,4 @@
if(!(C.species.flags & IS_SYNTHETIC))
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_alert("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
+5 -6
View File
@@ -9,15 +9,14 @@
endWhen = rand(10,25) * 3
/datum/event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
/datum/event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(rand(2,5))
/datum/event/meteor_wave/end()
command_alert("The station has cleared the meteor storm.", "Meteor Alert")
command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
//
/datum/event/meteor_shower
@@ -30,7 +29,7 @@
waves = rand(1,4)
/datum/event/meteor_shower/announce()
command_alert("The station is now in a meteor shower.", "Meteor Alert")
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
/datum/event/meteor_shower/tick()
@@ -44,4 +43,4 @@
endWhen = next_meteor + 1
/datum/event/meteor_shower/end()
command_alert("The station has cleared the meteor shower", "Meteor Alert")
command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
+2 -2
View File
@@ -15,7 +15,7 @@
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
@@ -30,7 +30,7 @@
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
+7 -8
View File
@@ -22,11 +22,10 @@
/datum/event/radiation_storm/start()
spawn()
world << sound('sound/AI/radiation.ogg')
command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert")
command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
for(var/area/A in world)
if(A.z != 1 || is_safe_zone(A))
if(!(A.z in config.station_levels) || is_safe_zone(A))
continue
A.radiation_alert()
@@ -36,7 +35,7 @@
sleep(600)
command_alert("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
for(var/i = 0, i < 10, i++)
for(var/mob/living/carbon/human/H in living_mob_list)
@@ -45,7 +44,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1 || is_safe_zone(T.loc))
if(!(T.z in config.station_levels) || is_safe_zone(T.loc))
continue
if(istype(H,/mob/living/carbon/human))
@@ -64,16 +63,16 @@
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
M.apply_effect((rand(5,25)),IRRADIATE,0)
sleep(100)
command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
for(var/area/A in world)
if(A.z != 1 || is_safe_zone(A))
if(!(A.z in config.station_levels) || is_safe_zone(A))
continue
A.reset_radiation_alert()
+3 -3
View File
@@ -30,7 +30,7 @@
msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution."
else
msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
command_alert(msg, "Rogue drone alert")
command_announcement.Announce(msg, "Rogue drone alert")
/datum/event/rogue_drone/tick()
@@ -49,6 +49,6 @@
num_recovered++
if(num_recovered > drones_list.len * 0.75)
command_alert("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert")
command_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert")
else
command_alert("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
command_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
+2 -3
View File
@@ -1,9 +1,8 @@
/datum/event/dust/meaty/announce()
if(prob(16))
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
else
command_alert("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert")
world << sound('sound/AI/meteors.ogg')
command_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert",new_sound = 'sound/AI/meteors.ogg')
/datum/event/dust/meaty/setup()
qnty = rand(45,125)
+1 -1
View File
@@ -8,7 +8,7 @@
RS.start()
RS.kill()
for(var/area/A)
if(A.z != 1) continue //Spook on main station only.
if(!(A.z in config.station_levels)) continue //Spook on main station only.
if(A.luminosity) continue
// if(A.lighting_space) continue
if(A.type == /area) continue
+2 -5
View File
@@ -13,7 +13,7 @@
/datum/event/wormholes/start()
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if((T.z in config.station_levels))
pick_turfs += T
for(var/i = 1, i <= number_of_wormholes, i++)
@@ -21,10 +21,7 @@
wormholes += new /obj/effect/portal/wormhole(T, null, null, -1)
/datum/event/wormholes/announce()
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M, /mob/new_player))
M << sound('sound/AI/spanomalies.ogg')
command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg')
/datum/event/wormholes/tick()
if(activeFor % shift_frequency == 0)
+2 -4
View File
@@ -12,15 +12,13 @@
sent_spiders_to_station = 1
/datum/event/spider_infestation/announce()
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
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')
/datum/event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
+1 -1
View File
@@ -5,7 +5,7 @@
var/obj/effect/tear/TE
/datum/event/tear/announce()
command_alert("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert")
command_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert")
/datum/event/tear/start()
+1 -1
View File
@@ -15,7 +15,7 @@
setup(safety_loop)
/datum/event/anomaly/announce()
command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
command_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
/datum/event/anomaly/start()
var/turf/T = pick(get_area_turfs(impact_area))

Some files were not shown because too many files have changed in this diff Show More