Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:50 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions
+9 -9
View File
@@ -25,27 +25,27 @@
var/fulltile = FALSE // Set to true on full-tile variants.
/obj/structure/window/examine(mob/user)
. = ..(user)
. = ..()
if(health == maxhealth)
to_chat(user, "<span class='notice'>It looks fully intact.</span>")
. += "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
to_chat(user, "<span class='notice'>It has a few cracks.</span>")
. += "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
to_chat(user, "<span class='warning'>It looks slightly damaged.</span>")
. += "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
to_chat(user, "<span class='warning'>It looks moderately damaged.</span>")
. += "<span class='warning'>It looks moderately damaged.</span>"
else
to_chat(user, "<span class='danger'>It looks heavily damaged.</span>")
. += "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
to_chat(user, "<span class='notice'>It has a thin layer of silicate.</span>")
. += "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
to_chat(user, "<span class='notice'>It is covered in silicate.</span>")
. += "<span class='notice'>It is covered in silicate.</span>"
else
to_chat(user, "<span class='notice'>There is a thick layer of silicate covering it.</span>")
. += "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health