Alternative grille sprite update (#32630)
* Update grille sprite * Add damaged grille sprite * Add 4 varients to the damaged grille
This commit is contained in:
committed by
CitadelStationBot
parent
809951c56c
commit
c4789d497a
@@ -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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 149 KiB |
Reference in New Issue
Block a user