mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #9070 from Fox-McCloud/plastic-surgery
Adds Plastic Surgery; Fixes Disfigurement
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
C.emote("scream")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
C.apply_damage(25, BURN, "head") //25 fire damage and disfigurement because your face was just deep fried!
|
||||
head.disfigure("burn")
|
||||
head.disfigure()
|
||||
add_attack_logs(user, G.affecting, "Deep-fried with [src]")
|
||||
qdel(G) //Removes the grip so the person MIGHT have a small chance to run the fuck away and to prevent rapid dunks.
|
||||
return 0
|
||||
|
||||
@@ -139,9 +139,11 @@
|
||||
|
||||
/mob/living/carbon/human/proc/makeSkeleton()
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
if(SKELETON in src.mutations) return
|
||||
if(SKELETON in src.mutations)
|
||||
return
|
||||
|
||||
if(istype(H))
|
||||
H.disfigured = TRUE
|
||||
if(H.f_style)
|
||||
H.f_style = initial(H.f_style)
|
||||
if(H.h_style)
|
||||
@@ -159,16 +161,17 @@
|
||||
|
||||
mutations.Add(SKELETON)
|
||||
mutations.Add(NOCLONE)
|
||||
status_flags |= DISFIGURED
|
||||
update_body(0)
|
||||
update_mutantrace()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
var/obj/item/organ/external/head/H = bodyparts_by_name["head"]
|
||||
if(HUSK in mutations) return
|
||||
if(HUSK in mutations)
|
||||
return
|
||||
|
||||
if(istype(H))
|
||||
H.disfigured = TRUE //makes them unknown without fucking up other stuff like admintools
|
||||
if(H.f_style)
|
||||
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
if(H.h_style)
|
||||
@@ -177,7 +180,6 @@
|
||||
update_hair(0)
|
||||
|
||||
mutations.Add(HUSK)
|
||||
status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools
|
||||
update_body(0)
|
||||
update_mutantrace()
|
||||
return
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
|
||||
/mob/living/carbon/human/proc/get_face_name()
|
||||
var/obj/item/organ/external/head = get_organ("head")
|
||||
if( !head || head.disfigured || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
|
||||
if(!head || head.disfigured || cloneloss > 50 || !real_name || (HUSK in mutations)) //disfigured. use id-name if possible
|
||||
return "Unknown"
|
||||
return real_name
|
||||
|
||||
|
||||
@@ -115,7 +115,11 @@
|
||||
M.adjustToxLoss(-3)
|
||||
M.adjustBruteLoss(-12)
|
||||
M.adjustFireLoss(-12)
|
||||
M.status_flags &= ~DISFIGURED
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/head/head = H.get_organ("head")
|
||||
if(head)
|
||||
head.disfigured = FALSE
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/rezadone
|
||||
@@ -131,7 +135,11 @@
|
||||
M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate.
|
||||
M.adjustBruteLoss(-1)
|
||||
M.adjustFireLoss(-1)
|
||||
M.status_flags &= ~DISFIGURED
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/head/head = H.get_organ("head")
|
||||
if(head)
|
||||
head.disfigured = FALSE
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity)
|
||||
|
||||
@@ -611,11 +611,11 @@
|
||||
return
|
||||
|
||||
if(!H.unacidable)
|
||||
var/obj/item/organ/external/affecting = H.get_organ("head")
|
||||
affecting.receive_damage(0, 75)
|
||||
var/obj/item/organ/external/head/affecting = H.get_organ("head")
|
||||
if(affecting)
|
||||
affecting.receive_damage(0, 75)
|
||||
H.UpdateDamageIcon()
|
||||
H.emote("scream")
|
||||
H.status_flags |= DISFIGURED
|
||||
|
||||
/datum/reagent/facid/reaction_obj(obj/O, volume)
|
||||
if((istype(O, /obj/item) || istype(O, /obj/structure/glowshroom)))
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
"<span class='warning'>Your hand slips, damaging [target]'s face with \the [tool]!</span>")
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.receive_damage(10)
|
||||
h.disfigured = 1
|
||||
h.disfigure()
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/finish_bone
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
//Procedures in this file: Facial reconstruction surgery
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// FACE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery/plastic_surgery
|
||||
name = "Face Repair"
|
||||
steps = list(/datum/surgery_step/generic/cut_face, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/face/mend_vocal, /datum/surgery_step/face/fix_face,/datum/surgery_step/face/cauterize)
|
||||
possible_locs = list("head")
|
||||
|
||||
|
||||
|
||||
/datum/surgery/plastic_surgery/can_start(mob/user, mob/living/carbon/target)
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
if(!affected)
|
||||
return 0
|
||||
if(affected.status & ORGAN_ROBOT)
|
||||
return 0
|
||||
if(!affected.disfigured)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/face
|
||||
priority = 2
|
||||
can_infect = 0
|
||||
|
||||
/datum/surgery_step/generic/cut_face
|
||||
name = "make incision"
|
||||
allowed_tools = list(
|
||||
/obj/item/scalpel = 100, \
|
||||
/obj/item/kitchen/knife = 90, \
|
||||
/obj/item/shard = 60, \
|
||||
)
|
||||
|
||||
time = 16
|
||||
|
||||
/datum/surgery_step/generic/cut_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \
|
||||
"You start to cut open [target]'s face and neck with \the [tool].")
|
||||
..()
|
||||
|
||||
/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("<span class='notice'> [user] has cut open [target]'s face and neck with \the [tool].</span>" , \
|
||||
"<span class='notice'> You have cut open [target]'s face and neck with \the [tool].</span>",)
|
||||
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, slicing [target]'s throat wth \the [tool]!</span>" , \
|
||||
"<span class='warning'> Your hand slips, slicing [target]'s throat wth \the [tool]!</span>" )
|
||||
affected.receive_damage(60)
|
||||
target.AdjustLoseBreath(4)
|
||||
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/face/mend_vocal
|
||||
name = "mend vocal cords"
|
||||
allowed_tools = list(
|
||||
/obj/item/scalpel/laser/manager = 100, \
|
||||
/obj/item/hemostat = 100, \
|
||||
/obj/item/stack/cable_coil = 90, \
|
||||
/obj/item/assembly/mousetrap = 12 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
)
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/face/mend_vocal/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
|
||||
"You start mending [target]'s vocal cords with \the [tool].")
|
||||
..()
|
||||
|
||||
/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("<span class='notice'> [user] mends [target]'s vocal cords with \the [tool].</span>", \
|
||||
"<span class='notice'> You mend [target]'s vocal cords with \the [tool].</span>")
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!</span>")
|
||||
target.AdjustLoseBreath(4)
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/face/fix_face
|
||||
name = "reshape face"
|
||||
allowed_tools = list(
|
||||
/obj/item/scalpel/laser/manager = 100, \
|
||||
/obj/item/retractor = 100, \
|
||||
/obj/item/crowbar = 65, \
|
||||
/obj/item/kitchen/utensil/fork = 90)
|
||||
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/face/fix_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
|
||||
"You start pulling skin on [target]'s face back in place with \the [tool].")
|
||||
..()
|
||||
|
||||
/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("<span class='notice'> [user] pulls skin on [target]'s face back in place with \the [tool].</span>", \
|
||||
"<span class='notice'> You pull skin on [target]'s face back in place with \the [tool].</span>")
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/face/fix_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, tearing skin on [target]'s face with \the [tool]!</span>")
|
||||
target.apply_damage(10, BRUTE, affected, sharp = 1)
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/face/cauterize
|
||||
name = "close incision"
|
||||
allowed_tools = list(
|
||||
/obj/item/scalpel/laser = 100, \
|
||||
/obj/item/cautery = 100, \
|
||||
/obj/item/clothing/mask/cigarette = 90, \
|
||||
/obj/item/lighter = 60, \
|
||||
/obj/item/weldingtool = 30
|
||||
)
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/face/cauterize/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \
|
||||
"You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].")
|
||||
..()
|
||||
|
||||
/datum/surgery_step/face/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'> [user] cauterizes the incision on [target]'s face and neck with \the [tool].</span>", \
|
||||
"<span class='notice'> You cauterize the incision on [target]'s face and neck with \the [tool].</span>")
|
||||
affected.open = 0
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.disfigured = 0
|
||||
h.update_icon()
|
||||
target.regenerate_icons()
|
||||
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/face/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, leaving a small burn on [target]'s face with \the [tool]!</span>")
|
||||
target.apply_damage(4, BURN, affected)
|
||||
|
||||
return 0
|
||||
@@ -272,8 +272,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
burn_dam = 0
|
||||
open = 0 //Closing all wounds.
|
||||
internal_bleeding = FALSE
|
||||
if(istype(src, /obj/item/organ/external/head) && disfigured) //If their head's disfigured, refigure it.
|
||||
disfigured = 0
|
||||
disfigured = FALSE
|
||||
|
||||
// handle internal organs
|
||||
for(var/obj/item/organ/internal/current_organ in internal_organs)
|
||||
@@ -736,19 +735,14 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
qdel(spark_system)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/external/proc/disfigure(var/type = "brute")
|
||||
/obj/item/organ/external/proc/disfigure()
|
||||
if(disfigured)
|
||||
return
|
||||
if(owner)
|
||||
if(type == "brute")
|
||||
owner.visible_message("<span class='warning'>You hear a sickening cracking sound coming from \the [owner]'s [name].</span>", \
|
||||
"<span class='danger'>Your [name] becomes a mangled mess!</span>", \
|
||||
"<span class='warning'>You hear a sickening crack.</span>")
|
||||
else
|
||||
owner.visible_message("<span class='warning'>\The [owner]'s [name] melts away, turning into mangled mess!</span>", \
|
||||
"<span class='danger'>Your [name] melts away!</span>", \
|
||||
"<span class='warning'>You hear a sickening sizzle.</span>")
|
||||
disfigured = 1
|
||||
owner.visible_message("<span class='warning'>You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!</span>", \
|
||||
"<span class='danger'>Your [name] becomes a mangled mess!</span>", \
|
||||
"<span class='warning'>You hear a sickening sound.</span>")
|
||||
disfigured = TRUE
|
||||
|
||||
/obj/item/organ/external/is_primary_organ(var/mob/living/carbon/human/O = null)
|
||||
if(isnull(O))
|
||||
|
||||
@@ -211,11 +211,8 @@
|
||||
/obj/item/organ/external/head/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
|
||||
..(brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists)
|
||||
if(!disfigured)
|
||||
if(brute_dam > 40)
|
||||
if(prob(50))
|
||||
disfigure("brute")
|
||||
if(burn_dam > 40)
|
||||
disfigure("burn")
|
||||
if(brute_dam + burn_dam > 50)
|
||||
disfigure()
|
||||
|
||||
/obj/item/organ/external/head/proc/handle_alt_icon()
|
||||
if(alt_head && alt_heads_list[alt_head])
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/datum/surgery/plastic_surgery
|
||||
name = "Plastic Surgery"
|
||||
steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/generic/cauterize)
|
||||
possible_locs = list("head")
|
||||
|
||||
/datum/surgery/plastic_surgery/can_start(mob/user, mob/living/carbon/target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/head/head = H.get_organ(user.zone_sel.selecting)
|
||||
if(!head)
|
||||
return FALSE
|
||||
if(head.status & ORGAN_ROBOT)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/surgery_step/reshape_face
|
||||
name = "reshape face"
|
||||
allowed_tools = list(/obj/item/scalpel = 100, /obj/item/kitchen/knife = 50, /obj/item/wirecutters = 35)
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/reshape_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to alter [target]'s appearance.", "<span class='notice'>You begin to alter [target]'s appearance...</span>")
|
||||
|
||||
/datum/surgery_step/reshape_face/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/obj/item/organ/external/head/head = target.get_organ(target_zone)
|
||||
var/species_names = target.get_species()
|
||||
if(head.disfigured)
|
||||
head.disfigured = FALSE
|
||||
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
|
||||
else
|
||||
var/list/names = list()
|
||||
if(!isabductor(user))
|
||||
for(var/i in 1 to 10)
|
||||
names += random_name(target.gender, species_names)
|
||||
else
|
||||
for(var/_i in 1 to 9)
|
||||
names += "Subject [target.gender == MALE ? "i" : "o"]-[pick("a", "b", "c", "d", "e")]-[rand(10000, 99999)]"
|
||||
names += random_name(target.gender, species_names) //give one normal name in case they want to do regular plastic surgery
|
||||
var/chosen_name = input(user, "Choose a new name to assign.", "Plastic Surgery") as null|anything in names
|
||||
if(!chosen_name)
|
||||
return
|
||||
var/oldname = target.real_name
|
||||
target.real_name = chosen_name
|
||||
var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name
|
||||
user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname].</span>")
|
||||
target.sec_hud_set_ID()
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/surgery_step/reshape_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/obj/item/organ/external/head/head = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, tearing skin on [target]'s face with [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, tearing skin on [target]'s face with [tool]!</span>")
|
||||
target.apply_damage(10, BRUTE, head, sharp = TRUE)
|
||||
return FALSE
|
||||
@@ -248,10 +248,7 @@
|
||||
user.visible_message("<span class='notice'> [user] finishes patching damage to [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'> You finish patching damage to [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.heal_damage(rand(30,50),0,1,1)
|
||||
if(affected.disfigured)
|
||||
affected.disfigured = 0
|
||||
affected.update_icon()
|
||||
target.regenerate_icons()
|
||||
affected.disfigured = FALSE
|
||||
if("burn")
|
||||
user.visible_message("<span class='notice'> [user] finishes splicing cable into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'> You finishes splicing new cable into [target]'s [affected.name].</span>")
|
||||
|
||||
Reference in New Issue
Block a user