mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Adds Plastic Surgery; Fixes Disfigurement
This commit is contained in:
@@ -39,8 +39,7 @@
|
||||
#define IGNORESLOWDOWN 256
|
||||
#define GODMODE 4096
|
||||
#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath
|
||||
#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
|
||||
#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
#define XENO_HOST 16384 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
|
||||
|
||||
//Grab levels
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -115,7 +115,13 @@
|
||||
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)
|
||||
head.disfigured = FALSE
|
||||
head.update_icon()
|
||||
H.regenerate_icons()
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/rezadone
|
||||
@@ -131,7 +137,13 @@
|
||||
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)
|
||||
head.disfigured = FALSE
|
||||
head.update_icon()
|
||||
H.regenerate_icons()
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity)
|
||||
|
||||
@@ -611,11 +611,15 @@
|
||||
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)
|
||||
if(!affecting.disfigured)
|
||||
affecting.disfigured = TRUE
|
||||
affecting.update_icon()
|
||||
H.regenerate_icons()
|
||||
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)))
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,60 @@
|
||||
/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
|
||||
head.update_icon()
|
||||
target.regenerate_icons()
|
||||
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, they are now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, they are now [newname].</span>")
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.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
|
||||
+1
-1
@@ -2155,7 +2155,6 @@
|
||||
#include "code\modules\surgery\cavity_implant.dm"
|
||||
#include "code\modules\surgery\dental_implant.dm"
|
||||
#include "code\modules\surgery\encased.dm"
|
||||
#include "code\modules\surgery\face.dm"
|
||||
#include "code\modules\surgery\generic.dm"
|
||||
#include "code\modules\surgery\helpers.dm"
|
||||
#include "code\modules\surgery\implant_removal.dm"
|
||||
@@ -2163,6 +2162,7 @@
|
||||
#include "code\modules\surgery\limb_reattach.dm"
|
||||
#include "code\modules\surgery\organs_internal.dm"
|
||||
#include "code\modules\surgery\other.dm"
|
||||
#include "code\modules\surgery\plastic_surgery.dm"
|
||||
#include "code\modules\surgery\remove_embedded_object.dm"
|
||||
#include "code\modules\surgery\rig_removal.dm"
|
||||
#include "code\modules\surgery\robotics.dm"
|
||||
|
||||
Reference in New Issue
Block a user