Adds Radio Jammers

This commit is contained in:
Fox-McCloud
2017-06-30 18:20:21 -04:00
parent 52af2d8c0e
commit 08c8ba569c
6 changed files with 37 additions and 2 deletions
@@ -332,6 +332,12 @@ var/global/list/default_medbay_channels = list(
var/datum/radio_frequency/connection = message_mode
var/turf/position = get_turf(src)
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
if(get_dist(position, get_turf(jammer)) < jammer.range)
jammed = TRUE
break
//#### Tagging the signal with all appropriate identity values ####//
// ||-- The mob's name identity --||
@@ -345,6 +351,9 @@ var/global/list/default_medbay_channels = list(
var/jobname // the mob's "job"
if(jammed)
message = Gibberish(message, 100)
// --- Human: use their actual job ---
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -146,3 +146,22 @@ effective or pretty fucking useless.
attack_self(usr)
add_fingerprint(usr)
return
/obj/item/device/jammer
name = "radio jammer"
desc = "Device used to disrupt nearby radio communication."
icon_state = "jammer"
var/active = FALSE
var/range = 12
/obj/item/device/jammer/Destroy()
active_jammers -= src
return ..()
/obj/item/device/jammer/attack_self(mob/user)
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
active = !active
if(active)
active_jammers |= src
else
active_jammers -= src