Refactors the examine proc to return a list of strings (#12280)

This commit is contained in:
farie82
2019-09-25 22:05:01 -07:00
committed by variableundefined
parent 40a4cd1b75
commit 0e8ddb2afe
210 changed files with 808 additions and 830 deletions
@@ -32,12 +32,12 @@
return ..()
/obj/item/twohanded/kinetic_crusher/examine(mob/living/user)
..()
to_chat(user, "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>")
to_chat(user, "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>")
. = ..()
. += "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>"
. += "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>"
for(var/t in trophies)
var/obj/item/crusher_trophy/T = t
to_chat(user, "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>")
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
/obj/item/twohanded/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(iscrowbar(I))
@@ -191,8 +191,8 @@
var/denied_type = /obj/item/crusher_trophy
/obj/item/crusher_trophy/examine(mob/living/user)
..()
to_chat(user, "<span class='notice'>Causes [effect_desc()] when attached to a kinetic crusher.</span>")
. = ..()
. += "<span class='notice'>Causes [effect_desc()] when attached to a kinetic crusher.</span>"
/obj/item/crusher_trophy/proc/effect_desc()
return "errors"
@@ -59,11 +59,11 @@
malfunctioning = 1
/obj/item/lazarus_injector/examine(mob/user)
..(user)
. = ..()
if(!loaded)
to_chat(user, "<span class='info'>[src] is empty.</span>")
. += "<span class='info'>[src] is empty.</span>"
if(malfunctioning)
to_chat(user, "<span class='info'>The display on [src] seems to be flickering.</span>")
. += "<span class='info'>The display on [src] seems to be flickering.</span>"
/*********************Mob Capsule*************************/
@@ -35,9 +35,9 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
update_icon()
/obj/item/stack/marker_beacon/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Use in-hand to place a [singular_name].</span>")
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
. = ..()
. += "<span class='notice'>Use in-hand to place a [singular_name].</span>"
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
/obj/item/stack/marker_beacon/update_icon()
icon_state = "[initial(icon_state)][lowertext(picked_color)]"
@@ -92,8 +92,8 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
qdel(src)
/obj/structure/marker_beacon/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
. = ..()
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
/obj/structure/marker_beacon/update_icon()
while(!picked_color || !GLOB.marker_beacon_colors[picked_color])
@@ -27,8 +27,8 @@
/obj/item/survivalcapsule/examine(mob/user)
. = ..()
get_template()
to_chat(user, "This capsule has the [template.name] stored.")
to_chat(user, template.description)
. += "This capsule has the [template.name] stored."
. += template.description
/obj/item/survivalcapsule/attack_self()
// Can't grab when capsule is New() because templates aren't loaded then
+2 -2
View File
@@ -14,8 +14,8 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/max_force_fulton = MOVE_FORCE_STRONG
/obj/item/extraction_pack/examine(mob/user)
..()
to_chat(user, "It has [uses_left] use\s remaining.")
. = ..()
. += "It has [uses_left] use\s remaining."
/obj/item/extraction_pack/attack_self(mob/user)
var/list/possible_beacons = list()
@@ -27,8 +27,8 @@
var/friendly_fire_check = FALSE //if the blasts we make will consider our faction against the faction of hit targets
/obj/item/hierophant_club/examine(mob/user)
..()
to_chat(user, "<span class='hierophant_warning'>The[beacon ? " beacon is not currently":"re is a beacon"] attached.</span>")
. = ..()
. += "<span class='hierophant_warning'>The[beacon ? " beacon is not currently":"re is a beacon"] attached.</span>"
/obj/item/hierophant_club/suicide_act(mob/living/user)
atom_say("Xverwpsgexmrk...")
+2 -2
View File
@@ -275,8 +275,8 @@
..()
/obj/item/card/mining_point_card/examine(mob/user)
..(user)
to_chat(user, "There's [points] points on the card.")
. = ..()
. += "There's [points] points on the card."
/**********************Conscription Kit**********************/