mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Allows for command reports to come from other people than centcom
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/var/datum/announcement/minor/minor_announcement = new()
|
||||
/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/enemy/communications_announcement = new(do_log = 0, do_newscast = 1)
|
||||
|
||||
|
||||
/datum/announcement
|
||||
var/title = "Attention"
|
||||
@@ -16,7 +18,7 @@
|
||||
sound = new_sound
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
|
||||
|
||||
/datum/announcement/minor/New(var/do_log = 0, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Attention"
|
||||
@@ -32,12 +34,17 @@
|
||||
title = "[command_name()] Update"
|
||||
announcement_type = "[command_name()] Update"
|
||||
|
||||
/datum/announcement/priority/enemy/New(var/do_log = 1, var/new_sound = sound('sound/AI/intercept2.ogg'), var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "[command_name()] Update"
|
||||
announcement_type = "Enemy Communications"
|
||||
|
||||
/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, var/msg_sanitized = 0)
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/from)
|
||||
if(!message)
|
||||
return
|
||||
var/tmp/message_title = new_title ? new_title : title
|
||||
@@ -47,7 +54,7 @@
|
||||
message = trim_strip_html_properly(message)
|
||||
message_title = html_encode(message_title)
|
||||
|
||||
Message(message, message_title)
|
||||
Message(message, message_title, from)
|
||||
if(do_newscast)
|
||||
NewsCast(message, message_title)
|
||||
Sound(message_sound)
|
||||
@@ -84,6 +91,18 @@ datum/announcement/priority/command/Message(message as text, message_title as te
|
||||
if(!istype(M,/mob/new_player) && !isdeaf(M))
|
||||
M << command
|
||||
|
||||
datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text)
|
||||
var/command
|
||||
command += "<h1 class='alert'>[from]</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>"
|
||||
|
||||
Reference in New Issue
Block a user