mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Transferred body eggs to new organs system
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("chest")
|
||||
requires_organic_bodypart = 0
|
||||
|
||||
|
||||
//extract implant
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
M.sight |= sight_flags
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
M.sight ^= sight_flags
|
||||
if(istype(owner,/mob/living/carbon/human) && eye_color)
|
||||
if(istype(M,/mob/living/carbon/human) && eye_color)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
HMN.eye_color = old_eye_color
|
||||
HMN.regenerate_icons()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/on_life()
|
||||
..()
|
||||
@@ -88,11 +88,11 @@
|
||||
M.permanent_huds |= H
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/hud/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
if(HUD_type)
|
||||
var/datum/atom_hud/H = huds[HUD_type]
|
||||
M.permanent_huds ^= H
|
||||
H.remove_hud_from(M)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/hud/medical
|
||||
name = "Medical HUD implant"
|
||||
|
||||
@@ -114,9 +114,9 @@
|
||||
r_hand_obj.flags ^= NODROP
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_drop/Remove(var/mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(active)
|
||||
ui_action_click()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_stun
|
||||
@@ -167,8 +167,6 @@
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/on_life()
|
||||
if(synthesizing)
|
||||
return
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
|
||||
if(owner.nutrition <= hunger_threshold)
|
||||
synthesizing = 1
|
||||
|
||||
@@ -27,4 +27,7 @@ mob/proc/getlimb()
|
||||
return
|
||||
|
||||
mob/living/carbon/human/getlimb(typepath)
|
||||
return (locate(typepath) in organs)
|
||||
return (locate(typepath) in organs)
|
||||
|
||||
proc/isorgan(atom/A)
|
||||
return istype(A, /obj/item/organ/internal)
|
||||
@@ -1,21 +1,31 @@
|
||||
/obj/item/organ/internal
|
||||
origin_tech = "biotech=2"
|
||||
var/zone = "chest"
|
||||
var/slot
|
||||
var/vital = 0
|
||||
var/organ_action_name = null
|
||||
|
||||
/obj/item/organ/internal/proc/Insert(var/mob/living/carbon/M, special = 0)
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/replaced = M.getorganslot(slot)
|
||||
if(replaced)
|
||||
replaced.Remove(M, special = 1)
|
||||
|
||||
|
||||
owner = M
|
||||
M.internal_organs += src
|
||||
M.internal_organs |= src
|
||||
loc = null
|
||||
if(organ_action_name)
|
||||
action_button_name = organ_action_name
|
||||
|
||||
/obj/item/organ/internal/proc/Remove(var/mob/living/carbon/M, special = 0)
|
||||
owner = null
|
||||
M.internal_organs -= src
|
||||
if(vital && !special)
|
||||
M.death()
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
if(vital && !special)
|
||||
M.death()
|
||||
|
||||
if(organ_action_name)
|
||||
action_button_name = null
|
||||
@@ -23,6 +33,11 @@
|
||||
/obj/item/organ/internal/proc/on_life()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/Destroy()
|
||||
if(owner)
|
||||
Remove(owner, 1)
|
||||
..()
|
||||
|
||||
//Looking for brains?
|
||||
//Try code/modules/mob/living/carbon/brain/brain_item.dm
|
||||
|
||||
@@ -33,6 +48,7 @@
|
||||
icon_state = "heart-on"
|
||||
zone = "chest"
|
||||
slot = "heart"
|
||||
origin_tech = "biotech=3"
|
||||
vital = 1
|
||||
var/beating = 1
|
||||
|
||||
@@ -42,6 +58,16 @@
|
||||
else
|
||||
icon_state = "heart-off"
|
||||
|
||||
/obj/item/organ/internal/heart/Insert(var/mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
beating = 1
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/internal/heart/Remove(var/mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
spawn(120)
|
||||
beating = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/organ/internal/appendix
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/xenomorph_removal/proc/remove_xeno(mob/user, mob/living/carbon/target)
|
||||
var/obj/item/body_egg/alien_embryo/A = locate() in target.contents
|
||||
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.getorgan(/obj/item/organ/internal/body_egg/alien_embryo)
|
||||
if(A)
|
||||
user << "<span class='notice'>You found an unknown alien organism in [target]'s chest!</span>"
|
||||
if(A.stage < 4)
|
||||
@@ -33,12 +33,13 @@
|
||||
if(prob(10))
|
||||
A.AttemptGrow()
|
||||
|
||||
A.Remove(target)
|
||||
A.loc = get_turf(target)
|
||||
return 1
|
||||
|
||||
|
||||
/datum/surgery_step/xenomorph_removal/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/obj/item/body_egg/alien_embryo/A = locate() in target.contents
|
||||
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.getorgan(/obj/item/organ/internal/body_egg/alien_embryo)
|
||||
if(A)
|
||||
if(prob(50))
|
||||
A.AttemptGrow(0)
|
||||
|
||||
Reference in New Issue
Block a user