mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
TG: Changed the way facial scarring works. Instead of setting your real_name to
"Unknown" it uses the disfigured variable of a human's head organ to dictate the human's name variable. This means real_name is now somewhat back to being a reliable source of the mob's actual name. It should eliminate a lot of the "cloning as unknown" bugs. It also means I could simplify that god-awful name updating stuff into a nice and simple helper proc. Some original_name stuff was added here and there, mainly during cloning. A lot of the "getting random ghost names" should be fixed now. Still loads to do though, particularly with transforms and such. >_> Fixed a runtime with Tajarans trying to use a variable that doesn't exist for PDAs. Removed that variable from IDs as it's only used by furries. Revision: r3546 Author: elly1...@rocketmail.com
This commit is contained in:
@@ -744,9 +744,7 @@ datum
|
||||
affecting.take_damage(25, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
M.warn_flavor_changed()
|
||||
M:disfigure_face()
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
|
||||
else
|
||||
@@ -798,10 +796,7 @@ datum
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
M.warn_flavor_changed()
|
||||
affecting.disfigured = 1
|
||||
M:disfigure_face()
|
||||
else
|
||||
if(istype(M, /mob/living/carbon/monkey) && M:wear_mask)
|
||||
del (M:wear_mask)
|
||||
@@ -819,10 +814,7 @@ datum
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
M.warn_flavor_changed()
|
||||
affecting.disfigured = 1
|
||||
M:disfigure_face()
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 4))
|
||||
|
||||
|
||||
@@ -102,8 +102,11 @@
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
if(mutations & HUSK)
|
||||
return
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(head)
|
||||
head.disfigured = 1
|
||||
name = get_visible_name()
|
||||
mutations |= HUSK
|
||||
real_name = "Unknown"
|
||||
update_body()
|
||||
return
|
||||
|
||||
|
||||
@@ -1189,37 +1189,8 @@
|
||||
overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
belt.screen_loc = ui_belt
|
||||
|
||||
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered_name)
|
||||
name = id.registered_name
|
||||
else
|
||||
name = "Unknown"
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (pda.owner)
|
||||
name = pda.owner
|
||||
else
|
||||
name = "Unknown"
|
||||
else
|
||||
name = "Unknown"
|
||||
else
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered_name != real_name)
|
||||
name = "[real_name] (as [id.registered_name])"
|
||||
|
||||
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (pda.owner)
|
||||
if (pda.owner != real_name)
|
||||
name = "[real_name] (as [pda.owner])"
|
||||
else
|
||||
name = real_name
|
||||
name = get_visible_name()
|
||||
|
||||
if (wear_id)
|
||||
wear_id.screen_loc = ui_id
|
||||
@@ -2364,18 +2335,33 @@ It can still be worn/put on as normal.
|
||||
return if_no_id
|
||||
return
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/proc/get_visible_name()
|
||||
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see their face
|
||||
return get_id_name("Unknown")
|
||||
else
|
||||
var/face_name = get_face_name()
|
||||
var/id_name = get_id_name("")
|
||||
if(id_name && (id_name != face_name))
|
||||
return "[face_name] as ([id_name])"
|
||||
return face_name
|
||||
|
||||
//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/datum/organ/external/head/head = get_organ("head")
|
||||
if(!head || head.disfigured) //no face!
|
||||
return "Unknown"
|
||||
else
|
||||
return "[real_name]"
|
||||
|
||||
//gets name from ID or PDA itself, ID inside PDA doesn't matter
|
||||
//Useful when player is being seen by other mobs
|
||||
/mob/living/carbon/human/proc/get_visible_name(var/if_no_id = "Unknown")
|
||||
/mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (istype(pda))
|
||||
. = pda.owner
|
||||
else if (istype(id))
|
||||
. = id.registered_name
|
||||
else
|
||||
return if_no_id
|
||||
return
|
||||
if(istype(pda)) return pda.owner
|
||||
if(istype(id)) return id.registered_name
|
||||
return if_no_id
|
||||
|
||||
//gets ID card object from special clothes slot or null.
|
||||
/mob/living/carbon/human/proc/get_idcard()
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
//Instead of setting real_name = "Unknown", use this when necessary.
|
||||
//It will prevent the cloned-as-unknown bug and various other derpy things.
|
||||
/mob/living/carbon/human/proc/disfigure_face()
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(head && !head.disfigured)
|
||||
head.disfigured = 1
|
||||
name = get_visible_name()
|
||||
src << "\red Your face has become disfigured."
|
||||
warn_flavor_changed()
|
||||
|
||||
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
|
||||
var/datum/organ/external/E = get_organ(zone)
|
||||
if(istype(E, /datum/organ/external))
|
||||
|
||||
@@ -1021,15 +1021,14 @@
|
||||
if (stuttering) stuttering--
|
||||
if (slurring) slurring--
|
||||
|
||||
//Carn: marker 4#
|
||||
var/datum/organ/external/head/head = organs["head"]
|
||||
if(head && !head.disfigured)
|
||||
if(head.brute_dam >= 45 || head.burn_dam >= 45)
|
||||
head.disfigured = 1
|
||||
emote("scream")
|
||||
real_name = "Unknown"
|
||||
src << "\red Your face has become disfigured."
|
||||
disfigure_face()
|
||||
face_op_stage = 0.0
|
||||
warn_flavor_changed()
|
||||
|
||||
var/blood_max = 0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/temp = organs[name]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && src.name != src.real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
// Mute disability
|
||||
if (src.disabilities & 64)
|
||||
return
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && name != real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
Reference in New Issue
Block a user