mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Tidies up collar code.
This commit is contained in:
@@ -1277,17 +1277,15 @@ var/global/list/damage_icon_parts = list()
|
||||
if(wear_suit.icon_override)
|
||||
var/icon_path = "[wear_suit.icon_override]"
|
||||
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty).
|
||||
var/icon/icon_file
|
||||
if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime.
|
||||
icon_file = new(icon_path)
|
||||
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
|
||||
var/icon/icon_file = new(icon_path)
|
||||
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
|
||||
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
|
||||
var/icon_path = "[wear_suit.sprite_sheets[species.name]]"
|
||||
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty).
|
||||
var/icon/icon_file
|
||||
if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime.
|
||||
icon_file = new(icon_path)
|
||||
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
|
||||
var/icon/icon_file = new(icon_path)
|
||||
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
|
||||
else
|
||||
if(wear_suit.icon_state in C.IconStates())
|
||||
standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
Reference in New Issue
Block a user