Merge remote-tracking branch 'upstream/master' into botany-rework

This commit is contained in:
Fox-McCloud
2017-01-23 01:01:09 -05:00
102 changed files with 366 additions and 260 deletions
@@ -128,8 +128,8 @@
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
S.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
S.create_attack_log("<font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
else
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at their sensors.</span>"
@@ -142,7 +142,7 @@
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
user.create_attack_log("[user.name] ([user.ckey]) EMPd a camera with a laser pointer")
else
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
@@ -63,18 +63,16 @@
return RADIO_CONNECTION_FAIL
return ..()
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
if(aiOverride)
return ..(freq, level)
/obj/item/device/radio/headset/is_listening()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.l_ear == src || H.r_ear == src)
return ..(freq, level)
else if(isanimal(loc))
// frankly, all the ones with inventory are small enough to not warrant snowflaking the slot check somehow
return ..(freq, level)
return -1
return ..()
else if(isanimal(loc) || isAI(loc))
return ..()
return FALSE
/obj/item/device/radio/headset/alt
name = "bowman headset"
@@ -304,10 +302,10 @@
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
/obj/item/device/radio/headset/heads/ai_integrated/is_listening()
if(disabledAi)
return -1 //Transciever Disabled.
return ..(freq, level, 1)
return FALSE
return ..()
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.set_machine(src)
@@ -120,15 +120,13 @@
attack_self(user)
/obj/item/device/radio/intercom/receive_range(freq, level)
if(!on)
if(!is_listening())
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
// TODO: Integrate radio with the space manager
if(isnull(position) || !(position.z in level))
return -1
if(!src.listening)
return -1
if(freq in ANTAG_FREQS)
if(!(src.syndie))
return -1//Prevents broadcast of messages over devices lacking the encryption
+20 -7
View File
@@ -71,6 +71,7 @@ var/global/list/default_medbay_channels = list(
initialize()
internal_channels = default_internal_channels.Copy()
global_radios |= src
/obj/item/device/radio/Destroy()
qdel(wires)
@@ -80,6 +81,7 @@ var/global/list/default_medbay_channels = list(
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
patch_link = null
global_radios -= src
return ..()
@@ -532,19 +534,15 @@ var/global/list/default_medbay_channels = list(
// what the range is in which mobs will hear the radio
// returns: -1 if can't receive, range otherwise
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
return -1
if(!listening)
if(!is_listening())
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
if(!position || !(position.z in level))
return -1
if(freq in ANTAG_FREQS)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
if(!(syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return -1
if(!on)
return -1
if(!freq) //recieved on main frequency
if(!listening)
return -1
@@ -561,11 +559,26 @@ var/global/list/default_medbay_channels = list(
return canhear_range
/obj/item/device/radio/proc/send_hear(freq, level)
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)
is_listening = FALSE
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
is_listening = FALSE
if(!listening)
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)
. = ..(user, distance)
@@ -115,8 +115,8 @@
if(!user.IsAdvancedToolUser())
return 0
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
M.create_attack_log("<font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
if(!iscarbon(user))
@@ -566,7 +566,7 @@
to_chat(user, "Planting explosives...")
user.visible_message("[user.name] is fiddling with their toolbelt.")
if(ismob(target))
user.attack_log += "\[[time_stamp()]\] <font color='red'> [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])</font>"
user.create_attack_log("<font color='red'> [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])</font>")
log_attack("<font color='red'> [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])</font>")
user.visible_message("\red [user.name] is trying to strap a belt to [target.name]!")
@@ -578,7 +578,7 @@
var/location
if(isturf(target)) location = target
if(ismob(target))
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
target:create_attack_log("<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>")
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
to_chat(user, "You sacrifice your belt for the sake of justice. Timer counting down from 15.")
@@ -44,8 +44,8 @@
chaplain = 1
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.create_attack_log("<font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if(!iscarbon(user))
+2 -2
View File
@@ -382,8 +382,8 @@
if(M.stat!=2)
M.emote("scream")
if(istype(user))
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been cremated by [user.name] ([user.ckey])</font>"
user.attack_log +="\[[time_stamp()]\] <font color='red'>Cremated [M.name] ([M.ckey])</font>"
M.create_attack_log("<font color='orange'>Has been cremated by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='red'>Cremated [M.name] ([M.ckey])</font>")
log_attack("[user.name] ([user.ckey]) cremated [M.name] ([M.ckey])")
M.death(1)
if(!M || !isnull(M.gcDestroyed))