Merge remote-tracking branch 'upstream/master' into job_refactor_tg

This commit is contained in:
Tigercat2000
2017-02-25 05:42:47 -08:00
195 changed files with 4145 additions and 3442 deletions
+15 -18
View File
@@ -12,24 +12,22 @@
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot speak in IC (muted).")
return
if(!ishuman(user))
to_chat(user, "\red You don't know how to use this!")
if(user.client && (user.client.prefs.muted & MUTE_IC))
to_chat(src, "<span class='warning'>You cannot speak in IC (muted).</span>")
return
if(user.silent)
if(!ishuman(user))
to_chat(user, "<span class='warning'>You don't know how to use this!</span>")
return
if(!user.can_speak())
to_chat(user, "<span class='warning'>You find yourself unable to speak at all.</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H && H.mind)
if(H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(H && H.mind && H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(spamcheck)
to_chat(user, "\red \The [src] needs to recharge!")
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
return
var/message = input(user, "Shout a message:", "Megaphone") as text|null
@@ -39,28 +37,27 @@
if(!message)
return
message = capitalize(message)
if((src.loc == user && usr.stat == 0))
if((loc == user && !user.incapacitated()))
if(emagged)
if(insults)
saymsg(user, pick(insultmsg))
insults--
else
to_chat(user, "\red *BZZZZzzzzzt*")
to_chat(user, "<span class='warning'>*BZZZZzzzzzt*</span>")
else
saymsg(user, message)
spamcheck = 1
spawn(20)
spamcheck = 0
return
/obj/item/device/megaphone/proc/saymsg(mob/living/user as mob, message)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <FONT size=3>\"[message]\"</FONT></span>", hearing_distance = 14)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
for(var/obj/O in oview(14, get_turf(src)))
O.hear_talk(user, "<FONT size=3>[message]</FONT>")
O.hear_talk(user, "<span class='reallybig'>[message]</span>")
/obj/item/device/megaphone/emag_act(user as mob)
if(!emagged)
to_chat(user, "\red You overload \the [src]'s voice synthesizer.")
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
emagged = 1
insults = rand(1, 3)//to prevent dickflooding
@@ -242,7 +242,6 @@ var/global/list/default_medbay_channels = list(
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if(channel == "department")
// to_chat(world, "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
channel = channels[1]
connection = secure_radio_connections[channel]
else
@@ -259,9 +258,8 @@ var/global/list/default_medbay_channels = list(
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
4, 0, zlevel, connection.frequency, follow_target=follow_target)
4, 0, zlevel, connection.frequency, follow_target = follow_target)
qdel(A)
return
// Just a dummy mob used for making announcements, so we don't create AIs to do this
// I'm not sure who thought that was a good idea. -- Crazylemon
@@ -403,6 +401,7 @@ var/global/list/default_medbay_channels = list(
// Identity-associated tags:
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"race" = signal.get_race(M),
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
@@ -464,6 +463,7 @@ var/global/list/default_medbay_channels = list(
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"race" = signal.get_race(M), // text to show next to mob in comms log console
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
@@ -562,7 +562,7 @@ var/global/list/default_medbay_channels = list(
var/range = receive_range(freq, level)
if(range > -1)
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/proc/is_listening()
var/is_listening = TRUE
if(!on)
@@ -573,11 +573,11 @@ var/global/list/default_medbay_channels = list(
is_listening = FALSE
return is_listening
/obj/item/device/radio/proc/send_announcement()
if(is_listening())
return get_mobs_in_view(canhear_range, src)
return null
/obj/item/device/radio/examine(mob/user, var/distance = -1)
@@ -3,6 +3,7 @@
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
var/mobname = "Will Robinson"
activated = 0
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_station, /area/syndicate_mothership, /area/shuttle/syndicate_elite))
/obj/item/weapon/implant/death_alarm/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -33,26 +34,26 @@
/obj/item/weapon/implant/death_alarm/activate(var/cause)
var/mob/M = imp_in
var/area/t = get_area(M)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.follow_target = M
switch(cause)
if("death")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
if(is_type_in_typecache(t, stealth_areas))
//give the syndies a bit of stealth
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm")
else
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
qdel(a)
qdel(src)
if("emp")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
var/name = prob(50) ? t.name : pick(teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
qdel(a)
else
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
qdel(a)
qdel(src)
qdel(a)
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
activate("emp") //let's shout that this dude is dead