Merge pull request #9867 from Ghommie/Ghommie-cit375
Ports "examine-code refactor"
This commit is contained in:
@@ -120,9 +120,9 @@
|
||||
user.vv_edit_var(variable, user_vars_to_edit[variable])
|
||||
|
||||
/obj/item/clothing/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(damaged_clothes)
|
||||
to_chat(user, "<span class='warning'>It looks damaged!</span>")
|
||||
. += "<span class='warning'>It looks damaged!</span>"
|
||||
var/datum/component/storage/pockets = GetComponent(/datum/component/storage)
|
||||
if(pockets)
|
||||
var/list/how_cool_are_your_threads = list("<span class='notice'>")
|
||||
@@ -137,7 +137,7 @@
|
||||
if(pockets.silent)
|
||||
how_cool_are_your_threads += "Adding or removing items from [src] makes no noise.\n"
|
||||
how_cool_are_your_threads += "</span>"
|
||||
to_chat(user, how_cool_are_your_threads.Join())
|
||||
. += how_cool_are_your_threads.Join()
|
||||
|
||||
/obj/item/clothing/obj_break(damage_flag)
|
||||
if(!damaged_clothes)
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/clothing/glasses/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(glass_colour_type && ishuman(user))
|
||||
to_chat(user, "<span class='notice'>Alt-click to toggle its colors.</span>")
|
||||
. += "<span class='notice'>Alt-click to toggle its colors.</span>"
|
||||
|
||||
/obj/item/clothing/glasses/visor_toggling()
|
||||
..()
|
||||
@@ -362,7 +362,7 @@
|
||||
desc = replacetext(desc, "person", "man")
|
||||
else if(user.gender == FEMALE)
|
||||
desc = replacetext(desc, "person", "woman")
|
||||
..()
|
||||
. = ..()
|
||||
desc = desk
|
||||
|
||||
/obj/item/clothing/glasses/thermal/eyepatch
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
new /obj/item/reagent_containers/food/drinks/flask/det(src)
|
||||
|
||||
/obj/item/clothing/head/fedora/det_hat/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to take a candy corn.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to take a candy corn.</span>"
|
||||
|
||||
/obj/item/clothing/head/fedora/det_hat/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
usr.update_inv_head() //so our mob-overlays update
|
||||
|
||||
/obj/item/clothing/head/soft/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click the cap to flip it [flipped ? "forwards" : "backwards"].</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click the cap to flip it [flipped ? "forwards" : "backwards"].</span>"
|
||||
|
||||
/obj/item/clothing/head/soft/red
|
||||
name = "red cap"
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
adjustmask(user)
|
||||
|
||||
/obj/item/clothing/mask/breath/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to adjust it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click [src] to adjust it.</span>"
|
||||
|
||||
/obj/item/clothing/mask/breath/medical
|
||||
desc = "A close-fitting sterile mask that can be connected to an air supply."
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
to_chat(user, "<span class='notice'>You cannot retrieve any bananium from the prototype shoes.</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>The shoes are [on ? "enabled" : "disabled"].</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>The shoes are [on ? "enabled" : "disabled"].</span>"
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user)
|
||||
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
return clothing_flags & NOSLIP
|
||||
|
||||
/obj/item/clothing/shoes/magboots/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Its mag-pulse traction system appears to be [magpulse ? "enabled" : "disabled"].")
|
||||
. = ..()
|
||||
. += "Its mag-pulse traction system appears to be [magpulse ? "enabled" : "disabled"]."
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/magboots/advance
|
||||
|
||||
@@ -799,10 +799,10 @@
|
||||
to_chat(targ, "[icon2html(src, targ)]<span class='[span]'>|[message]</span>")
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/flightsuit/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='boldnotice'>SUIT: [locked ? "LOCKED" : "UNLOCKED"]</span>")
|
||||
to_chat(user, "<span class='boldnotice'>FLIGHTPACK: [deployedpack ? "ENGAGED" : "DISENGAGED"] FLIGHTSHOES : [deployedshoes ? "ENGAGED" : "DISENGAGED"] HELMET : [suittoggled ? "ENGAGED" : "DISENGAGED"]</span>")
|
||||
to_chat(user, "<span class='boldnotice'>Its maintainence panel is [maint_panel ? "OPEN" : "CLOSED"]</span>")
|
||||
. = ..()
|
||||
. += "<span class='boldnotice'>SUIT: [locked ? "LOCKED" : "UNLOCKED"]</span>"
|
||||
. += "<span class='boldnotice'>FLIGHTPACK: [deployedpack ? "ENGAGED" : "DISENGAGED"] FLIGHTSHOES : [deployedshoes ? "ENGAGED" : "DISENGAGED"] HELMET : [suittoggled ? "ENGAGED" : "DISENGAGED"]</span>"
|
||||
. += "<span class='boldnotice'>Its maintainence panel is [maint_panel ? "OPEN" : "CLOSED"]</span>"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/flightsuit/Destroy()
|
||||
dropped()
|
||||
|
||||
@@ -988,5 +988,5 @@
|
||||
update_light()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
mutantrace_variation = NO_MUTANTRACE_VARIATION
|
||||
|
||||
/obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>There [extinguishes_left == 1 ? "is" : "are"] [extinguishes_left] extinguisher charge\s left in this suit.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>There [extinguishes_left == 1 ? "is" : "are"] [extinguishes_left] extinguisher charge\s left in this suit.</span>"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/eva/plasmaman/proc/Extinguish(mob/living/carbon/human/H)
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/suit/toggle/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Alt-click on [src] to toggle the [togglename].")
|
||||
. = ..()
|
||||
. += "Alt-click on [src] to toggle the [togglename]."
|
||||
|
||||
//Hardsuit toggle code
|
||||
/obj/item/clothing/suit/space/hardsuit/Initialize()
|
||||
|
||||
@@ -137,23 +137,23 @@
|
||||
|
||||
|
||||
/obj/item/clothing/under/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(can_adjust)
|
||||
if(adjusted == ALT_STYLE)
|
||||
to_chat(user, "Alt-click on [src] to wear it normally.")
|
||||
. += "Alt-click on [src] to wear it normally."
|
||||
else
|
||||
to_chat(user, "Alt-click on [src] to wear it casually.")
|
||||
. += "Alt-click on [src] to wear it casually."
|
||||
if (has_sensor == BROKEN_SENSORS)
|
||||
to_chat(user, "Its sensors appear to be shorted out.")
|
||||
. += "Its sensors appear to be shorted out."
|
||||
else if(has_sensor > NO_SENSORS)
|
||||
switch(sensor_mode)
|
||||
if(SENSOR_OFF)
|
||||
to_chat(user, "Its sensors appear to be disabled.")
|
||||
. += "Its sensors appear to be disabled."
|
||||
if(SENSOR_LIVING)
|
||||
to_chat(user, "Its binary life sensors appear to be enabled.")
|
||||
. += "Its binary life sensors appear to be enabled."
|
||||
if(SENSOR_VITALS)
|
||||
to_chat(user, "Its vital tracker appears to be enabled.")
|
||||
. += "Its vital tracker appears to be enabled."
|
||||
if(SENSOR_COORDS)
|
||||
to_chat(user, "Its vital tracker and tracking beacon appear to be enabled.")
|
||||
. += "Its vital tracker and tracking beacon appear to be enabled."
|
||||
if(attached_accessory)
|
||||
to_chat(user, "\A [attached_accessory] is attached to it.")
|
||||
. += "\A [attached_accessory] is attached to it."
|
||||
@@ -73,10 +73,10 @@
|
||||
to_chat(user, "[src] will be worn [above_suit ? "above" : "below"] your suit.")
|
||||
|
||||
/obj/item/clothing/accessory/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>\The [src] can be attached to a uniform. Alt-click to remove it once attached.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>\The [src] can be attached to a uniform. Alt-click to remove it once attached.</span>"
|
||||
if(initial(above_suit))
|
||||
to_chat(user, "<span class='notice'>\The [src] can be worn above or below your suit. Alt-click to toggle.</span>")
|
||||
. += "<span class='notice'>\The [src] can be worn above or below your suit. Alt-click to toggle.</span>"
|
||||
|
||||
/obj/item/clothing/accessory/waistcoat
|
||||
name = "waistcoat"
|
||||
|
||||
@@ -607,8 +607,9 @@
|
||||
var/extinguishes_left = 5
|
||||
|
||||
/obj/item/clothing/under/plasmaman/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>There are [extinguishes_left] extinguisher charges left in this suit.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>There are [extinguishes_left] extinguisher charges left in this suit.</span>"
|
||||
|
||||
/obj/item/clothing/under/plasmaman/proc/Extinguish(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user