[MIRROR] Adds SHOULD_CALL_PARENT to examine (#9775)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-03 12:53:58 -07:00
committed by GitHub
parent a3ac1d26d7
commit 6e330e2acf
12 changed files with 74 additions and 67 deletions

View File

@@ -224,6 +224,7 @@
//All atoms
/atom/proc/examine(mob/user, var/infix = "", var/suffix = "")
SHOULD_CALL_PARENT(TRUE)
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src][infix]."
if(src.blood_DNA && !istype(src, /obj/effect/decal))

View File

@@ -36,7 +36,8 @@
IC.emp_act(severity)
/obj/item/implant/integrated_circuit/examine(mob/user)
return IC.examine(user)
. = ..()
. += IC.examine(user)
/obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.has_tool_quality(TOOL_CROWBAR) || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.has_tool_quality(TOOL_SCREWDRIVER) || istype(O, /obj/item/cell/device) )

View File

@@ -127,6 +127,7 @@
flags |= NOBLUDGEON
/obj/item/ducttape/examine(mob/user)
SHOULD_CALL_PARENT(FALSE)
return stuck.examine(user)
/obj/item/ducttape/proc/attach(var/obj/item/W)

View File

@@ -51,8 +51,8 @@
plane = MOB_PLANE
var/sourcepillow = "/obj/item/bedsheet/pillow"
/obj/structure/bed/pillowpile/New()
..()
/obj/structure/bed/pillowpile/Initialize()
. = ..()
var/turf/T = get_turf(src)
new pillowpilefront(T)

View File

@@ -23,18 +23,18 @@
var/applies_material_colour = 1
var/flippable = TRUE
/obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
/obj/structure/bed/Initialize(var/newloc, var/new_material, var/new_padding_material)
..(newloc)
color = null
if(!new_material)
new_material = MAT_STEEL
material = get_material_by_name(new_material)
if(!istype(material))
qdel(src)
return
return INITIALIZE_HINT_QDEL
if(new_padding_material)
padding_material = get_material_by_name(new_padding_material)
update_icon()
return INITIALIZE_HINT_NORMAL
/obj/structure/bed/get_material()
return material
@@ -203,19 +203,19 @@
icon_state = "psychbed"
base_icon = "psychbed"
/obj/structure/bed/psych/New(var/newloc)
..(newloc,MAT_WOOD,MAT_LEATHER)
/obj/structure/bed/psych/Initialize(var/newloc)
. = ..(newloc,MAT_WOOD,MAT_LEATHER)
/obj/structure/bed/padded/New(var/newloc)
..(newloc,MAT_PLASTIC,MAT_COTTON)
/obj/structure/bed/padded/Initialize(var/newloc)
. = ..(newloc,MAT_PLASTIC,MAT_COTTON)
/obj/structure/bed/double
name = "double bed"
icon_state = "doublebed"
base_icon = "doublebed"
/obj/structure/bed/double/padded/New(var/newloc)
..(newloc,MAT_WOOD,MAT_COTTON)
/obj/structure/bed/double/padded/Initialize(var/newloc)
. = ..(newloc,MAT_WOOD,MAT_COTTON)
/obj/structure/bed/double/post_buckle_mob(mob/living/M as mob)
if(M.buckled == src)
@@ -309,8 +309,8 @@
icon_state = "rollerbed"
var/obj/item/roller/held
/obj/item/roller_holder/New()
..()
/obj/item/roller_holder/Initialize()
. = ..()
held = new /obj/item/roller(src)
/obj/item/roller_holder/attack_self(mob/user as mob)

View File

@@ -9,8 +9,8 @@
buckle_lying = 0 //force people to sit up in chairs when buckled
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/bed/chair/New(var/newloc, var/new_material, var/new_padding_material)
..()
/obj/structure/bed/chair/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..()
update_layer()
/obj/structure/bed/chair/attackby(obj/item/W as obj, mob/user as mob)
@@ -127,38 +127,38 @@
I.color = padding_material.icon_colour
add_overlay(I)
/obj/structure/bed/chair/comfy/brown/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_LEATHER)
/obj/structure/bed/chair/comfy/brown/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_LEATHER)
/obj/structure/bed/chair/comfy/red/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CARPET)
/obj/structure/bed/chair/comfy/red/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CARPET)
/obj/structure/bed/chair/comfy/teal/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_TEAL)
/obj/structure/bed/chair/comfy/teal/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_TEAL)
/obj/structure/bed/chair/comfy/black/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BLACK)
/obj/structure/bed/chair/comfy/black/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BLACK)
/obj/structure/bed/chair/comfy/green/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_GREEN)
/obj/structure/bed/chair/comfy/green/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_GREEN)
/obj/structure/bed/chair/comfy/purp/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_PURPLE)
/obj/structure/bed/chair/comfy/purp/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_PURPLE)
/obj/structure/bed/chair/comfy/blue/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BLUE)
/obj/structure/bed/chair/comfy/blue/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BLUE)
/obj/structure/bed/chair/comfy/beige/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BEIGE)
/obj/structure/bed/chair/comfy/beige/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BEIGE)
/obj/structure/bed/chair/comfy/lime/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_LIME)
/obj/structure/bed/chair/comfy/lime/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_LIME)
/obj/structure/bed/chair/comfy/yellow/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_YELLOW)
/obj/structure/bed/chair/comfy/yellow/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_YELLOW)
/obj/structure/bed/chair/comfy/orange/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_ORANGE)
/obj/structure/bed/chair/comfy/orange/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_ORANGE)
/obj/structure/bed/chair/comfy/rounded
name = "rounded chair"
@@ -166,38 +166,38 @@
icon_state = "roundedchair"
base_icon = "roundedchair"
/obj/structure/bed/chair/comfy/rounded/brown/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_LEATHER)
/obj/structure/bed/chair/comfy/rounded/brown/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_LEATHER)
/obj/structure/bed/chair/comfy/rounded/red/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CARPET)
/obj/structure/bed/chair/comfy/rounded/red/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CARPET)
/obj/structure/bed/chair/comfy/rounded/teal/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_TEAL)
/obj/structure/bed/chair/comfy/rounded/teal/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_TEAL)
/obj/structure/bed/chair/comfy/rounded/black/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BLACK)
/obj/structure/bed/chair/comfy/rounded/black/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BLACK)
/obj/structure/bed/chair/comfy/rounded/green/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_GREEN)
/obj/structure/bed/chair/comfy/rounded/green/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_GREEN)
/obj/structure/bed/chair/comfy/rounded/purple/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_PURPLE)
/obj/structure/bed/chair/comfy/rounded/purple/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_PURPLE)
/obj/structure/bed/chair/comfy/rounded/blue/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BLUE)
/obj/structure/bed/chair/comfy/rounded/blue/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BLUE)
/obj/structure/bed/chair/comfy/rounded/beige/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_BEIGE)
/obj/structure/bed/chair/comfy/rounded/beige/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_BEIGE)
/obj/structure/bed/chair/comfy/rounded/lime/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_LIME)
/obj/structure/bed/chair/comfy/rounded/lime/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_LIME)
/obj/structure/bed/chair/comfy/rounded/yellow/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_YELLOW)
/obj/structure/bed/chair/comfy/rounded/yellow/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_YELLOW)
/obj/structure/bed/chair/comfy/rounded/orange/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc, MAT_STEEL, MAT_CLOTH_ORANGE)
/obj/structure/bed/chair/comfy/rounded/orange/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..(newloc, MAT_STEEL, MAT_CLOTH_ORANGE)
/obj/structure/bed/chair/office
anchored = FALSE
@@ -277,8 +277,8 @@
return
..()
/obj/structure/bed/chair/wood/New(var/newloc)
..(newloc, MAT_WOOD)
/obj/structure/bed/chair/wood/Initialize(var/newloc)
. = ..(newloc, MAT_WOOD)
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"
@@ -364,8 +364,8 @@
color = null
var/padding_color = "#CC0000"
/obj/structure/bed/chair/sofa/bench/New(var/newloc, var/new_material, var/new_padding_material)
..()
/obj/structure/bed/chair/sofa/bench/Initialize(var/newloc, var/new_material, var/new_padding_material)
. = ..()
var/mutable_appearance/MA
// If we're north-facing, metal goes above mob, padding overlay goes below mob.
if((dir & NORTH) && !corner_piece)

View File

@@ -13,7 +13,7 @@
var/min_mob_buckle_size = MOB_SMALL
var/max_mob_buckle_size = MOB_LARGE
/obj/structure/bed/chair/wheelchair/New(var/newloc, var/new_material, var/new_padding_material)
/obj/structure/bed/chair/wheelchair/Initialize(var/newloc, var/new_material, var/new_padding_material)
..()
update_icon()

View File

@@ -260,8 +260,8 @@ GLOBAL_LIST_EMPTY(unique_deployable)
icon = 'icons/obj/survival_pod.dmi'
icon_state = "bed"
/obj/structure/bed/pod/New(var/newloc)
..(newloc,MAT_STEEL,"cotton")
/obj/structure/bed/pod/Initialize(var/newloc)
. = ..(newloc, MAT_STEEL, MAT_COTTON)
//Survival Storage Unit
/obj/machinery/smartfridge/survival_pod

View File

@@ -1,4 +1,5 @@
/mob/living/carbon/human/examine(mob/user)
SHOULD_CALL_PARENT(FALSE)
// . = ..() //Note that we don't call parent. We build the list by ourselves.
var/skip_gear = 0

View File

@@ -42,6 +42,7 @@
// Because we can't perfectly duplicate some examine() output, we directly examine the AM it is copying. It's messy but
// this is to prevent easy checks from the opposing force.
/mob/living/simple_mob/illusion/examine(mob/user)
SHOULD_CALL_PARENT(FALSE)
if(copying)
return copying.examine(user)
else

View File

@@ -54,6 +54,7 @@ var/global/photo_count = 0
/obj/item/photo/examine(mob/user)
//This is one time we're not going to call parent, because photos are 'secret' unless you're close enough.
SHOULD_CALL_PARENT(FALSE)
if(in_range(user, src))
show(user)
return list(desc)

View File

@@ -11,6 +11,7 @@
pixel_y = 0 // Override value from parent.
/obj/item/holder/examine(mob/user)
SHOULD_CALL_PARENT(FALSE)
. = list()
for(var/mob/living/M in contents)
. += M.examine(user)