mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Merge upstream
This commit is contained in:
@@ -144,28 +144,19 @@
|
||||
//BOX O' IMPLANTS
|
||||
|
||||
/obj/item/weapon/storage/box/cyber_implants
|
||||
name = "boxed cybernetic implant"
|
||||
name = "boxed cybernetic implants"
|
||||
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/eyes/robotic/xray,
|
||||
/obj/item/organ/eyes/robotic/thermals,
|
||||
/obj/item/organ/cyberimp/brain/anti_stun,
|
||||
/obj/item/organ/cyberimp/chest/reviver)
|
||||
/obj/item/device/autosurgeon/thermal_eyes,
|
||||
/obj/item/device/autosurgeon/xray_eyes,
|
||||
/obj/item/device/autosurgeon/anti_stun,
|
||||
/obj/item/device/autosurgeon/reviver)
|
||||
var/amount = 5
|
||||
|
||||
/obj/item/weapon/storage/box/cyber_implants/bundle/New()
|
||||
..()
|
||||
var/implant
|
||||
while(contents.len <= amount + 1) // +1 for the autoimplanter.
|
||||
while(contents.len <= amount)
|
||||
implant = pick(boxed)
|
||||
new implant(src)
|
||||
|
||||
+33
-14
@@ -1,21 +1,27 @@
|
||||
#define INFINITE -1
|
||||
|
||||
/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."
|
||||
/obj/item/device/autosurgeon
|
||||
name = "autosurgeon"
|
||||
desc = "A device that automatically inserts an implant or organ into the user without the hassle of extensive surgery. It has a slot to insert implants/organs and a screwdriver slot for removing accidentally added items."
|
||||
icon_state = "autoimplanter"
|
||||
item_state = "walkietalkie"//left as this so as to intentionally not have inhands
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/obj/item/organ/storedorgan
|
||||
var/organ_type = /obj/item/organ/cyberimp
|
||||
var/organ_type = /obj/item/organ
|
||||
var/uses = INFINITE
|
||||
var/starting_organ
|
||||
|
||||
/obj/item/device/autoimplanter/New()
|
||||
/obj/item/device/autosurgeon/Initialize(mapload)
|
||||
..()
|
||||
if(storedorgan)
|
||||
storedorgan.loc = src
|
||||
if(starting_organ)
|
||||
insert_organ(new starting_organ(src))
|
||||
|
||||
/obj/item/device/autoimplanter/attack_self(mob/user)//when the object it used...
|
||||
/obj/item/device/autosurgeon/proc/insert_organ(var/obj/item/I)
|
||||
storedorgan = I
|
||||
I.forceMove(src)
|
||||
name = "[initial(name)] ([storedorgan.name])"
|
||||
|
||||
/obj/item/device/autosurgeon/attack_self(mob/user)//when the object it used...
|
||||
if(!uses)
|
||||
to_chat(user, "<span class='warning'>[src] has already been used. The tools are dull and won't reactivate.</span>")
|
||||
return
|
||||
@@ -26,12 +32,13 @@
|
||||
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
|
||||
name = initial(name)
|
||||
if(uses != INFINITE)
|
||||
uses--
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
|
||||
/obj/item/device/autoimplanter/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/device/autosurgeon/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, organ_type))
|
||||
if(storedorgan)
|
||||
to_chat(user, "<span class='notice'>[src] already has an implant stored.</span>")
|
||||
@@ -41,7 +48,7 @@
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
storedorgan = I
|
||||
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -58,8 +65,20 @@
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
|
||||
/obj/item/device/autoimplanter/cmo
|
||||
name = "medical HUD autoimplanter"
|
||||
desc = "A single use autoimplanter that contains a medical heads-up display augment. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
storedorgan = new/obj/item/organ/cyberimp/eyes/hud/medical()
|
||||
/obj/item/device/autosurgeon/cmo
|
||||
desc = "A single use autosurgeon that contains a medical heads-up display augment. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/cyberimp/eyes/hud/medical
|
||||
|
||||
|
||||
/obj/item/device/autosurgeon/thermal_eyes
|
||||
starting_organ = /obj/item/organ/eyes/robotic/thermals
|
||||
|
||||
/obj/item/device/autosurgeon/xray_eyes
|
||||
starting_organ = /obj/item/organ/eyes/robotic/xray
|
||||
|
||||
/obj/item/device/autosurgeon/anti_stun
|
||||
starting_organ = /obj/item/organ/cyberimp/brain/anti_stun
|
||||
|
||||
/obj/item/device/autosurgeon/reviver
|
||||
starting_organ = /obj/item/organ/cyberimp/chest/reviver
|
||||
@@ -12,13 +12,17 @@
|
||||
var/vital = 0
|
||||
|
||||
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
return
|
||||
|
||||
var/obj/item/organ/replaced = M.getorganslot(slot)
|
||||
if(replaced)
|
||||
replaced.Remove(M, special = 1)
|
||||
if(drop_if_replaced)
|
||||
replaced.forceMove(get_turf(src))
|
||||
else
|
||||
qdel(replaced)
|
||||
|
||||
owner = M
|
||||
M.internal_organs |= src
|
||||
|
||||
Reference in New Issue
Block a user