mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into mitocholide_organ_rejuv
This commit is contained in:
@@ -139,6 +139,9 @@ var/global/nologevent = 0
|
||||
else
|
||||
body += "<A href='?_src_=holder;makeanimal=\ref[M]'>Animalize</A> | "
|
||||
|
||||
if(istype(M, /mob/dead/observer))
|
||||
body += "<a href='?_src_=holder;incarn_ghost=\ref[M]'>Re-incarnate</a> | "
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
if(M.dna && iscarbon(M))
|
||||
body += "<br><br>"
|
||||
|
||||
@@ -1523,6 +1523,14 @@
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
|
||||
else if(href_list["incarn_ghost"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/dead/observer/G = locate(href_list["incarn_ghost"])
|
||||
if(!istype(G))
|
||||
usr << "This will only work on /mob/dead/observer"
|
||||
G.incarnate_ghost()
|
||||
|
||||
else if(href_list["togmutate"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
|
||||
@@ -1585,8 +1585,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
if(character.dna)
|
||||
character.dna.real_name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
character.med_record = med_record
|
||||
@@ -1696,6 +1694,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.")
|
||||
character.change_gender(MALE)
|
||||
|
||||
character.dna.ready_dna(character)
|
||||
character.sync_organ_dna(assimilate=1)
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT slot,real_name FROM [format_table_name("characters")] WHERE ckey='[user.ckey]' ORDER BY slot")
|
||||
|
||||
@@ -636,3 +636,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/proc/incarnate_ghost()
|
||||
if(!client)
|
||||
return
|
||||
var/mob/living/carbon/human/new_char = new(get_turf(src))
|
||||
client.prefs.copy_to(new_char)
|
||||
if(mind)
|
||||
mind.transfer_to(new_char)
|
||||
else
|
||||
new_char.key = key
|
||||
@@ -34,6 +34,14 @@
|
||||
for(var/mob/living/M in contents)
|
||||
M.show_message(message,m_type)
|
||||
|
||||
/obj/item/weapon/holder/emp_act(var/intensity)
|
||||
for(var/mob/living/M in contents)
|
||||
M.emp_act(intensity)
|
||||
|
||||
/obj/item/weapon/holder/ex_act(var/intensity)
|
||||
for(var/mob/living/M in contents)
|
||||
M.ex_act(intensity)
|
||||
|
||||
/obj/item/weapon/holder/container_resist(var/mob/living/L)
|
||||
var/mob/M = src.loc //Get our mob holder (if any).
|
||||
|
||||
@@ -91,4 +99,5 @@
|
||||
/obj/item/weapon/holder/mouse
|
||||
name = "mouse"
|
||||
desc = "It's a small, disease-ridden rodent."
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "mouse_gray"
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
user << "<span class='userdanger'>Somehow, this MMI still has a brain in it. Report this to the bug tracker.</span>"
|
||||
log_to_dd("[user] tried to stick a [O] into [src] in [get_area(src)], but the held brain variable wasn't cleared")
|
||||
return
|
||||
if(B.status & ORGAN_DEAD) // As it stood, a brain would never become unviable for MMI usage. Perhaps we should keep it that way?
|
||||
user << "<span class='warning'>This [B] is dead</span>"
|
||||
return
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("<span class='notice'>[user] sticks \a [O] into \the [src].</span>")
|
||||
brainmob = B.brainmob
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
|
||||
/obj/item/organ/internal/brain/remove(var/mob/living/user,special = 0)
|
||||
|
||||
name = "[dna.real_name]'s [initial(name)]"
|
||||
|
||||
if(!owner) return ..() // Probably a redundant removal; just bail
|
||||
|
||||
var/obj/item/organ/internal/brain/B = src
|
||||
@@ -77,7 +79,7 @@
|
||||
|
||||
/obj/item/organ/internal/brain/insert(var/mob/living/target,special = 0)
|
||||
|
||||
name = "brain"
|
||||
name = "[initial(name)]"
|
||||
var/brain_already_exists = 0
|
||||
if(istype(target,/mob/living/carbon/human)) // No more IPC multibrain shenanigans
|
||||
if(target.get_int_organ(/obj/item/organ/internal/brain))
|
||||
|
||||
@@ -147,11 +147,14 @@
|
||||
/*
|
||||
When assimilate is 1, organs that have a different UE will still have their DNA overriden by that of the host
|
||||
Otherwise, this restricts itself to organs that share the UE of the host.
|
||||
|
||||
old_ue: Set this to a UE string, and this proc will overwrite the dna of organs that have that UE, instead of the host's present UE
|
||||
*/
|
||||
/mob/living/carbon/human/proc/sync_organ_dna(var/assimilate = 1)
|
||||
/mob/living/carbon/human/proc/sync_organ_dna(var/assimilate = 1, var/old_ue = null)
|
||||
var/ue_to_compare = (old_ue) ? old_ue : dna.unique_enzymes
|
||||
var/list/all_bits = internal_organs|organs
|
||||
for(var/obj/item/organ/O in all_bits)
|
||||
if(assimilate || O.dna.unique_enzymes == dna.unique_enzymes)
|
||||
if(assimilate || O.dna.unique_enzymes == ue_to_compare)
|
||||
O.set_dna(dna)
|
||||
|
||||
/*
|
||||
|
||||
@@ -385,7 +385,6 @@
|
||||
var/mob/living/carbon/C = src
|
||||
C.handcuffed = initial(C.handcuffed)
|
||||
C.heart_attack = 0
|
||||
C.brain_op_stage = 0
|
||||
|
||||
// restore all of the human's blood and reset their shock stage
|
||||
if(ishuman(src))
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/E = tool
|
||||
var/obj/item/organ/external/E = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
|
||||
"<span class='alert'>Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
|
||||
target.apply_damage(10, BRUTE, null, sharp=1)
|
||||
|
||||
@@ -84,7 +84,7 @@ var/list/organ_cache = list()
|
||||
return
|
||||
|
||||
//Process infections
|
||||
if ((status & ORGAN_ROBOT) || (sterile) ||(owner && owner.species && (owner.species.flags & IS_PLANT)))
|
||||
if ((status & ORGAN_ROBOT) || sterile ||(owner && owner.species && (owner.species.flags & IS_PLANT)))
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
var/cannot_amputate
|
||||
var/cannot_break
|
||||
var/s_tone
|
||||
var/list/s_col = list()
|
||||
var/list/s_col = null // If this is instantiated, it should be a list of length 3
|
||||
var/list/wounds = list()
|
||||
var/list/child_icons = list()
|
||||
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
|
||||
var/perma_injury = 0
|
||||
// 0: Don't fail when at full damage
|
||||
@@ -64,6 +65,7 @@
|
||||
var/amputation_point // Descriptive string used in amputation.
|
||||
var/can_grasp
|
||||
var/can_stand
|
||||
var/wound_cleanup_timer
|
||||
|
||||
/obj/item/organ/external/Destroy()
|
||||
if(parent && parent.children)
|
||||
@@ -78,6 +80,10 @@
|
||||
for(var/obj/item/organ/external/C in children)
|
||||
qdel(C)
|
||||
|
||||
if(wound_cleanup_timer)
|
||||
deltimer(wound_cleanup_timer)
|
||||
wound_cleanup_timer = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -392,6 +398,11 @@ This function completely restores a damaged organ to perfect condition.
|
||||
last_dam = brute_dam + burn_dam
|
||||
if(germ_level)
|
||||
return 1
|
||||
if(!wound_cleanup_timer)
|
||||
wound_cleanup_timer = addtimer(src, "cleanup_wounds", SecondsToTicks(600), 1, wounds)
|
||||
|
||||
if (update_icon())
|
||||
owner.UpdateDamageIcon(1)
|
||||
return 0
|
||||
|
||||
/obj/item/organ/external/process()
|
||||
@@ -525,11 +536,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return
|
||||
|
||||
for(var/datum/wound/W in wounds)
|
||||
// wounds can disappear after 10 minutes at the earliest
|
||||
if(W.damage <= 0 && W.created + 10 * 10 * 60 <= world.time)
|
||||
wounds -= W
|
||||
continue
|
||||
// let the GC handle the deletion of the wound
|
||||
|
||||
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
|
||||
if(W.internal && !W.can_autoheal() && owner.bodytemperature >= 170)
|
||||
@@ -941,3 +947,14 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if (!istype(O)) // You're not the primary organ of ANYTHING, bucko
|
||||
return 0
|
||||
return src == O.organs_by_name[limb_name]
|
||||
|
||||
// The callback we use to remove wounds from an un-processed limb
|
||||
/obj/item/organ/external/proc/cleanup_wounds(var/list/slated_wounds)
|
||||
wound_cleanup_timer = null
|
||||
for(var/datum/wound/W in slated_wounds)
|
||||
if(!W)
|
||||
continue
|
||||
if(W.damage > 0)
|
||||
continue
|
||||
wounds -= W
|
||||
qdel(W)
|
||||
|
||||
@@ -1,34 +1,42 @@
|
||||
var/global/list/limb_icon_cache = list()
|
||||
|
||||
/obj/item/organ/external/proc/compile_icon()
|
||||
overlays.Cut()
|
||||
// I do this so the head's overlays don't get obliterated
|
||||
for(var/child_i in child_icons)
|
||||
overlays -= child_i
|
||||
child_icons.Cut()
|
||||
// This is a kludge, only one icon has more than one generation of children though.
|
||||
for(var/obj/item/organ/external/organ in contents)
|
||||
if(organ.children && organ.children.len)
|
||||
for(var/obj/item/organ/external/child in organ.children)
|
||||
overlays += child.mob_icon
|
||||
child_icons += child.mob_icon
|
||||
overlays += organ.mob_icon
|
||||
child_icons += organ.mob_icon
|
||||
|
||||
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||
s_tone = null
|
||||
s_col = null
|
||||
if(status & ORGAN_ROBOT && !(species && species.name == "Machine")) //machine people get skin color
|
||||
return
|
||||
if(species && human.species && species.name != human.species.name)
|
||||
return
|
||||
if(dna.unique_enzymes != human.dna.unique_enzymes) // This isn't MY arm
|
||||
sync_colour_to_dna()
|
||||
return
|
||||
if(!isnull(human.s_tone) && (human.species.bodyflags & HAS_SKIN_TONE))
|
||||
s_col = null
|
||||
s_tone = human.s_tone
|
||||
if(human.species.bodyflags & HAS_SKIN_COLOR)
|
||||
s_tone = null
|
||||
s_col = list(human.r_skin, human.g_skin, human.b_skin)
|
||||
|
||||
/obj/item/organ/external/proc/sync_colour_to_dna()
|
||||
s_tone = null
|
||||
s_col = null
|
||||
if(status & ORGAN_ROBOT)
|
||||
return
|
||||
if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.flags & HAS_SKIN_TONE))
|
||||
s_col = null
|
||||
s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE)
|
||||
if(species.flags & HAS_SKIN_COLOR)
|
||||
s_tone = null
|
||||
s_col = list(dna.GetUIValue(DNA_UI_SKIN_R), dna.GetUIValue(DNA_UI_SKIN_G), dna.GetUIValue(DNA_UI_SKIN_B))
|
||||
|
||||
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||
|
||||
@@ -194,6 +194,24 @@
|
||||
parent_organ = "head"
|
||||
slot = "eyes"
|
||||
|
||||
|
||||
/obj/item/organ/internal/diona_receptor/remove(var/mob/living/user,special = 0)
|
||||
if(!special)
|
||||
owner.disabilities |= NEARSIGHTED
|
||||
owner.sdisabilities |= BLIND
|
||||
owner.eye_blind = 20
|
||||
owner.eye_blurry = 40
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/diona_receptor/surgeryize()
|
||||
if(!owner)
|
||||
return
|
||||
owner.disabilities &= ~NEARSIGHTED
|
||||
owner.sdisabilities &= ~BLIND
|
||||
owner.eye_blurry = 0
|
||||
owner.eye_blind = 0
|
||||
|
||||
|
||||
//TODO:Make absorb rads on insert
|
||||
|
||||
/obj/item/organ/internal/liver/diona
|
||||
|
||||
@@ -129,6 +129,26 @@
|
||||
robotize()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/organ/internal/optical_sensor/remove(var/mob/living/user,special = 0)
|
||||
if(!special)
|
||||
owner.disabilities |= NEARSIGHTED
|
||||
owner.sdisabilities |= BLIND
|
||||
owner.eye_blind = 20
|
||||
owner.eye_blurry = 40
|
||||
owner << "Error 404:Optical Sensors not found."
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/optical_sensor/surgeryize()
|
||||
if(!owner)
|
||||
return
|
||||
owner.disabilities &= ~NEARSIGHTED
|
||||
owner.sdisabilities &= ~BLIND
|
||||
owner.eye_blurry = 0
|
||||
owner.eye_blind = 0
|
||||
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/internal/brain/mmi_holder
|
||||
name = "brain"
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// INTERNAL WOUND PATCHING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery/infection
|
||||
name = "external infection treatment/autopsy"
|
||||
steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/cauterize)
|
||||
possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot")
|
||||
|
||||
/datum/surgery/bleeding
|
||||
name = "internal bleeding"
|
||||
steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin,/datum/surgery_step/fix_vein,/datum/surgery_step/generic/cauterize)
|
||||
possible_locs = list("chest","head","groin")
|
||||
possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot")
|
||||
|
||||
/datum/surgery/bleeding/can_start(mob/user, mob/living/carbon/target)
|
||||
if(ishuman(target))
|
||||
@@ -14,9 +20,10 @@
|
||||
if(!affected) return 0
|
||||
|
||||
var/internal_bleeding = 0
|
||||
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
for(var/datum/wound/W in affected.wounds)
|
||||
if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
if(internal_bleeding)
|
||||
return 1
|
||||
return 0
|
||||
@@ -37,9 +44,10 @@
|
||||
if(!affected) return 0
|
||||
|
||||
var/internal_bleeding = 0
|
||||
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
for(var/datum/wound/W in affected.wounds)
|
||||
if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
|
||||
return affected.open == 2 && internal_bleeding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user