mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #6084 from PsiOmegaDelta/MoreNounce
Announcement Refactoring
This commit is contained in:
@@ -167,8 +167,8 @@
|
|||||||
#include "code\datums\spells\wizard.dm"
|
#include "code\datums\spells\wizard.dm"
|
||||||
#include "code\defines\obj.dm"
|
#include "code\defines\obj.dm"
|
||||||
#include "code\defines\obj\weapon.dm"
|
#include "code\defines\obj\weapon.dm"
|
||||||
|
#include "code\defines\procs\announce.dm"
|
||||||
#include "code\defines\procs\AStar.dm"
|
#include "code\defines\procs\AStar.dm"
|
||||||
#include "code\defines\procs\captain_announce.dm"
|
|
||||||
#include "code\defines\procs\command_alert.dm"
|
#include "code\defines\procs\command_alert.dm"
|
||||||
#include "code\defines\procs\dbcore.dm"
|
#include "code\defines\procs\dbcore.dm"
|
||||||
#include "code\defines\procs\sd_Alert.dm"
|
#include "code\defines\procs\sd_Alert.dm"
|
||||||
|
|||||||
@@ -43,6 +43,12 @@
|
|||||||
var/stat_msg1
|
var/stat_msg1
|
||||||
var/stat_msg2
|
var/stat_msg2
|
||||||
|
|
||||||
|
var/datum/announcement/priority/crew_announcement = new
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
crew_announcement.newscast = 1
|
||||||
|
|
||||||
Reset()
|
Reset()
|
||||||
..()
|
..()
|
||||||
authenticated = 0
|
authenticated = 0
|
||||||
@@ -68,11 +74,13 @@
|
|||||||
authenticated = 1
|
authenticated = 1
|
||||||
if(access_captain in I.GetAccess())
|
if(access_captain in I.GetAccess())
|
||||||
authenticated = 2
|
authenticated = 2
|
||||||
|
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
|
||||||
if(istype(I,/obj/item/weapon/card/emag))
|
if(istype(I,/obj/item/weapon/card/emag))
|
||||||
authenticated = 2
|
authenticated = 2
|
||||||
computer.emagged = 1
|
computer.emagged = 1
|
||||||
if("logout" in href_list)
|
if("logout" in href_list)
|
||||||
authenticated = 0
|
authenticated = 0
|
||||||
|
crew_announcement.announcer = ""
|
||||||
|
|
||||||
if("swipeidseclevel" in href_list)
|
if("swipeidseclevel" in href_list)
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
@@ -104,13 +112,13 @@
|
|||||||
usr << "You need to swipe your ID."
|
usr << "You need to swipe your ID."
|
||||||
if("announce" in href_list)
|
if("announce" in href_list)
|
||||||
if(authenticated==2)
|
if(authenticated==2)
|
||||||
if(message_cooldown) return
|
if(message_cooldown)
|
||||||
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
|
usr << "Please allow at least one minute to pass between announcements"
|
||||||
|
return
|
||||||
|
var/input = stripped_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||||
if(!input || !interactable())
|
if(!input || !interactable())
|
||||||
return
|
return
|
||||||
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
|
crew_announcement.Announce(input)
|
||||||
log_say("[key_name(usr)] has made a captain announcement: [input]")
|
|
||||||
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
|
|
||||||
message_cooldown = 1
|
message_cooldown = 1
|
||||||
spawn(600)//One minute cooldown
|
spawn(600)//One minute cooldown
|
||||||
message_cooldown = 0
|
message_cooldown = 0
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
author = "NanoTrasen Editor"
|
author = "NanoTrasen Editor"
|
||||||
channel_name = "Nyx Daily"
|
channel_name = "Nyx Daily"
|
||||||
can_be_redacted = 0
|
can_be_redacted = 0
|
||||||
|
message_type = "Story"
|
||||||
|
|
||||||
revolution_inciting_event
|
revolution_inciting_event
|
||||||
|
|
||||||
@@ -128,13 +129,6 @@ proc/check_for_newscaster_updates(type)
|
|||||||
announce_newscaster_news(news)
|
announce_newscaster_news(news)
|
||||||
|
|
||||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
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
|
var/datum/feed_channel/sendto
|
||||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||||
if(FC.channel_name == news.channel_name)
|
if(FC.channel_name == news.channel_name)
|
||||||
@@ -149,6 +143,12 @@ proc/announce_newscaster_news(datum/news_announcement/news)
|
|||||||
sendto.is_admin_channel = 1
|
sendto.is_admin_channel = 1
|
||||||
news_network.network_channels += sendto
|
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
|
sendto.messages += newMsg
|
||||||
|
|
||||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||||
|
|||||||
@@ -330,13 +330,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 << "<b>[newname] is the AI!</b>"
|
||||||
//world << sound('sound/AI/newAI.ogg')
|
//world << sound('sound/AI/newAI.ogg')
|
||||||
// Set eyeobj name
|
// Set eyeobj name
|
||||||
if(A.eyeobj)
|
A.SetName(newname)
|
||||||
A.eyeobj.name = "[newname] (AI Eye)"
|
|
||||||
|
|
||||||
// Set ai pda name
|
|
||||||
if(A.aiPDA)
|
|
||||||
A.aiPDA.owner = newname
|
|
||||||
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
|
|
||||||
|
|
||||||
|
|
||||||
fully_replace_character_name(oldname,newname)
|
fully_replace_character_name(oldname,newname)
|
||||||
|
|||||||
@@ -7,17 +7,20 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
/datum/emergency_shuttle_controller
|
/datum/emergency_shuttle_controller
|
||||||
var/datum/shuttle/ferry/emergency/shuttle
|
var/datum/shuttle/ferry/emergency/shuttle
|
||||||
var/list/escape_pods
|
var/list/escape_pods
|
||||||
|
|
||||||
var/launch_time //the time at which the shuttle will be launched
|
var/launch_time //the time at which the shuttle will be launched
|
||||||
var/auto_recall = 0 //if set, the shuttle will be auto-recalled
|
var/auto_recall = 0 //if set, the shuttle will be auto-recalled
|
||||||
var/auto_recall_time //the time at which the shuttle will be auto-recalled
|
var/auto_recall_time //the time at which the shuttle will be auto-recalled
|
||||||
var/evac = 0 //1 = emergency evacuation, 0 = crew transfer
|
var/evac = 0 //1 = emergency evacuation, 0 = crew transfer
|
||||||
var/wait_for_launch = 0 //if the shuttle is waiting to launch
|
var/wait_for_launch = 0 //if the shuttle is waiting to launch
|
||||||
var/autopilot = 1 //set to 0 to disable the shuttle automatically launching
|
var/autopilot = 1 //set to 0 to disable the shuttle automatically launching
|
||||||
|
|
||||||
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
|
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/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()
|
/datum/emergency_shuttle_controller/proc/process()
|
||||||
if (wait_for_launch)
|
if (wait_for_launch)
|
||||||
@@ -25,28 +28,28 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
recall()
|
recall()
|
||||||
if (world.time >= launch_time) //time to launch the shuttle
|
if (world.time >= launch_time) //time to launch the shuttle
|
||||||
stop_launch_countdown()
|
stop_launch_countdown()
|
||||||
|
|
||||||
if (!shuttle.location) //leaving from the station
|
if (!shuttle.location) //leaving from the station
|
||||||
//launch the pods!
|
//launch the pods!
|
||||||
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
||||||
if (!pod.arming_controller || pod.arming_controller.armed)
|
if (!pod.arming_controller || pod.arming_controller.armed)
|
||||||
pod.launch(src)
|
pod.launch(src)
|
||||||
|
|
||||||
if (autopilot)
|
if (autopilot)
|
||||||
shuttle.launch(src)
|
shuttle.launch(src)
|
||||||
|
|
||||||
//called when the shuttle has arrived.
|
//called when the shuttle has arrived.
|
||||||
|
|
||||||
/datum/emergency_shuttle_controller/proc/shuttle_arrived()
|
/datum/emergency_shuttle_controller/proc/shuttle_arrived()
|
||||||
if (!shuttle.location) //at station
|
if (!shuttle.location) //at station
|
||||||
if (autopilot)
|
if (autopilot)
|
||||||
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
|
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
|
||||||
|
|
||||||
if (evac)
|
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.")
|
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.")
|
||||||
world << sound('sound/AI/shuttledock.ogg')
|
|
||||||
else
|
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
|
//arm the escape pods
|
||||||
if (evac)
|
if (evac)
|
||||||
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
||||||
@@ -64,18 +67,17 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
//calls the shuttle for an emergency evacuation
|
//calls the shuttle for an emergency evacuation
|
||||||
/datum/emergency_shuttle_controller/proc/call_evac()
|
/datum/emergency_shuttle_controller/proc/call_evac()
|
||||||
if(!can_call()) return
|
if(!can_call()) return
|
||||||
|
|
||||||
//set the launch timer
|
//set the launch timer
|
||||||
autopilot = 1
|
autopilot = 1
|
||||||
set_launch_countdown(get_shuttle_prep_time())
|
set_launch_countdown(get_shuttle_prep_time())
|
||||||
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
||||||
|
|
||||||
//reset the shuttle transit time if we need to
|
//reset the shuttle transit time if we need to
|
||||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
||||||
|
|
||||||
evac = 1
|
evac = 1
|
||||||
captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
|
emergency_shuttle_called.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')
|
|
||||||
for(var/area/A in world)
|
for(var/area/A in world)
|
||||||
if(istype(A, /area/hallway))
|
if(istype(A, /area/hallway))
|
||||||
A.readyalert()
|
A.readyalert()
|
||||||
@@ -88,11 +90,11 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
autopilot = 1
|
autopilot = 1
|
||||||
set_launch_countdown(get_shuttle_prep_time())
|
set_launch_countdown(get_shuttle_prep_time())
|
||||||
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
||||||
|
|
||||||
//reset the shuttle transit time if we need to
|
//reset the shuttle transit time if we need to
|
||||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
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
|
//recalls the shuttle
|
||||||
/datum/emergency_shuttle_controller/proc/recall()
|
/datum/emergency_shuttle_controller/proc/recall()
|
||||||
@@ -102,15 +104,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
shuttle.cancel_launch(src)
|
shuttle.cancel_launch(src)
|
||||||
|
|
||||||
if (evac)
|
if (evac)
|
||||||
captain_announce("The emergency shuttle has been recalled.")
|
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.")
|
||||||
world << sound('sound/AI/shuttlerecalled.ogg')
|
|
||||||
|
|
||||||
for(var/area/A in world)
|
for(var/area/A in world)
|
||||||
if(istype(A, /area/hallway))
|
if(istype(A, /area/hallway))
|
||||||
A.readyreset()
|
A.readyreset()
|
||||||
evac = 0
|
evac = 0
|
||||||
else
|
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()
|
/datum/emergency_shuttle_controller/proc/can_call()
|
||||||
if (deny_shuttle)
|
if (deny_shuttle)
|
||||||
@@ -203,14 +204,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
|||||||
if (shuttle.has_arrive_time())
|
if (shuttle.has_arrive_time())
|
||||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||||
return "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
return "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||||
|
|
||||||
if (waiting_to_leave())
|
if (waiting_to_leave())
|
||||||
if (shuttle.moving_status == SHUTTLE_WARMUP)
|
if (shuttle.moving_status == SHUTTLE_WARMUP)
|
||||||
return "Departing..."
|
return "Departing..."
|
||||||
|
|
||||||
var/timeleft = emergency_shuttle.estimate_launch_time()
|
var/timeleft = emergency_shuttle.estimate_launch_time()
|
||||||
return "ETD-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
return "ETD-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
/*
|
/*
|
||||||
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
|
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
|
||||||
|
|||||||
117
code/defines/procs/announce.dm
Normal file
117
code/defines/procs/announce.dm
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/var/datum/announcement/priority/priority_announcement = new(do_log = 0)
|
||||||
|
/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1)
|
||||||
|
/var/datum/announcement/priority/security/security_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 = "Public Station Announcements"
|
||||||
|
var/announcement_type = "Announcement"
|
||||||
|
|
||||||
|
/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/items/AirHorn.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/items/AirHorn.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/items/AirHorn.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 = "")
|
||||||
|
if(!message)
|
||||||
|
return
|
||||||
|
var/tmp/message_title = new_title ? new_title : title
|
||||||
|
|
||||||
|
message = html_encode(message)
|
||||||
|
message_title = html_encode(message_title)
|
||||||
|
|
||||||
|
Message(message, message_title)
|
||||||
|
NewsCast(message, message_title)
|
||||||
|
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(!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()
|
||||||
|
if(!sound)
|
||||||
|
return
|
||||||
|
for(var/mob/M in player_list)
|
||||||
|
if(!istype(M,/mob/new_player) && !isdeaf(M))
|
||||||
|
M << sound
|
||||||
|
|
||||||
|
datum/announcement/proc/Sound()
|
||||||
|
PlaySound()
|
||||||
|
|
||||||
|
datum/announcement/priority/Sound()
|
||||||
|
if(sound)
|
||||||
|
world << sound
|
||||||
|
|
||||||
|
datum/announcement/priority/command/Sound()
|
||||||
|
PlaySound()
|
||||||
|
|
||||||
|
datum/announcement/proc/Log(message as text, message_title as text)
|
||||||
|
if(log)
|
||||||
|
log_say("[key_name(usr)] has made a(n) [announcement_type]: [message_title] - [message] - [announcer]")
|
||||||
|
message_admins("[key_name_admin(usr)] has made a(n) [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
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
/proc/captain_announce(message as text, title = "Priority Announcement", announcer = "")
|
|
||||||
world << "<h1 class='alert'>[html_encode(title)]</h1>"
|
|
||||||
world << "<span class='alert'>[html_encode(message)]</span>"
|
|
||||||
if(announcer)
|
|
||||||
world << "<span class='alert'> -[html_encode(announcer)]</span>"
|
|
||||||
world << "<br>"
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||||
|
|
||||||
/datum/job/captain
|
/datum/job/captain
|
||||||
title = "Captain"
|
title = "Captain"
|
||||||
flag = CAPTAIN
|
flag = CAPTAIN
|
||||||
@@ -32,7 +34,7 @@
|
|||||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
|
||||||
else
|
else
|
||||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
|
||||||
world << "<b>[H.real_name] is the captain!</b>"
|
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
|
||||||
|
|
||||||
H.implant_loyalty(src)
|
H.implant_loyalty(src)
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,11 @@
|
|||||||
var/stat_msg1
|
var/stat_msg1
|
||||||
var/stat_msg2
|
var/stat_msg2
|
||||||
|
|
||||||
|
var/datum/announcement/priority/crew_announcement = new
|
||||||
|
|
||||||
|
/obj/machinery/computer/communications/New()
|
||||||
|
..()
|
||||||
|
crew_announcement.newscast = 1
|
||||||
|
|
||||||
/obj/machinery/computer/communications/process()
|
/obj/machinery/computer/communications/process()
|
||||||
if(..())
|
if(..())
|
||||||
@@ -64,10 +68,12 @@
|
|||||||
if (I && istype(I))
|
if (I && istype(I))
|
||||||
if(src.check_access(I))
|
if(src.check_access(I))
|
||||||
authenticated = 1
|
authenticated = 1
|
||||||
if(20 in I.access)
|
if(access_captain in I.access)
|
||||||
authenticated = 2
|
authenticated = 2
|
||||||
|
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
|
||||||
if("logout")
|
if("logout")
|
||||||
authenticated = 0
|
authenticated = 0
|
||||||
|
crew_announcement.announcer = ""
|
||||||
|
|
||||||
if("swipeidseclevel")
|
if("swipeidseclevel")
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
@@ -101,13 +107,13 @@
|
|||||||
|
|
||||||
if("announce")
|
if("announce")
|
||||||
if(src.authenticated==2)
|
if(src.authenticated==2)
|
||||||
if(message_cooldown) return
|
if(message_cooldown)
|
||||||
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
|
usr << "Please allow at least one minute to pass between announcements"
|
||||||
|
return
|
||||||
|
var/input = stripped_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||||
if(!input || !(usr in view(1,src)))
|
if(!input || !(usr in view(1,src)))
|
||||||
return
|
return
|
||||||
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
|
crew_announcement.Announce(input)
|
||||||
log_say("[key_name(usr)] has made a captain announcement: [input]")
|
|
||||||
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
|
|
||||||
message_cooldown = 1
|
message_cooldown = 1
|
||||||
spawn(600)//One minute cooldown
|
spawn(600)//One minute cooldown
|
||||||
message_cooldown = 0
|
message_cooldown = 0
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
/datum/feed_message
|
/datum/feed_message
|
||||||
var/author =""
|
var/author =""
|
||||||
var/body =""
|
var/body =""
|
||||||
|
var/message_type ="Story"
|
||||||
//var/parent_channel
|
//var/parent_channel
|
||||||
var/backup_body =""
|
var/backup_body =""
|
||||||
var/backup_author =""
|
var/backup_author =""
|
||||||
@@ -218,7 +219,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
dat+="<I>No feed messages found in channel...</I><BR><BR>"
|
dat+="<I>No feed messages found in channel...</I><BR><BR>"
|
||||||
else
|
else
|
||||||
for(var/datum/feed_message/MESSAGE in CHANNEL.messages)
|
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><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||||
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
|
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
|
||||||
@@ -304,7 +305,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
if(MESSAGE.img)
|
if(MESSAGE.img)
|
||||||
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
||||||
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
|
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><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||||
dat+="<BR><A href='?src=\ref[src];setScreen=[1]'>Back</A>"
|
dat+="<BR><A href='?src=\ref[src];setScreen=[1]'>Back</A>"
|
||||||
if(10)
|
if(10)
|
||||||
@@ -339,7 +340,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
dat+="<I>No feed messages found in channel...</I><BR>"
|
dat+="<I>No feed messages found in channel...</I><BR>"
|
||||||
else
|
else
|
||||||
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
|
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+="<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>"
|
dat+="<BR><A href='?src=\ref[src];setScreen=[10]'>Back</A>"
|
||||||
if(13)
|
if(13)
|
||||||
@@ -353,7 +354,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
dat+="<I>No feed messages found in channel...</I><BR>"
|
dat+="<I>No feed messages found in channel...</I><BR>"
|
||||||
else
|
else
|
||||||
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
|
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>"
|
dat+="<BR><A href='?src=\ref[src];setScreen=[11]'>Back</A>"
|
||||||
if(14)
|
if(14)
|
||||||
@@ -840,7 +841,7 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
|
|||||||
if(MESSAGE.img)
|
if(MESSAGE.img)
|
||||||
user << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
user << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
||||||
dat+="<img src='tmp_photo[i].png' width = '180'><BR>"
|
dat+="<img src='tmp_photo[i].png' width = '180'><BR>"
|
||||||
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR><BR>"
|
dat+="<FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR><BR>"
|
||||||
dat+="</ul>"
|
dat+="</ul>"
|
||||||
if(scribble_page==curr_page)
|
if(scribble_page==curr_page)
|
||||||
dat+="<BR><I>There is a small scribble near the end of this page... It reads: \"[src.scribble]\"</I>"
|
dat+="<BR><I>There is a small scribble near the end of this page... It reads: \"[src.scribble]\"</I>"
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
|||||||
var/dpt = ""; //the department which will be receiving the message
|
var/dpt = ""; //the department which will be receiving the message
|
||||||
var/priority = -1 ; //Priority of the message being sent
|
var/priority = -1 ; //Priority of the message being sent
|
||||||
luminosity = 0
|
luminosity = 0
|
||||||
|
var/datum/announcement/announcement = new
|
||||||
|
|
||||||
/obj/machinery/requests_console/power_change()
|
/obj/machinery/requests_console/power_change()
|
||||||
..()
|
..()
|
||||||
@@ -70,6 +71,10 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
|||||||
|
|
||||||
/obj/machinery/requests_console/New()
|
/obj/machinery/requests_console/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
announcement.title = "[department] announcement"
|
||||||
|
announcement.newscast = 1
|
||||||
|
|
||||||
name = "[department] Requests Console"
|
name = "[department] Requests Console"
|
||||||
allConsoles += src
|
allConsoles += src
|
||||||
//req_console_departments += department
|
//req_console_departments += department
|
||||||
@@ -189,7 +194,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
|||||||
|
|
||||||
else //main menu
|
else //main menu
|
||||||
screen = 0
|
screen = 0
|
||||||
announceAuth = 0
|
reset_announce()
|
||||||
if (newmessagepriority == 1)
|
if (newmessagepriority == 1)
|
||||||
dat += text("<FONT COLOR='RED'>There are new messages</FONT><BR>")
|
dat += text("<FONT COLOR='RED'>There are new messages</FONT><BR>")
|
||||||
if (newmessagepriority == 2)
|
if (newmessagepriority == 2)
|
||||||
@@ -240,17 +245,13 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
|||||||
if("2") priority = 2
|
if("2") priority = 2
|
||||||
else priority = -1
|
else priority = -1
|
||||||
else
|
else
|
||||||
message = ""
|
reset_announce()
|
||||||
announceAuth = 0
|
|
||||||
screen = 0
|
screen = 0
|
||||||
|
|
||||||
if(href_list["sendAnnouncement"])
|
if(href_list["sendAnnouncement"])
|
||||||
if(!announcementConsole) return
|
if(!announcementConsole) return
|
||||||
for(var/mob/M in player_list)
|
announcement.Announce(message)
|
||||||
if(!istype(M,/mob/new_player))
|
reset_announce()
|
||||||
M << "<b><font size = 3><font color = red>[department] announcement:</font color> [message]</font size></b>"
|
|
||||||
announceAuth = 0
|
|
||||||
message = ""
|
|
||||||
screen = 0
|
screen = 0
|
||||||
|
|
||||||
if( href_list["department"] && message )
|
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
|
var/obj/item/weapon/card/id/ID = O
|
||||||
if (access_RC_announce in ID.GetAccess())
|
if (access_RC_announce in ID.GetAccess())
|
||||||
announceAuth = 1
|
announceAuth = 1
|
||||||
|
announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
|
||||||
else
|
else
|
||||||
announceAuth = 0
|
reset_announce()
|
||||||
user << "\red You are not authorized to send announcements."
|
user << "\red You are not authorized to send announcements."
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
if (istype(O, /obj/item/weapon/stamp))
|
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>")
|
msgStamped = text("<font color='blue'><b>Stamped with the [T.name]</b></font>")
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/machinery/requests_console/proc/reset_announce()
|
||||||
|
announceAuth = 0
|
||||||
|
message = ""
|
||||||
|
announcement.announcer = ""
|
||||||
|
|||||||
@@ -133,11 +133,11 @@ proc/trigger_armed_response_team(var/force = 0)
|
|||||||
|
|
||||||
// there's only a certain chance a team will be sent
|
// there's only a certain chance a team will be sent
|
||||||
if(!prob(send_team_chance))
|
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.
|
can_call_ert = 0 // Only one call per round, ladies.
|
||||||
return
|
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.
|
can_call_ert = 0 // Only one call per round, gentleman.
|
||||||
send_emergency_team = 1
|
send_emergency_team = 1
|
||||||
|
|||||||
@@ -78,6 +78,13 @@ var/global/economy_init = 0
|
|||||||
return 2
|
return 2
|
||||||
|
|
||||||
var/datum/feed_channel/newChannel = new /datum/feed_channel
|
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 = "Nyx Daily"
|
newChannel.channel_name = "Nyx Daily"
|
||||||
newChannel.author = "CentComm Minister of Information"
|
newChannel.author = "CentComm Minister of Information"
|
||||||
newChannel.locked = 1
|
newChannel.locked = 1
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ var/list/ai_verbs_default = list(
|
|||||||
var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
|
var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
|
||||||
var/datum/trackable/track = null
|
var/datum/trackable/track = null
|
||||||
var/last_announcement = ""
|
var/last_announcement = ""
|
||||||
|
var/datum/announcement/priority/announcement
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/add_ai_verbs()
|
/mob/living/silicon/ai/proc/add_ai_verbs()
|
||||||
src.verbs += ai_verbs_default
|
src.verbs += ai_verbs_default
|
||||||
@@ -85,6 +86,11 @@ var/list/ai_verbs_default = list(
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
|
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
|
||||||
|
announcement = new()
|
||||||
|
announcement.title = "A.I. Announcement"
|
||||||
|
announcement.announcement_type = "A.I. Announcement"
|
||||||
|
announcement.newscast = 1
|
||||||
|
|
||||||
var/list/possibleNames = ai_names
|
var/list/possibleNames = ai_names
|
||||||
|
|
||||||
var/pickedName = null
|
var/pickedName = null
|
||||||
@@ -95,8 +101,8 @@ var/list/ai_verbs_default = list(
|
|||||||
possibleNames -= pickedName
|
possibleNames -= pickedName
|
||||||
pickedName = null
|
pickedName = null
|
||||||
|
|
||||||
real_name = pickedName
|
aiPDA = new/obj/item/device/pda/ai(src)
|
||||||
name = real_name
|
SetName(pickedName)
|
||||||
anchored = 1
|
anchored = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
density = 1
|
density = 1
|
||||||
@@ -112,11 +118,6 @@ var/list/ai_verbs_default = list(
|
|||||||
else
|
else
|
||||||
laws = new base_law_type
|
laws = new base_law_type
|
||||||
|
|
||||||
aiPDA = new/obj/item/device/pda/ai(src)
|
|
||||||
aiPDA.owner = name
|
|
||||||
aiPDA.ownjob = "AI"
|
|
||||||
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
|
|
||||||
|
|
||||||
aiMulti = new(src)
|
aiMulti = new(src)
|
||||||
aiRadio = new(src)
|
aiRadio = new(src)
|
||||||
aiRadio.myAi = src
|
aiRadio.myAi = src
|
||||||
@@ -167,7 +168,6 @@ var/list/ai_verbs_default = list(
|
|||||||
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
|
|
||||||
|
|
||||||
ai_list += src
|
ai_list += src
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
@@ -176,6 +176,18 @@ var/list/ai_verbs_default = list(
|
|||||||
ai_list -= src
|
ai_list -= src
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/SetName(pickedName as text)
|
||||||
|
real_name = pickedName
|
||||||
|
name = pickedName
|
||||||
|
announcement.announcer = pickedName
|
||||||
|
if(eyeobj)
|
||||||
|
eyeobj.name = "[pickedName] (AI Eye)"
|
||||||
|
|
||||||
|
// Set ai pda name
|
||||||
|
if(aiPDA)
|
||||||
|
aiPDA.ownjob = "AI"
|
||||||
|
aiPDA.owner = pickedName
|
||||||
|
aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
|
The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
|
||||||
@@ -321,9 +333,7 @@ var/list/ai_verbs_default = list(
|
|||||||
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
|
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
|
||||||
return
|
return
|
||||||
|
|
||||||
captain_announce(input, "A.I. Announcement", src.name)
|
announcement.Announce(input)
|
||||||
log_say("[key_name(usr)] has made an AI announcement: [input]")
|
|
||||||
message_admins("[key_name_admin(usr)] has made an AI announcement.", 1)
|
|
||||||
message_cooldown = 1
|
message_cooldown = 1
|
||||||
spawn(600)//One minute cooldown
|
spawn(600)//One minute cooldown
|
||||||
message_cooldown = 0
|
message_cooldown = 0
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ proc/isorgan(A)
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
proc/isdeaf(A)
|
||||||
|
if(istype(A, /mob))
|
||||||
|
var/mob/M = A
|
||||||
|
return (M.sdisabilities & DEAF) || M.ear_deaf
|
||||||
|
return 0
|
||||||
|
|
||||||
proc/hasorgans(A)
|
proc/hasorgans(A)
|
||||||
return ishuman(A)
|
return ishuman(A)
|
||||||
|
|
||||||
@@ -317,11 +323,11 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
|||||||
|
|
||||||
|
|
||||||
/proc/shake_camera(mob/M, duration, strength=1)
|
/proc/shake_camera(mob/M, duration, strength=1)
|
||||||
if(!M || !M.client || M.shakecamera)
|
if(!M || !M.client || M.shakecamera)
|
||||||
return
|
return
|
||||||
M.shakecamera = 1
|
M.shakecamera = 1
|
||||||
spawn(1)
|
spawn(1)
|
||||||
|
|
||||||
var/atom/oldeye=M.client.eye
|
var/atom/oldeye=M.client.eye
|
||||||
var/aiEyeFlag = 0
|
var/aiEyeFlag = 0
|
||||||
if(istype(oldeye, /mob/aiEye))
|
if(istype(oldeye, /mob/aiEye))
|
||||||
|
|||||||
@@ -21,8 +21,7 @@
|
|||||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||||
switch(level)
|
switch(level)
|
||||||
if(SEC_LEVEL_GREEN)
|
if(SEC_LEVEL_GREEN)
|
||||||
world << "<font size=4 color='red'>Attention! Security level lowered to green</font>"
|
security_announcement.Announce("[config.alert_desc_green]", "Attention! Security level lowered to green")
|
||||||
world << "<font color='red'>[config.alert_desc_green]</font>"
|
|
||||||
security_level = SEC_LEVEL_GREEN
|
security_level = SEC_LEVEL_GREEN
|
||||||
for(var/obj/machinery/firealarm/FA in machines)
|
for(var/obj/machinery/firealarm/FA in machines)
|
||||||
if(FA.z == 1 || FA.z == 5)
|
if(FA.z == 1 || FA.z == 5)
|
||||||
@@ -30,11 +29,9 @@
|
|||||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
FA.overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
||||||
if(SEC_LEVEL_BLUE)
|
if(SEC_LEVEL_BLUE)
|
||||||
if(security_level < SEC_LEVEL_BLUE)
|
if(security_level < SEC_LEVEL_BLUE)
|
||||||
world << "<font size=4 color='red'>Attention! Security level elevated to blue</font>"
|
security_announcement.Announce("[config.alert_desc_blue_upto]", "Attention! Security level elevated to blue")
|
||||||
world << "<font color='red'>[config.alert_desc_blue_upto]</font>"
|
|
||||||
else
|
else
|
||||||
world << "<font size=4 color='red'>Attention! Security level lowered to blue</font>"
|
security_announcement.Announce("[config.alert_desc_blue_downto]", "Attention! Security level lowered to blue")
|
||||||
world << "<font color='red'>[config.alert_desc_blue_downto]</font>"
|
|
||||||
security_level = SEC_LEVEL_BLUE
|
security_level = SEC_LEVEL_BLUE
|
||||||
for(var/obj/machinery/firealarm/FA in machines)
|
for(var/obj/machinery/firealarm/FA in machines)
|
||||||
if(FA.z == 1 || FA.z == 5)
|
if(FA.z == 1 || FA.z == 5)
|
||||||
@@ -42,11 +39,9 @@
|
|||||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue")
|
FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue")
|
||||||
if(SEC_LEVEL_RED)
|
if(SEC_LEVEL_RED)
|
||||||
if(security_level < SEC_LEVEL_RED)
|
if(security_level < SEC_LEVEL_RED)
|
||||||
world << "<font size=4 color='red'>Attention! Code red!</font>"
|
security_announcement.Announce("[config.alert_desc_red_upto]", "Attention! Code red!")
|
||||||
world << "<font color='red'>[config.alert_desc_red_upto]</font>"
|
|
||||||
else
|
else
|
||||||
world << "<font size=4 color='red'>Attention! Code red!</font>"
|
security_announcement.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
|
||||||
world << "<font color='red'>[config.alert_desc_red_downto]</font>"
|
|
||||||
security_level = SEC_LEVEL_RED
|
security_level = SEC_LEVEL_RED
|
||||||
|
|
||||||
/* - At the time of commit, setting status displays didn't work properly
|
/* - At the time of commit, setting status displays didn't work properly
|
||||||
@@ -60,8 +55,7 @@
|
|||||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_red")
|
FA.overlays += image('icons/obj/monitors.dmi', "overlay_red")
|
||||||
|
|
||||||
if(SEC_LEVEL_DELTA)
|
if(SEC_LEVEL_DELTA)
|
||||||
world << "<font size=4 color='red'>Attention! Delta security level reached!</font>"
|
security_announcement.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!")
|
||||||
world << "<font color='red'>[config.alert_desc_delta]</font>"
|
|
||||||
security_level = SEC_LEVEL_DELTA
|
security_level = SEC_LEVEL_DELTA
|
||||||
for(var/obj/machinery/firealarm/FA in machines)
|
for(var/obj/machinery/firealarm/FA in machines)
|
||||||
if(FA.z == 1 || FA.z == 5)
|
if(FA.z == 1 || FA.z == 5)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
if (istype(in_use, /obj/machinery/computer/shuttle_control/emergency))
|
if (istype(in_use, /obj/machinery/computer/shuttle_control/emergency))
|
||||||
var/obj/machinery/computer/shuttle_control/emergency/C = in_use
|
var/obj/machinery/computer/shuttle_control/emergency/C = in_use
|
||||||
C.reset_authorization()
|
C.reset_authorization()
|
||||||
|
|
||||||
emergency_shuttle.shuttle_arrived()
|
emergency_shuttle.shuttle_arrived()
|
||||||
|
|
||||||
/datum/shuttle/ferry/emergency/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
|
/datum/shuttle/ferry/emergency/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
|
||||||
@@ -26,9 +26,9 @@
|
|||||||
emergency_shuttle.departed = 1
|
emergency_shuttle.departed = 1
|
||||||
|
|
||||||
if (emergency_shuttle.evac)
|
if (emergency_shuttle.evac)
|
||||||
captain_announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
priority_announcement.Announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||||
else
|
else
|
||||||
captain_announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
priority_announcement.Announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||||
|
|
||||||
..(origin, destination)
|
..(origin, destination)
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
/datum/shuttle/ferry/emergency/can_force(var/user)
|
/datum/shuttle/ferry/emergency/can_force(var/user)
|
||||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
||||||
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
||||||
|
|
||||||
//initiating or cancelling a launch ALWAYS requires authorization, but if we are already set to launch anyways than forcing does not.
|
//initiating or cancelling a launch ALWAYS requires authorization, but if we are already set to launch anyways than forcing does not.
|
||||||
//this is so that people can force launch if the docking controller cannot safely undock without needing X heads to swipe.
|
//this is so that people can force launch if the docking controller cannot safely undock without needing X heads to swipe.
|
||||||
if (process_state != WAIT_LAUNCH && !C.has_authorization())
|
if (process_state != WAIT_LAUNCH && !C.has_authorization())
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
if(href_list["removeid"])
|
if(href_list["removeid"])
|
||||||
var/dna_hash = href_list["removeid"]
|
var/dna_hash = href_list["removeid"]
|
||||||
authorized -= dna_hash
|
authorized -= dna_hash
|
||||||
|
|
||||||
if(!emagged && href_list["scanid"])
|
if(!emagged && href_list["scanid"])
|
||||||
//They selected an empty entry. Try to scan their id.
|
//They selected an empty entry. Try to scan their id.
|
||||||
if (ishuman(usr))
|
if (ishuman(usr))
|
||||||
|
|||||||
Reference in New Issue
Block a user