Alternative grille sprite update (#32630)

* Update grille sprite

* Add damaged grille sprite

* Add 4 varients to the damaged grille
This commit is contained in:
Matt Smith
2017-11-15 05:55:12 +00:00
committed by CitadelStationBot
parent 809951c56c
commit c4789d497a
2 changed files with 18 additions and 0 deletions
+18
View File
@@ -21,6 +21,24 @@
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
update_icon()
/obj/structure/grille/update_icon()
if(QDELETED(src))
return
var/ratio = obj_integrity / max_integrity
ratio = Ceiling(ratio*4) * 25
if(smooth)
queue_smooth(src)
if(ratio > 50)
return
icon_state = "grille50_[rand(0,3)]"
/obj/structure/grille/examine(mob/user)
..()
if(anchored)