diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 773999fb..546adf79 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1365,3 +1365,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet/crate containername = "security magnetic locks" group = "Security" + +/datum/supply_packs/ipc_tag_pack + name = "IPC/Shell Tag Implanter Crate" + contains = list(/obj/item/weapon/implanter/ipc_tag, + /obj/item/weapon/implanter/ipc_tag) + cost = 40 + containertype = /obj/structure/closet/crate + containername = "IPC/Shell tag implanters" + group = "Medical / Science" diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 3c0c3384..9e324c43 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -44,6 +44,8 @@ I.reagents.trans_to(src.imp, 5) user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." else if (istype(I, /obj/item/weapon/implanter)) + if (istype(I, /obj/item/weapon/implanter/ipc_tag)) + return if (I:imp) if ((src.imp || I:imp.implanted)) return @@ -172,4 +174,3 @@ src.imp = new /obj/item/weapon/implant/compressed( src ) ..() return - diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 8beee93a..f87a409f 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -129,3 +129,68 @@ S.remove_from_storage(A) A.loc.contents.Remove(A) update() + +/obj/item/weapon/implanter/ipc_tag + name = "IPC/Shell tag implanter" + desc = "A special implanter used for implanting synthetics with a special tag." + var/obj/item/robot_parts/robot_component/ipc_tag/ipc_tag = null + +/obj/item/weapon/implanter/ipc_tag/New() + ipc_tag = new(src) + ..() + update() + +/obj/item/weapon/implanter/ipc_tag/update() + if (ipc_tag) + icon_state = "cimplanter1" + else + icon_state = "cimplanter0" + return + +/obj/item/weapon/implanter/ipc_tag/attack(mob/M as mob, mob/user as mob) + if (!ishuman(M)) + return + + if (!ipc_tag) + user << "\red [src] is empty!" + return + + var/mob/living/carbon/human/H = M + if (!H.species || !istype(H.species, /datum/species/machine) || !H.organs_by_name["head"]) + user << "\red You cannot use this on a non-synthetic organism!" + return + + if (H.internal_organs_by_name["ipc tag"]) + user << "\red [H] is already tagged!" + return + + for (var/mob/O in viewers(M, null)) + O.show_message("\red [M] has been implanted by [user].", 1) + + M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.ipc_tag.name]) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.ipc_tag.name]) to implant [M.name] ([M.ckey])") + msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + + user.show_message("\red You implanted the implant into [M].") + + ipc_tag.organ_type.replaced(H, H.organs_by_name["head"]) + + del(ipc_tag) + update() + + var/datum/species/machine/machine = H.species + machine.update_tag(H, H.client) + +/obj/item/weapon/implanter/ipc_tag/attackby(var/obj/item/robot_parts/robot_component/ipc_tag/new_tag, mob/user as mob) + ..() + + if (!istype(new_tag)) + return + + if (ipc_tag) + return + + ipc_tag = new_tag + user.drop_item() + new_tag.loc = src + update()