mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
@@ -154,70 +154,66 @@
|
||||
update()
|
||||
|
||||
/obj/item/implanter/ipc_tag
|
||||
name = "IPC tag implanter"
|
||||
name = "IPC/Shell tag implanter"
|
||||
desc = "A special implanter used for implanting synthetics with a special tag."
|
||||
var/obj/item/organ/internal/ipc_tag/ipc_tag
|
||||
var/obj/item/organ/internal/ipc_tag/ipc_tag = null
|
||||
|
||||
/obj/item/implanter/ipc_tag/Initialize()
|
||||
. = ..()
|
||||
ipc_tag = new /obj/item/organ/internal/ipc_tag(src)
|
||||
/obj/item/implanter/ipc_tag/New()
|
||||
ipc_tag = new(src)
|
||||
..()
|
||||
update()
|
||||
|
||||
/obj/item/implanter/ipc_tag/update()
|
||||
if(ipc_tag)
|
||||
if (ipc_tag)
|
||||
icon_state = "cimplanter1"
|
||||
else
|
||||
icon_state = "cimplanter0"
|
||||
return
|
||||
|
||||
/obj/item/implanter/ipc_tag/attack(mob/M, mob/user)
|
||||
if(!ishuman(M))
|
||||
/obj/item/implanter/ipc_tag/attack(mob/M as mob, mob/user as mob)
|
||||
if (!ishuman(M))
|
||||
return
|
||||
|
||||
if(!ipc_tag)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have an IPC tag loaded!"))
|
||||
if (!ipc_tag)
|
||||
to_chat(user, "<span class ='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.species || !isipc(H) || !H.organs_by_name[BP_HEAD])
|
||||
to_chat(user, SPAN_WARNING("You cannot use \the [src] on a non-IPC!"))
|
||||
if (!H.species || !isipc(H) || !H.organs_by_name[BP_HEAD])
|
||||
to_chat(user, "<span class = 'warning'>You cannot use this on a non-synthetic organism!</span>")
|
||||
return
|
||||
|
||||
if(H.internal_organs_by_name[BP_IPCTAG])
|
||||
to_chat(user, SPAN_WARNING("\The [H] is already tagged!"))
|
||||
if (H.internal_organs_by_name[BP_IPCTAG])
|
||||
to_chat(user, "<span class = 'warning'>[H] is already tagged!</span>")
|
||||
return
|
||||
|
||||
user.visible_message(SPAN_WARNING("\The [user] tags \the [M] with \the [src]!"), SPAN_NOTICE("You tag \the [M] with \the [src]."), range = 3)
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message("<span class = 'warning'>[M] has been implanted by [user].</span>", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.ipc_tag.name]) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.ipc_tag.name]) to implant [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
|
||||
user.show_message("<span class = 'warning'>You implanted the implant into [M].</span>")
|
||||
|
||||
ipc_tag.replaced(H, H.organs_by_name[BP_HEAD])
|
||||
ipc_tag.forceMove(M)
|
||||
if(ipc_tag.auto_generate)
|
||||
ipc_tag.serial_number = uppertext(dd_limittext(md5(M.real_name), 12))
|
||||
|
||||
ipc_tag = null
|
||||
|
||||
update()
|
||||
|
||||
/obj/item/implanter/ipc_tag/attackby(obj/item/I, mob/user)
|
||||
if(I.isscrewdriver())
|
||||
if(!ipc_tag)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have an IPC tag loaded."))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You remove \the [ipc_tag] from \the [src]."))
|
||||
ipc_tag.forceMove(get_turf(user))
|
||||
user.put_in_hands(ipc_tag)
|
||||
ipc_tag = null
|
||||
update()
|
||||
var/datum/species/machine/machine = H.species
|
||||
machine.update_tag(H, H.client)
|
||||
|
||||
/obj/item/implanter/ipc_tag/attackby(var/obj/item/organ/internal/ipc_tag/new_tag, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (!istype(new_tag))
|
||||
return
|
||||
if(istype(I, /obj/item/organ/internal/ipc_tag))
|
||||
if(ipc_tag)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already has an IPC tag loaded."))
|
||||
return
|
||||
ipc_tag = I
|
||||
user.drop_from_inventory(I, src)
|
||||
update()
|
||||
|
||||
if (ipc_tag)
|
||||
return
|
||||
..()
|
||||
|
||||
ipc_tag = new_tag
|
||||
user.drop_from_inventory(new_tag,src)
|
||||
update()
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/obj/item/ipc_tag_scanner
|
||||
name = "IPC tag scanner"
|
||||
desc = "A hand-held IPC tag scanner, that, when used to analyze the info of an IPC, will output its tag status and information."
|
||||
icon = 'icons/obj/ipc_utilities.dmi'
|
||||
icon_state = "ipc_tag_scanner"
|
||||
item_state = "ipc_tag_scanner"
|
||||
contained_sprite = TRUE
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
// Wiring
|
||||
var/datum/wires/tag_scanner/wires
|
||||
var/wires_exposed = FALSE
|
||||
var/powered = TRUE
|
||||
var/hacked = FALSE
|
||||
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINEERING = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, MATERIAL_GLASS = 200)
|
||||
|
||||
/obj/item/ipc_tag_scanner/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
wires = new /datum/wires/tag_scanner(src)
|
||||
|
||||
/obj/item/ipc_tag_scanner/Destroy()
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/item/ipc_tag_scanner/attack(mob/living/M, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if(!powered)
|
||||
to_chat(user, SPAN_WARNING("\The [src] reads, \"Scanning failure, please submit scanner for repairs.\""))
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts analyzing \the [M] with \the [src]..."), SPAN_NOTICE("You start analyzing \the [M] with \the [src]..."))
|
||||
if(do_after(user, 50, TRUE, src))
|
||||
if(!isipc(M))
|
||||
to_chat(user, SPAN_WARNING("You analyze \the [M], but find that they're not an IPC at all!"))
|
||||
return
|
||||
var/mob/living/carbon/human/IPC = M
|
||||
var/obj/item/organ/internal/ipc_tag/tag = IPC.internal_organs_by_name[BP_IPCTAG]
|
||||
if(isnull(tag) || !tag)
|
||||
to_chat(user, SPAN_WARNING("Error: Serial Identification Missing."))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("[capitalize_first_letters(tag.name)]:"))
|
||||
to_chat(user, SPAN_NOTICE("<b>Serial Number:</b> [tag.serial_number]"))
|
||||
to_chat(user, SPAN_NOTICE("<b>Ownership Status:</b> [tag.ownership_info]"))
|
||||
to_chat(user, SPAN_NOTICE("<b>Citizenship Info:</b> [tag.citizenship_info]"))
|
||||
|
||||
/obj/item/ipc_tag_scanner/attackby(obj/item/W, mob/user)
|
||||
if(W.isscrewdriver())
|
||||
wires_exposed = !wires_exposed
|
||||
user.visible_message(SPAN_WARNING("\The [user] [wires_exposed ? "exposes the wiring" : "closes the panel"] on \the [src]."), SPAN_WARNING("You [wires_exposed ? "expose the wiring" : "close the panel"] on \the [src]."), 3)
|
||||
else if(W.iswirecutter() || W.ismultitool())
|
||||
if(wires_exposed)
|
||||
wires.Interact(user)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src]'s wires aren't exposed."))
|
||||
else
|
||||
..()
|
||||
Reference in New Issue
Block a user