Syringe update_icon sanity
This commit is contained in:
committed by
CitadelStationBot
parent
0c86312618
commit
e4a96fe2cd
@@ -156,7 +156,7 @@
|
||||
/obj/item/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents.total_volume)
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
|
||||
Reference in New Issue
Block a user