mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Conflict resolution.
This commit is contained in:
@@ -13,41 +13,16 @@
|
||||
var/flash_protect = 0
|
||||
var/aug_message = "Your vision is augmented!"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
eye_colour = list(
|
||||
owner.r_eyes ? owner.r_eyes : 0,
|
||||
owner.g_eyes ? owner.g_eyes : 0,
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/insert(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
if(istype(owner, /mob/living/carbon/human) && eye_colour)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
old_eye_colour[1] = HMN.r_eyes
|
||||
old_eye_colour[2] = HMN.g_eyes
|
||||
old_eye_colour[2] = HMN.b_eyes
|
||||
|
||||
HMN.r_eyes = eye_colour[1]
|
||||
HMN.g_eyes = eye_colour[2]
|
||||
HMN.b_eyes = eye_colour[3]
|
||||
HMN.update_eyes()
|
||||
if(aug_message && !special)
|
||||
to_chat(owner, "<span class='notice'>[aug_message]</span>")
|
||||
M.sight |= vision_flags
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
. = ..()
|
||||
M.sight ^= vision_flags
|
||||
if(istype(owner,/mob/living/carbon/human) && eye_colour)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
HMN.r_eyes = old_eye_colour[1]
|
||||
HMN.g_eyes = old_eye_colour[2]
|
||||
HMN.b_eyes = old_eye_colour[3]
|
||||
HMN.update_eyes()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/on_life()
|
||||
..()
|
||||
@@ -97,7 +72,7 @@
|
||||
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
|
||||
@@ -132,4 +107,4 @@
|
||||
// Welding with thermals will still hurt your eyes a bit.
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/shield/emp_act(severity)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
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()
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
owner.med_hud_set_status()
|
||||
spawn(0)
|
||||
RemoveInfectionImages(owner)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/body_egg/process()
|
||||
if(!owner)
|
||||
@@ -46,4 +46,4 @@
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/body_egg/proc/RemoveInfectionImages()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -314,6 +314,7 @@ var/list/organ_cache = list()
|
||||
msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(owner)]")
|
||||
owner.death()
|
||||
owner = null
|
||||
return src
|
||||
|
||||
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
|
||||
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
var/broken_description
|
||||
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
var/encased // Needs to be opened with a saw to access the organs.
|
||||
|
||||
@@ -71,6 +69,9 @@
|
||||
if(parent && parent.children)
|
||||
parent.children -= src
|
||||
|
||||
if(owner)
|
||||
owner.organs_by_name[limb_name] = null
|
||||
|
||||
if(internal_organs)
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
internal_organs -= O
|
||||
@@ -87,38 +88,35 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
switch(stage)
|
||||
switch(open)
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
spread_germs_to_organ(src,user)
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!")
|
||||
stage++
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!</span>")
|
||||
open++
|
||||
return
|
||||
if(1)
|
||||
if(istype(W,/obj/item/weapon/retractor))
|
||||
spread_germs_to_organ(src,user)
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!")
|
||||
stage++
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!</span>")
|
||||
open++
|
||||
return
|
||||
if(2)
|
||||
if(istype(W,/obj/item/weapon/hemostat))
|
||||
spread_germs_to_organ(src,user)
|
||||
if(contents.len)
|
||||
var/obj/item/removing = pick(contents)
|
||||
removing.loc = get_turf(user.loc)
|
||||
var/obj/item/organ/internal/O = removing
|
||||
if(istype(O))
|
||||
O.status |= ORGAN_CUT_AWAY
|
||||
if(!O.sterile)
|
||||
spread_germs_to_organ(O,user) // This wouldn't be any cleaner than the actual surgery
|
||||
O.forceMove(get_turf(src))
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(removing)
|
||||
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!")
|
||||
user.put_in_hands(removing)
|
||||
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].")
|
||||
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].</span>")
|
||||
return
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/organ/external/update_health()
|
||||
@@ -139,14 +137,12 @@
|
||||
status = status & ~ORGAN_DESTROYED
|
||||
forceMove(owner)
|
||||
if(istype(owner))
|
||||
if(!isnull(owner.organs_by_name[limb_name]))
|
||||
log_debug("Duplicate organ in slot \"[limb_name]\", mob '[target]'")
|
||||
owner.organs_by_name[limb_name] = src
|
||||
owner.organs |= src
|
||||
for(var/obj/item/organ/organ in src)
|
||||
if(istype(src, /obj/item/organ/internal))
|
||||
var/obj/item/organ/internal/I = organ
|
||||
if(target.get_organ_slot(I.slot))
|
||||
continue // Just leave it inside its limb, so brains with brainmobs in them don't get voided.
|
||||
organ.replaced(owner,src)
|
||||
for(var/atom/movable/stuff in src)
|
||||
stuff.attempt_become_organ(src, owner)
|
||||
|
||||
if(parent_organ)
|
||||
parent = owner.organs_by_name[src.parent_organ]
|
||||
@@ -161,6 +157,12 @@
|
||||
break
|
||||
parent.update_damages()
|
||||
|
||||
/obj/item/organ/external/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
|
||||
if(parent_organ != parent.limb_name)
|
||||
return 0
|
||||
replaced(H)
|
||||
return 1
|
||||
|
||||
/****************************************************
|
||||
DAMAGE PROCS
|
||||
****************************************************/
|
||||
@@ -691,7 +693,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
"<span class='danger'>You hear the [gore_sound].</span>")
|
||||
|
||||
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
|
||||
remove(null, ignore_children)
|
||||
// Let people make limbs become fun things when removed
|
||||
var/atom/movable/dropped_part = remove(null, ignore_children)
|
||||
victim.traumatic_shock += 30
|
||||
|
||||
wounds.Cut()
|
||||
@@ -726,12 +729,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(!clean)
|
||||
// Throw limb around.
|
||||
if(src && istype(loc,/turf))
|
||||
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
dropped_part.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
dir = 2
|
||||
return
|
||||
return dropped_part
|
||||
else
|
||||
qdel(src) // If you flashed away to ashes, YOU FLASHED AWAY TO ASHES
|
||||
return
|
||||
return null
|
||||
|
||||
/****************************************************
|
||||
HELPERS
|
||||
@@ -903,7 +906,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
var/is_robotic = status & ORGAN_ROBOT
|
||||
var/mob/living/carbon/human/victim = owner
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
status |= ORGAN_DESTROYED
|
||||
victim.bad_external_organs -= src
|
||||
@@ -914,14 +917,14 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
// Attached organs also fly off.
|
||||
if(!ignore_children)
|
||||
for(var/obj/item/organ/external/O in children)
|
||||
O.remove(victim)
|
||||
if(O)
|
||||
O.forceMove(src)
|
||||
var/atom/movable/thing = O.remove(victim)
|
||||
if(thing)
|
||||
thing.forceMove(src)
|
||||
|
||||
// Grab all the internal giblets too.
|
||||
for(var/obj/item/organ/internal/organ in internal_organs)
|
||||
organ.remove(victim)
|
||||
organ.forceMove(src)
|
||||
var/atom/movable/thing = organ.remove(victim)
|
||||
thing.forceMove(src)
|
||||
|
||||
release_restraints(victim)
|
||||
victim.organs -= src
|
||||
|
||||
@@ -47,7 +47,39 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
/obj/item/organ/external/head/remove()
|
||||
get_icon()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/proc/get_icon(skeletal, fat)
|
||||
// Kasparrov, you monster
|
||||
if(istext(species))
|
||||
species = all_species[species]
|
||||
if(force_icon)
|
||||
mob_icon = new /icon(force_icon, "[icon_name]")
|
||||
if(species && species.name == "Machine") //snowflake for IPC's, sorry.
|
||||
if(s_col && s_col.len >= 3)
|
||||
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
|
||||
else
|
||||
var/new_icons = get_icon_state(skeletal)
|
||||
var/icon_file = new_icons[1]
|
||||
var/new_icon_state = new_icons[2]
|
||||
mob_icon = new /icon(icon_file, new_icon_state)
|
||||
if(!skeletal && !(status & ORGAN_ROBOT))
|
||||
if(status & ORGAN_DEAD)
|
||||
mob_icon.ColorTone(rgb(10,50,0))
|
||||
mob_icon.SetIntensity(0.7)
|
||||
|
||||
if(!isnull(s_tone))
|
||||
if(s_tone >= 0)
|
||||
mob_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
mob_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
else if(s_col && s_col.len >= 3)
|
||||
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
|
||||
|
||||
dir = EAST
|
||||
icon = mob_icon
|
||||
|
||||
return mob_icon
|
||||
|
||||
/obj/item/organ/external/head/get_icon()
|
||||
|
||||
@@ -55,13 +87,15 @@ var/global/list/limb_icon_cache = list()
|
||||
overlays.Cut()
|
||||
if(!owner)
|
||||
return
|
||||
var/obj/item/organ/external/head/H = owner.get_organ("head")
|
||||
|
||||
if(species.has_organ["eyes"])
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes)//owner.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
var/obj/item/organ/internal/cyberimp/eyes/eye_implant = owner.get_int_organ(/obj/item/organ/internal/cyberimp/eyes)
|
||||
if(species.eyes)
|
||||
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', species.eyes)
|
||||
if(eyes)
|
||||
if(eye_implant) // Eye implants override native DNA eye color
|
||||
eyes_icon.Blend(rgb(eye_implant.eye_colour[1],eye_implant.eye_colour[2],eye_implant.eye_colour[3]), ICON_ADD)
|
||||
else if(eyes)
|
||||
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
|
||||
else
|
||||
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
|
||||
@@ -74,7 +108,7 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon.Blend(lip_icon, ICON_OVERLAY)
|
||||
|
||||
var/head_marking = owner.m_styles["head"]
|
||||
if(head_marking != "None")
|
||||
if(head_marking && head_marking != "None")
|
||||
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
|
||||
if(head_marking_style && head_marking_style.species_allowed && (species.name in head_marking_style.species_allowed) && head_marking_style.marking_location == "head")
|
||||
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
|
||||
@@ -82,59 +116,47 @@ var/global/list/limb_icon_cache = list()
|
||||
h_marking_s.Blend(owner.m_colours["head"], ICON_ADD)
|
||||
overlays |= h_marking_s
|
||||
|
||||
if(H.ha_style)
|
||||
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[H.ha_style]
|
||||
if(head_accessory_style && head_accessory_style.species_allowed && (H.species.name in head_accessory_style.species_allowed))
|
||||
if(ha_style)
|
||||
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
|
||||
if(head_accessory_style && head_accessory_style.species_allowed && (species.name in head_accessory_style.species_allowed))
|
||||
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
|
||||
if(head_accessory_style.do_colouration)
|
||||
head_accessory_s.Blend(rgb(H.r_headacc, H.g_headacc, H.b_headacc), ICON_ADD)
|
||||
head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
|
||||
overlays |= head_accessory_s
|
||||
|
||||
if(H.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
|
||||
if(facial_hair_style && ((facial_hair_style.species_allowed && (H.species.name in facial_hair_style.species_allowed)) || (src.species.flags & ALL_RPARTS)))
|
||||
if(f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
|
||||
if(facial_hair_style && ((facial_hair_style.species_allowed && (species.name in facial_hair_style.species_allowed)) || (src.species.flags & ALL_RPARTS)))
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
if(H.species.name == "Slime People") // I am el worstos
|
||||
if(species.name == "Slime People") // I am el worstos
|
||||
facial_s.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin, 160), ICON_AND)
|
||||
else if(facial_hair_style.do_colouration)
|
||||
facial_s.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
overlays |= facial_s
|
||||
|
||||
if(H.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
|
||||
if(hair_style && ((H.species.name in hair_style.species_allowed) || (src.species.flags & ALL_RPARTS)))
|
||||
if(h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
if(hair_style && ((species.name in hair_style.species_allowed) || (src.species.flags & ALL_RPARTS)))
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
if(H.species.name == "Slime People") // I am el worstos
|
||||
if(species.name == "Slime People") // I am el worstos
|
||||
hair_s.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin, 160), ICON_AND)
|
||||
else if(hair_style.do_colouration)
|
||||
hair_s.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
overlays |= hair_s
|
||||
|
||||
return mob_icon
|
||||
|
||||
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
||||
/obj/item/organ/external/proc/get_icon_state(skeletal)
|
||||
var/gender
|
||||
if(istext(species))
|
||||
species = all_species[species]
|
||||
if(force_icon)
|
||||
mob_icon = new /icon(force_icon, "[icon_name]")
|
||||
if(species && species.name == "Machine") //snowflake for IPC's, sorry.
|
||||
if(s_col && s_col.len >= 3)
|
||||
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
|
||||
var/icon_file
|
||||
var/new_icon_state
|
||||
if(!dna)
|
||||
icon_file = 'icons/mob/human_races/r_human.dmi'
|
||||
new_icon_state = "[icon_name][gendered_icon ? "_f" : ""]"
|
||||
else
|
||||
if(!dna)
|
||||
mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_f" : ""]")
|
||||
else
|
||||
if(gendered_icon)
|
||||
if(dna.GetUIState(DNA_UI_GENDER))
|
||||
gender = "f"
|
||||
else
|
||||
gender = "m"
|
||||
|
||||
if(skeletal)
|
||||
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
else if(status & ORGAN_ROBOT)
|
||||
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
if(gendered_icon)
|
||||
if(dna.GetUIState(DNA_UI_GENDER))
|
||||
gender = "f"
|
||||
else
|
||||
if(limb_name == "head")
|
||||
var/obj/item/organ/external/head/head_organ = src
|
||||
@@ -144,23 +166,27 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon = new /icon(species.deform, "[icon_name][gender ? "_[gender]" : ""]")
|
||||
else
|
||||
mob_icon = new /icon(species.icobase, "[icon_name][gender ? "_[gender]" : ""]")
|
||||
gender = "m"
|
||||
new_icon_state = "[icon_name][gender ? "_[gender]" : ""]"
|
||||
|
||||
if(status & ORGAN_DEAD)
|
||||
mob_icon.ColorTone(rgb(10,50,0))
|
||||
mob_icon.SetIntensity(0.7)
|
||||
if(skeletal)
|
||||
icon_file = 'icons/mob/human_races/r_skeleton.dmi'
|
||||
else if(status & ORGAN_ROBOT)
|
||||
icon_file = 'icons/mob/human_races/robotic.dmi'
|
||||
else
|
||||
if(status & ORGAN_MUTATED)
|
||||
icon_file = species.deform
|
||||
else
|
||||
// Congratulations, you are normal
|
||||
icon_file = species.icobase
|
||||
return list(icon_file, new_icon_state)
|
||||
|
||||
if(!isnull(s_tone))
|
||||
if(s_tone >= 0)
|
||||
mob_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
mob_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
else if(s_col && s_col.len >= 3)
|
||||
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
|
||||
/obj/item/organ/external/chest/get_icon_state(skeletal)
|
||||
var/result = ..()
|
||||
if(fat && !skeletal && !(status & ORGAN_ROBOT) && (species.flags & CAN_BE_FAT))
|
||||
result[2] += "_fat"
|
||||
return result
|
||||
|
||||
dir = EAST
|
||||
icon = mob_icon
|
||||
|
||||
return mob_icon
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
insert(holder)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/Destroy()
|
||||
if(owner)
|
||||
remove(owner, 1)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/proc/insert(mob/living/carbon/M, special = 0, var/dont_remove_slot = 0)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
return
|
||||
@@ -43,7 +48,9 @@
|
||||
var/datum/action/A = X
|
||||
A.Grant(M)
|
||||
|
||||
|
||||
// Removes the given organ from its owner.
|
||||
// Returns the removed object, which is usually just itself
|
||||
// However, you MUST set the object's positiion yourself when you call this!
|
||||
/obj/item/organ/internal/remove(mob/living/carbon/M, special = 0)
|
||||
owner = null
|
||||
if(M)
|
||||
@@ -63,7 +70,7 @@
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(M)
|
||||
|
||||
return src
|
||||
|
||||
/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
|
||||
insert(target)
|
||||
@@ -78,11 +85,6 @@
|
||||
/obj/item/organ/internal/proc/on_life()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/Destroy()
|
||||
if(owner)
|
||||
remove(owner, 1)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/proc/prepare_eat()
|
||||
if(status == ORGAN_ROBOT)
|
||||
return //no eating cybernetic implants!
|
||||
@@ -96,6 +98,12 @@
|
||||
|
||||
return S
|
||||
|
||||
/obj/item/organ/internal/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
|
||||
if(parent_organ != parent.limb_name)
|
||||
return 0
|
||||
insert(H)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/organ
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
@@ -149,7 +157,7 @@
|
||||
icon_state = "[icon_base]-off"
|
||||
|
||||
/obj/item/organ/internal/heart/remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
. = ..()
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.stat == DEAD || H.heart_attack)
|
||||
@@ -279,7 +287,7 @@
|
||||
///obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = 0)
|
||||
// owner.losebreath += 10
|
||||
//insert oxy damage extream here.
|
||||
// ..()
|
||||
// . = ..()
|
||||
|
||||
|
||||
/obj/item/organ/internal/lungs/process()
|
||||
@@ -335,23 +343,14 @@
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
eye_colour = list(
|
||||
owner.r_eyes ? owner.r_eyes : 0,
|
||||
owner.g_eyes ? owner.g_eyes : 0,
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
dna.write_eyes_attributes(src)
|
||||
|
||||
/obj/item/organ/internal/eyes/insert(mob/living/carbon/M, special = 0)
|
||||
// Apply our eye colour to the target.
|
||||
if(istype(M) && eye_colour)
|
||||
var/mob/living/carbon/human/eyes = M
|
||||
eyes.r_eyes = eye_colour[1]
|
||||
eyes.g_eyes = eye_colour[2]
|
||||
eyes.b_eyes = eye_colour[3]
|
||||
eyes.update_eyes()
|
||||
..()
|
||||
if(istype(M) && eye_colour)
|
||||
var/mob/living/carbon/human/H = M
|
||||
// Apply our eye colour to the target.
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/internal/eyes/surgeryize()
|
||||
if(!owner)
|
||||
@@ -436,7 +435,7 @@
|
||||
A.cure()
|
||||
inflamed = 1
|
||||
update_icon()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/appendix/insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
@@ -508,7 +507,7 @@
|
||||
organhonked = world.time
|
||||
|
||||
/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
M.mutations.Remove(CLUMSY)
|
||||
M.mutations.Remove(COMICBLOCK)
|
||||
@@ -561,7 +560,7 @@
|
||||
/obj/item/organ/internal/honktumor/cursed
|
||||
|
||||
/obj/item/organ/internal/honktumor/cursed/remove(mob/living/carbon/M, special = 0, clean_remove = 0)
|
||||
..()
|
||||
. = ..()
|
||||
if(!clean_remove)
|
||||
visible_message("<span class='warning'>[src] vanishes into dust, and a [M] emits a loud honk!</span>", "<span class='notice'>You hear a loud honk.</span>")
|
||||
insert(M) //You're not getting away that easily!
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/obj/item/organ/external/stump/remove()
|
||||
..()
|
||||
qdel(src)
|
||||
return null
|
||||
|
||||
/obj/item/organ/external/stump/is_usable()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -32,4 +32,5 @@
|
||||
/obj/item/organ/internal/body_egg/spider_eggs/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
M.reagents.del_reagent("spidereggs") //purge all remaining spider eggs reagent if caught, in time.
|
||||
qdel(src) //We don't want people re-implanting these for near instant gibbings.
|
||||
qdel(src) //We don't want people re-implanting these for near instant gibbings.
|
||||
return null
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
M.add_language("Psionic Communication")
|
||||
|
||||
/obj/item/organ/internal/brain/grey/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
. = ..()
|
||||
M.remove_language("Psionic Communication")
|
||||
|
||||
@@ -117,13 +117,6 @@
|
||||
robotize()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cell/insert()
|
||||
..()
|
||||
// This is very ghetto way of rebooting an IPC. TODO better way.
|
||||
if(owner && owner.stat == DEAD)
|
||||
owner.stat = CONSCIOUS
|
||||
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
|
||||
|
||||
/obj/item/organ/internal/optical_sensor
|
||||
name = "optical sensor"
|
||||
organ_tag = "eyes"
|
||||
@@ -167,20 +160,25 @@
|
||||
species = "Machine"
|
||||
var/obj/item/device/mmi/stored_mmi
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi()
|
||||
if(!stored_mmi)
|
||||
return
|
||||
name = stored_mmi.name
|
||||
desc = stored_mmi.desc
|
||||
icon = stored_mmi.icon
|
||||
icon_state = stored_mmi.icon_state
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/Destroy()
|
||||
if(stored_mmi)
|
||||
qdel(stored_mmi)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/insert(var/mob/living/target,special = 0)
|
||||
..()
|
||||
// To supersede the over-writing of the MMI's name from `insert`
|
||||
update_from_mmi()
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/remove(var/mob/living/user,special = 0)
|
||||
if(!special)
|
||||
if(stored_mmi)
|
||||
stored_mmi.forceMove(get_turf(owner))
|
||||
. = stored_mmi
|
||||
if(owner.mind)
|
||||
owner.mind.transfer_to(stored_mmi.brainmob)
|
||||
stored_mmi.forceMove(get_turf(src))
|
||||
stored_mmi = null
|
||||
..()
|
||||
|
||||
var/mob/living/holder_mob = loc
|
||||
@@ -188,13 +186,14 @@
|
||||
holder_mob.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/New()
|
||||
..()
|
||||
// This is very ghetto way of rebooting an IPC. TODO better way.
|
||||
spawn(1)
|
||||
if(owner && owner.stat == DEAD)
|
||||
owner.stat = CONSCIOUS
|
||||
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
|
||||
/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi()
|
||||
if(!stored_mmi)
|
||||
return
|
||||
name = stored_mmi.name
|
||||
desc = stored_mmi.desc
|
||||
icon = stored_mmi.icon
|
||||
icon_state = stored_mmi.icon_state
|
||||
set_dna(stored_mmi.brainmob.dna)
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/posibrain/New()
|
||||
robotize()
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return null
|
||||
|
||||
//VOX ORGANS.
|
||||
/obj/item/organ/internal/stack
|
||||
|
||||
@@ -16,6 +16,25 @@
|
||||
cannot_amputate = 1
|
||||
parent_organ = null
|
||||
encased = "ribcage"
|
||||
var/fat = FALSE
|
||||
|
||||
/obj/item/organ/external/chest/proc/makeFat(update_body_icon = 1)
|
||||
fat = TRUE
|
||||
if(owner)
|
||||
owner.update_body(update_body_icon)
|
||||
else
|
||||
// get_icon updates the sprite icon, update_icon updates the injuries overlay.
|
||||
// Madness.
|
||||
get_icon()
|
||||
|
||||
/obj/item/organ/external/chest/proc/makeSlim(update_body_icon = 1)
|
||||
fat = FALSE
|
||||
if(owner)
|
||||
owner.update_body(update_body_icon)
|
||||
else
|
||||
// get_icon updates the sprite icon, update_icon updates the injuries overlay.
|
||||
// Madness.
|
||||
get_icon()
|
||||
|
||||
/obj/item/organ/external/groin
|
||||
name = "lower body"
|
||||
@@ -85,7 +104,7 @@
|
||||
|
||||
/obj/item/organ/external/foot/remove()
|
||||
if(owner.shoes) owner.unEquip(owner.shoes)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/foot/right
|
||||
limb_name = "r_foot"
|
||||
@@ -116,7 +135,7 @@
|
||||
if(owner.r_hand)
|
||||
owner.unEquip(owner.r_hand,1)
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/hand/right
|
||||
limb_name = "r_hand"
|
||||
@@ -185,7 +204,7 @@
|
||||
if(owner)//runtimer no runtiming
|
||||
owner.update_hair()
|
||||
owner.update_fhair()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/head/replaced()
|
||||
name = limb_name
|
||||
@@ -211,3 +230,7 @@
|
||||
else //If alt_head is null, set it to "None" and default icon_name for sanity.
|
||||
alt_head = initial(alt_head)
|
||||
icon_name = initial(icon_name)
|
||||
|
||||
/obj/item/organ/external/head/set_dna(datum/dna/new_dna)
|
||||
..()
|
||||
new_dna.write_head_attributes(src)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
M.verbs -= P
|
||||
//M.verbs -= alien_powers.Copy()
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/xenos/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
@@ -106,7 +106,7 @@
|
||||
A.updatePlasmaDisplay()
|
||||
|
||||
/obj/item/organ/internal/alien/plasmavessel/remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
. =..()
|
||||
if(isalien(M))
|
||||
var/mob/living/carbon/alien/A = M
|
||||
A.updatePlasmaDisplay()
|
||||
@@ -140,7 +140,7 @@
|
||||
M.faction -= "alien"
|
||||
M.remove_language("Hivemind")
|
||||
M.remove_language("Xenomorph")
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/xenos/neurotoxin
|
||||
name = "xeno neurotoxin gland"
|
||||
@@ -165,4 +165,4 @@
|
||||
slot = "eggsac"
|
||||
w_class = 4
|
||||
origin_tech = "biotech=8"
|
||||
alien_powers = list(/mob/living/carbon/alien/humanoid/queen/verb/lay_egg)
|
||||
alien_powers = list(/mob/living/carbon/alien/humanoid/queen/verb/lay_egg)
|
||||
|
||||
Reference in New Issue
Block a user