diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 2e25e2fd816..2b8ff255420 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -924,6 +924,56 @@ var/list/uplink_items = list() cost = 2 gamemodes = list(/datum/game_mode/nuclear) +// Cybernetics +/datum/uplink_item/cyber_implants + category = "Cybernetic Implants" + surplus = 0 + gamemodes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/cyber_implants/spawn_item(turf/loc, obj/item/device/uplink/U) + if(item) + if(findtext(item, /obj/item/organ/internal/cyberimp)) + return new /obj/item/weapon/storage/box/cyber_implants(loc, item) + else + return ..() + +/datum/uplink_item/cyber_implants/thermals + name = "Thermal Vision Implant" + desc = "These cybernetic eyes will give you thermal vision. Comes with an automated implanting tool." + reference = "CIT" + item = /obj/item/organ/internal/cyberimp/eyes/thermals + cost = 8 + +/datum/uplink_item/cyber_implants/xray + name = "X-Ray Vision Implant" + desc = "These cybernetic eyes will give you X-ray vision. Comes with an automated implanting tool." + reference = "CIX" + item = /obj/item/organ/internal/cyberimp/eyes/xray + cost = 10 + +/datum/uplink_item/cyber_implants/antistun + name = "CNS Rebooter Implant" + desc = "This implant will help you get back up on your feet faster after being stunned. \ + Comes with an automated implanting tool." + reference = "CIAS" + item = /obj/item/organ/internal/cyberimp/brain/anti_stun + cost = 12 + +/datum/uplink_item/cyber_implants/reviver + name = "Reviver Implant" + desc = "This implant will attempt to revive you if you lose consciousness. Comes with an automated implanting tool." + reference = "CIR" + item = /obj/item/organ/internal/cyberimp/chest/reviver + cost = 8 + +/datum/uplink_item/cyber_implants/bundle + name = "Cybernetic Implants Bundle" + desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. \ + Comes with an automated implanting tool." + reference = "CIB" + item = /obj/item/weapon/storage/box/cyber_implants/bundle + cost = 40 + // POINTLESS BADASSERY /datum/uplink_item/badass diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 7e7eaf75ff9..3b5769b07ec 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -328,18 +328,27 @@ holder = new /obj/item/weapon/gun/energy/laser/mounted(src) //BOX O' IMPLANTS + /obj/item/weapon/storage/box/cyber_implants - name = "boxed cybernetic implants" + name = "boxed cybernetic implant" desc = "A sleek, sturdy box." icon_state = "cyber_implants" + +/obj/item/weapon/storage/box/cyber_implants/New(loc, implant) + ..() + new /obj/item/device/autoimplanter(src) + if(ispath(implant)) + new implant(src) + +/obj/item/weapon/storage/box/cyber_implants/bundle + name = "boxed cybernetic implants" var/list/boxed = list(/obj/item/organ/internal/cyberimp/eyes/xray,/obj/item/organ/internal/cyberimp/eyes/thermals, /obj/item/organ/internal/cyberimp/brain/anti_stun, /obj/item/organ/internal/cyberimp/chest/reviver) var/amount = 5 -/obj/item/weapon/storage/box/cyber_implants/New() +/obj/item/weapon/storage/box/cyber_implants/bundle/New() ..() - var/i var/implant - for(i = 0, i < amount, i++) + while(contents.len <= amount + 1) // +1 for the autoimplanter. implant = pick(boxed) new implant(src) \ No newline at end of file diff --git a/code/modules/surgery/organs/autoimplanter.dm b/code/modules/surgery/organs/autoimplanter.dm new file mode 100644 index 00000000000..98d7867c8c8 --- /dev/null +++ b/code/modules/surgery/organs/autoimplanter.dm @@ -0,0 +1,35 @@ +/obj/item/device/autoimplanter + name = "autoimplanter" + desc = "A device that automatically injects a cyber-implant into the user without the hassle of extensive surgery. It has a slot to insert implants and a screwdriver slot for removing accidentally added implants." + icon_state = "autoimplanter" + item_state = "walkietalkie"//left as this so as to intentionally not have inhands + w_class = 2 + var/obj/item/organ/internal/cyberimp/storedorgan + +/obj/item/device/autoimplanter/attack_self(mob/user)//when the object it used... + if(!storedorgan) + user << "[src] currently has no implant stored." + return + storedorgan.insert(user)//insert stored organ into the user + user.visible_message("[user] presses a button on [src], and you hear a short mechanical noise.", "You feel a sharp sting as [src] plunges into your body.") + playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, 1) + storedorgan = null + +/obj/item/device/autoimplanter/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/organ/internal/cyberimp)) + if(storedorgan) + user << "[src] already has an implant stored." + return + if(!user.drop_item()) + return + I.forceMove(src) + storedorgan = I + user << "You insert the [I] into [src]." + else if(istype(I, /obj/item/weapon/screwdriver)) + if(!storedorgan) + user << "There's no implant in [src] for you to remove." + else + storedorgan.forceMove(get_turf(user)) + storedorgan = null + user << "You remove the [storedorgan] from [src]." + playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1) diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 6cbf4105276..37026b153be 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/paradise.dme b/paradise.dme index 111dc8d88eb..dd87fb61193 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1871,6 +1871,7 @@ #include "code\modules\surgery\tools.dm" #include "code\modules\surgery\organs\augments_eyes.dm" #include "code\modules\surgery\organs\augments_internal.dm" +#include "code\modules\surgery\organs\autoimplanter.dm" #include "code\modules\surgery\organs\blood.dm" #include "code\modules\surgery\organs\body_egg.dm" #include "code\modules\surgery\organs\helpers.dm"