diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index d05289e2cb..159134f83c 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -1,115 +1,196 @@ -/obj/item/device/spy_bug - name = "bug" - desc = "" // Nothing to see here +/obj/item/device/camerabug + name = "mobile camera pod" + desc = "A camera pod used by tactical operators. Must be linked to a camera scanner unit." + icon = 'icons/obj/grenade.dmi' + icon_state = "camgrenade" + item_state = "empgrenade" + flags = CONDUCT + w_class = ITEMSIZE_SMALL + force = 0 + throwforce = 5.0 + throw_range = 15 + throw_speed = 3 + origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) + var/obj/item/device/bug_monitor/linkedmonitor + var/brokentype = /obj/item/brokenbug + +// var/obj/item/device/radio/bug/radio + var/obj/machinery/camera/bug/camera + +/obj/item/device/camerabug/New() + ..() +// radio = new(src) + camera = new(src) + +/obj/item/device/camerabug/attack_self(mob/user) + if(user.a_intent == I_HURT) + to_chat(user, "You crush the [src] under your foot, breaking it.") + visible_message("[user.name] crushes the [src] under their foot, breaking it!") + new brokentype(get_turf(src)) + spawn(0) + qdel(src) +/* else + user.set_machine(radio) + radio.interact(user) +*/ +/obj/item/device/camerabug/verb/reset() + set name = "Reset camera bug" + set category = "Object" + if(linkedmonitor) + linkedmonitor.unpair(src) + linkedmonitor = null + qdel(camera) + camera = new(src) + to_chat(usr, "You turn the [src] off and on again, delinking it from any monitors.") + +/obj/item/brokenbug + name = "broken mobile camera pod" + desc = "A camera pod formerly used by tactical operators. The lens is smashed, and the circuits are damaged beyond repair." + icon = 'icons/obj/grenade.dmi' + icon_state = "camgrenadebroken" + item_state = "empgrenade" + flags = CONDUCT + force = 5.0 + w_class = ITEMSIZE_SMALL + throwforce = 5.0 + throw_range = 15 + throw_speed = 3 + origin_tech = list(TECH_ENGINEERING = 1) + +/obj/item/brokenbug/spy + name = "broken bug" + desc = "" //Even when it's broken it's inconspicuous icon = 'icons/obj/weapons.dmi' icon_state = "eshield0" item_state = "nothing" layer = TURF_LAYER+0.2 - - flags = CONDUCT - force = 5.0 w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS + origin_tech = list(TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) //crush it and you lose the data + flags = CONDUCT + force = 0 throwforce = 5.0 throw_range = 15 throw_speed = 3 +/obj/item/device/camerabug/spy + name = "bug" + desc = "" //Nothing to see here + icon = 'icons/obj/weapons.dmi' + icon_state = "eshield0" + item_state = "nothing" + layer = TURF_LAYER+0.2 + w_class = ITEMSIZE_TINY + slot_flags = SLOT_EARS origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) - var/obj/item/device/radio/spy/radio - var/obj/machinery/camera/spy/camera - -/obj/item/device/spy_bug/New() - ..() - radio = new(src) - camera = new(src) - -/obj/item/device/spy_bug/examine(mob/user) +/obj/item/device/camerabug/examine(mob/user) . = ..(user, 0) if(.) - user << "It's a tiny camera, microphone, and transmission device in a happy union." - user << "Needs to be both configured and brought in contact with monitor device to be fully functional." + to_chat(user, "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional.") -/obj/item/device/spy_bug/attack_self(mob/user) - radio.attack_self(user) - -/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob) - if(istype(W, /obj/item/device/spy_monitor)) - var/obj/item/device/spy_monitor/SM = W - SM.pair(src, user) +/obj/item/device/camerabug/attackby(obj/item/W as obj, mob/living/user as mob) + if(istype(W, /obj/item/device/bug_monitor)) + var/obj/item/device/bug_monitor/SM = W + if(!linkedmonitor) + to_chat(user, "\The [src] has been paired with \the [SM].") + SM.pair(src) + linkedmonitor = SM + else if (linkedmonitor == SM) + to_chat(user, "\The [src] has been unpaired from \the [SM].") + linkedmonitor.unpair(src) + linkedmonitor = null + else + to_chat(user, "Error: The device is linked to another monitor.") else + if(W.force >= 5) + visible_message("\The [src] lens shatters!") + new brokentype(get_turf(src)) + if(linkedmonitor) + linkedmonitor.unpair(src) + linkedmonitor = null + spawn(0) + qdel(src) ..() -/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking) +/obj/item/device/camerabug/bullet_act() + visible_message("The [src] lens shatters!") + new brokentype(get_turf(src)) + if(linkedmonitor) + linkedmonitor.unpair(src) + linkedmonitor = null + spawn(0) + qdel(src) + +/obj/item/device/camerabug/Destroy() + if(linkedmonitor) + linkedmonitor.unpair(src) + linkedmonitor = null + ..() +/* +/obj/item/device/camerabug/hear_talk(mob/M, var/msg, verb, datum/language/speaking) radio.hear_talk(M, msg, speaking) - - -/obj/item/device/spy_monitor - name = "\improper PDA" - desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge." - icon = 'icons/obj/pda.dmi' - icon_state = "pda" +*/ +/obj/item/device/bug_monitor + name = "mobile camera pod monitor" + desc = "A portable camera console designed to work with mobile camera pods." + icon = 'icons/obj/device.dmi' + icon_state = "forensic0" item_state = "electronic" - - w_class = ITEMSIZE_SMALL - - origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) + w_class = ITEMSIZE_SMALL + origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) var/operating = 0 - var/obj/item/device/radio/spy/radio - var/obj/machinery/camera/spy/selected_camera - var/list/obj/machinery/camera/spy/cameras = new() - -/obj/item/device/spy_monitor/New() +// var/obj/item/device/radio/bug/radio + var/obj/machinery/camera/bug/selected_camera + var/list/obj/machinery/camera/bug/cameras = new() +/* +/obj/item/device/bug_monitor/New() radio = new(src) - -/obj/item/device/spy_monitor/examine(mob/user) - . = ..(user, 1) - if(.) - user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made." - -/obj/item/device/spy_monitor/attack_self(mob/user) +*/ +/obj/item/device/bug_monitor/attack_self(mob/user) if(operating) return - radio.attack_self(user) +// radio.attack_self(user) view_cameras(user) -/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob) - if(istype(W, /obj/item/device/spy_bug)) - pair(W, user) +/obj/item/device/bug_monitor/attackby(obj/item/W as obj, mob/living/user as mob) + if(istype(W, /obj/item/device/camerabug)) + W.attackby(src, user) else return ..() -/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user) +/obj/item/device/bug_monitor/proc/unpair(var/obj/item/device/camerabug/SB) if(SB.camera in cameras) - user << "\The [SB] has been unpaired from \the [src]." cameras -= SB.camera - else - user << "\The [SB] has been paired with \the [src]." - cameras += SB.camera -/obj/item/device/spy_monitor/proc/view_cameras(mob/user) +/obj/item/device/bug_monitor/proc/pair(var/obj/item/device/camerabug/SB) + cameras += SB.camera + +/obj/item/device/bug_monitor/proc/view_cameras(mob/user) if(!can_use_cam(user)) return selected_camera = cameras[1] + user.reset_view(selected_camera) view_camera(user) operating = 1 while(selected_camera && Adjacent(user)) - selected_camera = input("Select camera bug to view.") as null|anything in cameras + selected_camera = input("Select camera to view.") as null|anything in cameras selected_camera = null operating = 0 -/obj/item/device/spy_monitor/proc/view_camera(mob/user) +/obj/item/device/bug_monitor/proc/view_camera(mob/user) spawn(0) while(selected_camera && Adjacent(user)) var/turf/T = get_turf(selected_camera) if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use()) user.unset_machine() user.reset_view(null) - user << "[selected_camera] unavailable." + to_chat(user, "Link to [selected_camera] has been lost.") + src.unpair(selected_camera.loc) sleep(90) else user.set_machine(selected_camera) @@ -118,37 +199,67 @@ user.unset_machine() user.reset_view(null) -/obj/item/device/spy_monitor/proc/can_use_cam(mob/user) +/obj/item/device/bug_monitor/proc/can_use_cam(mob/user) if(operating) return if(!cameras.len) - user << "No paired cameras detected!" - user << "Bring a bug in contact with this device to pair the camera." + to_chat(user, "No paired cameras detected!") + to_chat(user, "Bring a camera in contact with this device to pair the camera.") return return 1 - -/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking) +/* +/obj/item/device/bug_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking) return radio.hear_talk(M, msg, speaking) +*/ +/obj/item/device/bug_monitor/spy + name = "\improper PDA" + desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge." + icon = 'icons/obj/pda.dmi' + icon_state = "pda" + item_state = "electronic" + origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) +/obj/item/device/bug_monitor/spy/examine(mob/user) + . = ..(user, 1) + if(.) + to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.") -/obj/machinery/camera/spy - // These cheap toys are accessible from the mercenary camera console as well +/obj/machinery/camera/bug/check_eye(var/mob/user as mob) + return 0 + +/obj/machinery/camera/bug + network = list(NETWORK_SECURITY) + +/obj/machinery/camera/bug/New() + ..() + name = "Camera #[rand(1000,9999)]" + c_tag = name + +/obj/machinery/camera/bug/spy + // These cheap toys are accessible from the mercenary camera console as well - only the antag ones though! network = list(NETWORK_MERCENARY) -/obj/machinery/camera/spy/New() +/obj/machinery/camera/bug/spy/New() ..() name = "DV-136ZB #[rand(1000,9999)]" c_tag = name -/obj/machinery/camera/spy/check_eye(var/mob/user as mob) - return 0 +/* //These were originally supposed to have radios in them. Doesn't work. +/obj/item/device/radio/bug + listening = 0 //turn it on first + frequency = 1359 //sec comms + broadcasting = 0 + canhear_range = 1 + name = "camera bug device" + icon_state = "syn_cypherkey" -/obj/item/device/radio/spy +/obj/item/device/radio/bug/spy listening = 0 frequency = 1473 broadcasting = 0 canhear_range = 1 name = "spy device" icon_state = "syn_cypherkey" + */ \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index c33e26d809..b5f41aeccc 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -379,6 +379,17 @@ new /obj/item/weapon/implanter(src) new /obj/item/weapon/implantpad(src) +/obj/item/weapon/storage/box/camerabug + name = "mobile camera pod box" + desc = "A box containing some mobile camera pods." + icon_state = "pda" + +/obj/item/weapon/storage/box/camerabug/New() + ..() + for(var/i = 1 to 6) + new /obj/item/device/camerabug(src) + new /obj/item/device/bug_monitor(src) + /obj/item/weapon/storage/box/rxglasses name = "box of prescription glasses" desc = "This box contains nerd glasses." diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index cd3aca0f37..825ce8bdea 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -159,13 +159,13 @@ /obj/item/weapon/storage/box/syndie_kit/spy/New() ..() - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_bug(src) - new /obj/item/device/spy_monitor(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/camerabug/spy(src) + new /obj/item/device/bug_monitor/spy(src) /obj/item/weapon/storage/box/syndie_kit/g9mm name = "\improper Smooth operator" diff --git a/icons/obj/grenade.dmi b/icons/obj/grenade.dmi index ee56e733e3..bcd64a33fe 100644 Binary files a/icons/obj/grenade.dmi and b/icons/obj/grenade.dmi differ