Merge pull request #2090 from Markolie/fixesss

Radio examine/matter eater fix, GC testing move
This commit is contained in:
Fox-McCloud
2015-09-18 01:20:27 -04:00
7 changed files with 145 additions and 136 deletions
@@ -29,7 +29,7 @@
/obj/item/device/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/device/radio/headset/examine(mob/user)
/obj/item/device/radio/headset/examine(mob/user, var/distance = -1)
if(!(..(user, 1) && radio_desc))
return
@@ -286,7 +286,6 @@
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
@@ -294,20 +293,15 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(keyslot1 || keyslot2)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot1)
var/turf/T = get_turf(user)
if(T)
keyslot1.loc = T
keyslot1 = null
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
@@ -316,7 +310,6 @@
recalculateChannels()
user << "You pop out the encryption keys in the headset!"
else
user << "This headset doesn't have any encryption keys! How useless..."
@@ -329,15 +322,12 @@
user.drop_item()
W.loc = src
keyslot1 = W
else
user.drop_item()
W.loc = src
keyslot2 = W
recalculateChannels()
return
@@ -514,14 +514,14 @@ var/global/list/default_medbay_channels = list(
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/examine(mob/user)
..(user)
/obj/item/device/radio/examine(mob/user, var/distance = -1)
. = ..(user, distance)
if ((in_range(src, user) || loc == user))
if (b_stat)
user.show_message("\blue \the [src] can be attached and modified!")
else
user.show_message("\blue \the [src] can not be modified or attached!")
return
return .
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()