mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
things
and stuff...gonna need to get to those merge conflicts eventually. also purged all mention of internal_organs by name from the face of the earth. we have get_int_organ now...i may need to tweak shit. oh and i broke some things...
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
target.blinded += 1.5
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = target.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
|
||||
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
|
||||
|
||||
@@ -7,13 +7,12 @@
|
||||
parent_organ = "eyes"
|
||||
w_class = 1
|
||||
|
||||
var/sight_flags = 0
|
||||
var/vision_flags = 0
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
var/list/old_eye_colour = list(0,0,0)
|
||||
var/flash_protect = 0
|
||||
var/aug_message = "Your vision is augmented!"
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
@@ -38,11 +37,12 @@
|
||||
HMN.update_eyes()
|
||||
if(aug_message && !special)
|
||||
owner << "<span class='notice'>[aug_message]</span>"
|
||||
M.sight |= sight_flags
|
||||
M.sight |= vision_flags
|
||||
world << "[M.sight]"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
M.sight ^= sight_flags
|
||||
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]
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/on_life()
|
||||
..()
|
||||
owner.sight |= sight_flags
|
||||
owner.sight |= vision_flags
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/emp_act(severity)
|
||||
if(!owner)
|
||||
@@ -77,14 +77,14 @@
|
||||
eye_colour = rgb(0, 0, 0)
|
||||
implant_color = "#000000"
|
||||
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
|
||||
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/thermals
|
||||
name = "Thermals implant"
|
||||
desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included."
|
||||
eye_colour = rgb(255, 204, 0)
|
||||
implant_color = "#FFCC00"
|
||||
sight_flags = SEE_MOBS
|
||||
vision_flags = SEE_MOBS
|
||||
flash_protect = -1
|
||||
origin_tech = "materials=6;programming=4;biotech=5;magnets=5;syndicate=4"
|
||||
aug_message = "You see prey everywhere you look..."
|
||||
@@ -137,5 +137,6 @@
|
||||
implant_color = "#101010"
|
||||
flash_protect = 2
|
||||
// Welding with thermals will still hurt your eyes a bit.
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/shield/emp_act(severity)
|
||||
return
|
||||
@@ -8,6 +8,8 @@
|
||||
status = ORGAN_ROBOT
|
||||
var/implant_color = "#FFFFFF"
|
||||
var/implant_overlay
|
||||
tough = 1 //not easyly broken by combat damage
|
||||
sterile = 1 //not very germy
|
||||
|
||||
/obj/item/organ/internal/cyberimp/New(var/mob/M = null)
|
||||
if(iscarbon(M))
|
||||
|
||||
@@ -87,7 +87,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
// Damaged heart virtually reduces the blood volume, as the blood isn't
|
||||
// being pumped properly anymore.
|
||||
var/obj/item/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart)
|
||||
|
||||
if(heart)
|
||||
if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
|
||||
@@ -32,19 +32,20 @@ var/list/organ_cache = list()
|
||||
/obj/item/organ/Destroy()
|
||||
if(!owner)
|
||||
return ..()
|
||||
/*
|
||||
|
||||
|
||||
if(istype(owner, /mob/living/carbon))
|
||||
if((owner.internal_organs) && (src in owner.internal_organs))
|
||||
owner.internal_organs -= src
|
||||
var/obj/item/organ/internal/O = src
|
||||
O.remove(owner)
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
if((owner.internal_organs_by_name) && (src in owner.internal_organs_by_name))
|
||||
owner.internal_organs_by_name -= src
|
||||
if((owner.organs) && (src in owner.organs))
|
||||
owner.organs -= src
|
||||
if((owner.organs_by_name) && (src in owner.organs_by_name))
|
||||
owner.organs_by_name -= src
|
||||
*/
|
||||
var/obj/item/organ/internal/O = src
|
||||
O.remove(owner)
|
||||
if((owner.organs) && (src in owner.organs))
|
||||
owner.organs -= src
|
||||
if((owner.organs_by_name) && (src in owner.organs_by_name))
|
||||
owner.organs_by_name -= src
|
||||
|
||||
if(src in owner.contents)
|
||||
owner.contents -= src
|
||||
|
||||
@@ -101,8 +102,8 @@ var/list/organ_cache = list()
|
||||
owner.death()
|
||||
|
||||
/obj/item/organ/process()
|
||||
if(loc != owner)
|
||||
owner = null
|
||||
//if(loc != owner)
|
||||
// owner = null
|
||||
|
||||
//dead already, no need for more processing
|
||||
if(status & ORGAN_DEAD)
|
||||
@@ -289,10 +290,10 @@ var/list/organ_cache = list()
|
||||
if(!istype(owner))
|
||||
return
|
||||
|
||||
if(is_primary_organ())
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
owner.internal_organs_by_name -= null // uh what does this line even do this seems silly
|
||||
//if(is_primary_organ())//Toddo from fethas:Do i need to move ths?
|
||||
// owner.internal_organs_by_name[organ_tag] = null
|
||||
// owner.internal_organs_by_name -= organ_tag
|
||||
// owner.internal_organs_by_name -= null // uh what does this line even do this seems silly
|
||||
|
||||
owner.internal_organs -= src
|
||||
|
||||
@@ -320,10 +321,9 @@ var/list/organ_cache = list()
|
||||
|
||||
owner = target
|
||||
processing_objects -= src
|
||||
target.internal_organs |= src
|
||||
affected.internal_organs |= src
|
||||
if (!(organ_tag in target.internal_organs_by_name))
|
||||
target.internal_organs_by_name[organ_tag] = src // In case multiple of the same type are inserted, only the first one is the primary organ
|
||||
if (!target.get_int_organ(src))
|
||||
target.internal_organs |= src
|
||||
src.loc = target
|
||||
if(robotic)
|
||||
status |= ORGAN_ROBOT
|
||||
@@ -342,4 +342,4 @@ I use this so that this can be made better once the organ overhaul rolls out --
|
||||
O = owner
|
||||
if (!istype(owner)) // You're not the primary organ of ANYTHING, bucko
|
||||
return 0
|
||||
return src == O.internal_organs_by_name[organ_tag]
|
||||
return src == O.get_int_organ(organ_tag)
|
||||
|
||||
@@ -71,7 +71,9 @@
|
||||
|
||||
if(internal_organs)
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
qdel(O)
|
||||
internal_organs -= O
|
||||
O.remove(owner)
|
||||
//qdel(O)
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -95,11 +97,12 @@
|
||||
if(contents.len)
|
||||
var/obj/item/removing = pick(contents)
|
||||
removing.loc = get_turf(user.loc)
|
||||
var/obj/item/organ/O = removing
|
||||
var/obj/item/organ/internal/O = removing
|
||||
if(istype(O))
|
||||
O.status |= ORGAN_CUT_AWAY
|
||||
spread_germs_to_organ(O,user) // This wouldn't be any cleaner than the actual surgery
|
||||
O.removed(user)
|
||||
if(!O.sterile)
|
||||
spread_germs_to_organ(O,user) // This wouldn't be any cleaner than the actual surgery
|
||||
O.remove(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]!")
|
||||
@@ -166,7 +169,8 @@
|
||||
// Damage an internal organ
|
||||
if(internal_organs && internal_organs.len)
|
||||
var/obj/item/organ/internal/I = pick(internal_organs)
|
||||
I.take_damage(brute / 2)
|
||||
if(!I.tough)//mostly for cybernetic organs
|
||||
I.take_damage(brute / 2)
|
||||
brute -= brute / 2
|
||||
|
||||
if(status & ORGAN_BROKEN && prob(40) && brute)
|
||||
|
||||
@@ -33,7 +33,7 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||
..()
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ("eyes")//owner.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes)//owner.internal_organs_by_name["eyes"]
|
||||
if(eyes) eyes.update_colour()
|
||||
|
||||
/obj/item/organ/external/head/removed()
|
||||
@@ -48,7 +48,7 @@ var/global/list/limb_icon_cache = list()
|
||||
return
|
||||
|
||||
if(species.has_organ["eyes"])
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes)//owner.internal_organs_by_name["eyes"]
|
||||
if(species.eyes)
|
||||
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', species.eyes)
|
||||
if(eyes)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
var/slot
|
||||
vital = 0
|
||||
var/organ_action_name = null
|
||||
var/sterile = 0 //can the organ be infected by germs?
|
||||
var/tough = 0 //can organ be easily damaged?
|
||||
|
||||
/obj/item/organ/internal/proc/insert(mob/living/carbon/M, special = 0)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
@@ -19,7 +21,9 @@
|
||||
replaced.remove(M, special = 1)
|
||||
|
||||
owner = M
|
||||
|
||||
M.internal_organs |= src
|
||||
//M.internal_organs_by_name[src] |= src(H,1)
|
||||
loc = null
|
||||
if(organ_action_name)
|
||||
action_button_name = organ_action_name
|
||||
@@ -29,6 +33,7 @@
|
||||
owner = null
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
//M.internal_organs_by_name[src] -= src
|
||||
if(vital && !special)
|
||||
M.death()
|
||||
|
||||
@@ -192,6 +197,16 @@
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
/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()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/eyes/surgeryize()
|
||||
if(!owner)
|
||||
return
|
||||
@@ -200,6 +215,7 @@
|
||||
owner.eye_blurry = 0
|
||||
owner.eye_blind = 0
|
||||
|
||||
|
||||
/obj/item/organ/internal/liver
|
||||
name = "liver"
|
||||
icon_state = "liver"
|
||||
@@ -282,7 +298,7 @@
|
||||
name = "inflamed appendix"
|
||||
..()
|
||||
*/
|
||||
|
||||
//shadowling tumor
|
||||
/obj/item/organ/internal/shadowtumor
|
||||
name = "black tumor"
|
||||
desc = "A tiny black mass with red tendrils trailing from it. It seems to shrivel in the light."
|
||||
@@ -305,10 +321,34 @@
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
var/light_count = T.get_lumcount()
|
||||
world << "[light_count]"
|
||||
if(light_count > 4 && health > 0) //Die in the light
|
||||
health--
|
||||
else if(light_count < 2 && health < 3) //Heal in the dark
|
||||
health++
|
||||
if(health <= 0)
|
||||
visible_message("<span class='warning'>[src] collapses in on itself!</span>")
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
//debug and adminbus....
|
||||
|
||||
/obj/item/organ/internal/honktumor
|
||||
name = "banana tumor"
|
||||
desc = "A tiny yellow mass shaped like..a banana?"
|
||||
icon_state = "honktumor"
|
||||
origin_tech = "biotech=1"
|
||||
w_class = 1
|
||||
parent_organ = "head"
|
||||
slot = "brain_tumor"
|
||||
health = 3
|
||||
|
||||
/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = 0)
|
||||
|
||||
M.mutations.Add(CLUMSY)
|
||||
M.dna.SetSEState(COMICBLOCK,1,1)
|
||||
//genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
|
||||
|
||||
/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0)
|
||||
M.mutations.Remove(CLUMSY)
|
||||
M.mutations.Remove(COMICBLOCK)
|
||||
//genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
|
||||
@@ -88,7 +88,7 @@
|
||||
..()
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/internal/mmi_holder
|
||||
/obj/item/organ/internal/brain/mmi_holder
|
||||
name = "brain"
|
||||
organ_tag = "brain"
|
||||
parent_organ = "chest"
|
||||
@@ -97,7 +97,7 @@
|
||||
slot = "brain"
|
||||
var/obj/item/device/mmi/stored_mmi
|
||||
|
||||
/obj/item/organ/internal/mmi_holder/proc/update_from_mmi()
|
||||
/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi()
|
||||
if(!stored_mmi)
|
||||
return
|
||||
name = stored_mmi.name
|
||||
@@ -105,7 +105,7 @@
|
||||
icon = stored_mmi.icon
|
||||
icon_state = stored_mmi.icon_state
|
||||
|
||||
/obj/item/organ/internal/mmi_holder/remove(var/mob/living/user)
|
||||
/obj/item/organ/internal/brain/mmi_holder/remove(var/mob/living/user)
|
||||
if(stored_mmi)
|
||||
stored_mmi.loc = get_turf(src)
|
||||
if(owner.mind)
|
||||
@@ -117,7 +117,7 @@
|
||||
holder_mob.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/mmi_holder/New()
|
||||
/obj/item/organ/internal/brain/mmi_holder/New()
|
||||
..()
|
||||
// This is very ghetto way of rebooting an IPC. TODO better way.
|
||||
spawn(1)
|
||||
@@ -125,7 +125,7 @@
|
||||
owner.stat = CONSCIOUS
|
||||
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
|
||||
|
||||
/obj/item/organ/internal/mmi_holder/posibrain/New()
|
||||
/obj/item/organ/internal/brain/mmi_holder/posibrain/New()
|
||||
robotize()
|
||||
stored_mmi = new /obj/item/device/mmi/posibrain(src)
|
||||
..()
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
origin_tech = "biotech=5"
|
||||
icon_state = "xgibmid2"
|
||||
var/list/alien_powers = list()
|
||||
tough = 1
|
||||
sterile = 1
|
||||
|
||||
/obj/item/organ/internal/xenos/New()
|
||||
for(var/A in alien_powers)
|
||||
|
||||
@@ -163,7 +163,8 @@
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
spread_germs_to_organ(I, user)
|
||||
if(!I.sterile)
|
||||
spread_germs_to_organ(I, user)
|
||||
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You start treating damage to [target]'s [I.name] with [tool_name]." )
|
||||
|
||||
@@ -370,13 +371,13 @@
|
||||
|
||||
if(O.organ_tag == "limb")
|
||||
return 0
|
||||
else if(target.species.has_organ[O.organ_tag])
|
||||
else if(target.species.has_organ[O.organ_tag])//need to change this around for cybernetic implants
|
||||
|
||||
if(O.damage > (O.max_damage * 0.75))
|
||||
user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted."
|
||||
return 2
|
||||
|
||||
if(!target.internal_organs_by_name[O.organ_tag])
|
||||
if(!target.get_int_organ(O))
|
||||
organ_missing = 1
|
||||
else
|
||||
user << "\red \The [target] already has [o_a][O.organ_tag]."
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
user.visible_message("\blue [user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
var/obj/item/organ/internal/I = target.get_int_organ(target.op_stage.current_organ)
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
var/obj/item/organ/internal/I = target.get_int_organ(target.op_stage.current_organ)
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
|
||||
return 2
|
||||
|
||||
if(!isnull(target.internal_organs["brain"]))
|
||||
if(target.get_int_organ(/obj/item/organ/internal/brain/))
|
||||
user << "<span class='danger'>Your subject already has a brain.</span>"
|
||||
return 2
|
||||
|
||||
@@ -432,11 +432,11 @@
|
||||
"\blue You have installed \the [tool] into [target]'s [affected.name].")
|
||||
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/internal/mmi_holder/holder = new(target, 1)
|
||||
var/obj/item/organ/internal/brain/mmi_holder/holder = new()
|
||||
if (istype(M, /obj/item/device/mmi/posibrain))
|
||||
holder.robotize()
|
||||
|
||||
target.internal_organs_by_name["brain"] = holder
|
||||
holder.insert(target)
|
||||
user.unEquip(tool)
|
||||
tool.forceMove(holder)
|
||||
holder.stored_mmi = tool
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user)
|
||||
if(!istype(user) || !istype(E)) return
|
||||
|
||||
//world << "Germ spread: [E] : [E.owner]"
|
||||
var/germ_level = user.germ_level
|
||||
if(user.gloves)
|
||||
germ_level = user.gloves.germ_level
|
||||
|
||||
Reference in New Issue
Block a user