This commit is contained in:
zerothebigboy
2020-07-26 06:20:06 -04:00
parent a88fa29682
commit 40d12fd02f
3 changed files with 67 additions and 5 deletions
@@ -5,16 +5,73 @@
require the message server.
*/
// A decorational representation of SSblackbox, usually placed alongside the message server.
// A decorational representation of SSblackbox, usually placed alongside the message server. Also contains a traitor theft item.
/obj/machinery/blackbox_recorder
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
name = "Blackbox Recorder"
name = "blackbox recorder"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 100
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
var/obj/item/stored
/obj/machinery/blackbox_recorder/Initialize()
. = ..()
stored = new /obj/item/blackbox(src)
/obj/machinery/blackbox_recorder/attack_hand(mob/living/user)
. = ..()
if(stored)
to_chat(user, "<span class='notice'>You start struggling to pry the [stored] from the [src]...</span>")
if(!do_after(user, 30 SECONDS, TRUE, src))
to_chat(user, "<span class='warning'>Your fingers slip as you fail to pry the [stored] from the [src], clicking it right back int the slot!</span>")
return
if(user.put_in_hands(stored))
stored.forceMove(user.drop_location())
stored = null
to_chat(user, "<span class='warning'>You successfully pry the [stored] from the [src], and send its overwhelming weight tumbling onto the ground! The tapes on the [src] stop spinning...</span>")
update_icon()
return
else
to_chat(user, "<span class='warning'>It seems that the blackbox is missing...</span>")
return
/obj/machinery/blackbox_recorder/attackby(obj/item/I, mob/living/user, params)
. = ..()
if(istype(I, /obj/item/blackbox))
if(HAS_TRAIT(I, TRAIT_NODROP) || !user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return
user.visible_message("<span class='notice'>[user] clicks the [I] into the [src]!</span>", \
"<span class='notice'>You press [I] into [src], and it clicks into place. The tapes on the [src] begin spinning again...</span>")
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
stored = I
update_icon()
return ..()
return ..()
/obj/machinery/blackbox_recorder/Destroy()
if(stored)
stored.forceMove(loc)
new /obj/effect/decal/cleanable/oil(loc)
return ..()
/obj/machinery/blackbox_recorder/update_icon()
. = ..()
if(!stored)
icon_state = "blackbox_b"
else
icon_state = "blackbox"
/obj/item/blackbox
name = "the blackbox"
desc = "A strange relic, capable of recording data on extradimensional vertices. It lives inside the blackbox recorder for safe keeping."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackcube"
w_class = WEIGHT_CLASS_BULKY
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
// The message server itself.
@@ -140,9 +197,9 @@
..()
if(href_list["photo"])
var/mob/M = usr
M << browse_rsc(picture.picture_image, "pda_photo.png")
M << browse_rsc(picture.picture_image, "pda_photo.png")
var/dat = "<div style='overflow: hidden; margin :0; text-align: center'>"
dat += "<img src='pda_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />"
dat += "</div>"