Examine Code Refactor

This commit is contained in:
Dip
2020-10-06 23:36:21 -03:00
parent c433514622
commit aa7d47a23b
334 changed files with 1337 additions and 1365 deletions

View File

@@ -40,7 +40,7 @@
return ..()
/obj/item/twohanded/kinetic_crusher/examine(mob/living/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>"
. += "<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)
@@ -201,8 +201,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"

View File

@@ -59,8 +59,8 @@
malfunctioning = 1
/obj/item/lazarus_injector/examine(mob/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>"

View File

@@ -36,9 +36,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)]"
@@ -93,8 +93,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])

View File

@@ -33,8 +33,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

View File

@@ -15,7 +15,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
/obj/item/extraction_pack/examine()
. = ..()
usr.show_message("It has [uses_left] use\s remaining.", 1)
. += "It has [uses_left] use\s remaining."
/obj/item/extraction_pack/attack_self(mob/user)
var/list/possible_beacons = list()

View File

@@ -664,10 +664,10 @@
total_mass_on = 5
/obj/item/melee/transforming/cleaving_saw/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It is [active ? "open, and will cleave enemies in a wide arc":"closed, and can be used for rapid consecutive attacks that cause beastly enemies to bleed"].<br>\
. = ..()
. += "<span class='notice'>It is [active ? "open, and will cleave enemies in a wide arc":"closed, and can be used for rapid consecutive attacks that cause beastly enemies to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>")
Transforming it immediately after an attack causes the next attack to come out faster.</span>"
/obj/item/melee/transforming/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -1103,8 +1103,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)
say("Xverwpsgexmrk...", forced = "hierophant club suicide")

View File

@@ -181,8 +181,8 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
flick("silo_active", src)
/obj/machinery/ore_silo/examine(mob/user)
..()
to_chat(user, "<span class='notice'>[src] can be linked to techfabs, circuit printers and protolathes with a multitool.</span>")
. = ..()
. += "<span class='notice'>[src] can be linked to techfabs, circuit printers and protolathes with a multitool.</span>"
/datum/ore_silo_log
var/name // for VV

View File

@@ -296,8 +296,8 @@
..()
/obj/item/card/mining_point_card/examine(mob/user)
..()
to_chat(user, "There's [points] point\s on the card.")
. = ..()
. += "There's [points] point\s on the card."
///Conscript kit
/obj/item/card/mining_access_card

View File

@@ -68,22 +68,22 @@
check_friendly_fire = 0
/mob/living/simple_animal/hostile/mining_drone/examine(mob/user)
..()
. = ..()
var/t_He = p_they(TRUE)
var/t_him = p_them()
var/t_s = p_s()
if(health < maxHealth)
if(health >= maxHealth * 0.5)
to_chat(user, "<span class='warning'>[t_He] look[t_s] slightly dented.</span>")
. += "<span class='warning'>[t_He] look[t_s] slightly dented.</span>"
else
to_chat(user, "<span class='boldwarning'>[t_He] look[t_s] severely dented!</span>")
to_chat(user, "<span class='notice'>Using a mining scanner on [t_him] will instruct [t_him] to drop stored ore. <b>[max(0, LAZYLEN(contents) - 1)] Stored Ore</b>\n\
Field repairs can be done with a welder.")
. += "<span class='boldwarning'>[t_He] look[t_s] severely dented!</span>"
. += "<span class='notice'>Using a mining scanner on [t_him] will instruct [t_him] to drop stored ore. <b>[max(0, LAZYLEN(contents) - 1)] Stored Ore</b>\n\
Field repairs can be done with a welder."
if(stored_gun && stored_gun.max_mod_capacity)
to_chat(user, "<b>[stored_gun.get_remaining_mod_capacity()]%</b> mod capacity remaining.")
. += "<b>[stored_gun.get_remaining_mod_capacity()]%</b> mod capacity remaining."
for(var/A in stored_gun.get_modkits())
var/obj/item/borg/upgrade/modkit/M = A
to_chat(user, "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>")
. += "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>"
/mob/living/simple_animal/hostile/mining_drone/welder_act(mob/living/user, obj/item/I)
. = TRUE

View File

@@ -348,9 +348,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
pixel_y = rand(0,8)-8
/obj/item/coin/examine(mob/user)
..()
. = ..()
if(value)
to_chat(user, "<span class='info'>It's worth [value] credit\s.</span>")
. += "<span class='info'>It's worth [value] credit\s.</span>"
/obj/item/coin/gold
name = "gold coin"

View File

@@ -29,7 +29,7 @@
/obj/structure/ore_box/examine(mob/living/user)
if(Adjacent(user) && istype(user))
show_contents(user)
. = ..()
return ..()
/obj/structure/ore_box/attack_hand(mob/user)
. = ..()