mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge pull request #3823 from Fox-McCloud/nukies-cybernetics
Implements Nuke Ops Cybernetics
This commit is contained in:
@@ -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)
|
||||
@@ -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 << "<span class='notice'>[src] currently has no implant stored.</span>"
|
||||
return
|
||||
storedorgan.insert(user)//insert stored organ into the user
|
||||
user.visible_message("<span class='notice'>[user] presses a button on [src], and you hear a short mechanical noise.</span>", "<span class='notice'>You feel a sharp sting as [src] plunges into your body.</span>")
|
||||
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 << "<span class='notice'>[src] already has an implant stored.</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
storedorgan = I
|
||||
user << "<span class='notice'>You insert the [I] into [src].</span>"
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(!storedorgan)
|
||||
user << "<span class='notice'>There's no implant in [src] for you to remove.</span>"
|
||||
else
|
||||
storedorgan.forceMove(get_turf(user))
|
||||
storedorgan = null
|
||||
user << "<span class='notice'>You remove the [storedorgan] from [src].</span>"
|
||||
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
Reference in New Issue
Block a user