mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Better way of handling icon_state code
This commit is contained in:
@@ -31,11 +31,7 @@
|
||||
|
||||
/obj/item/flag/update_icon()
|
||||
overlays.Cut()
|
||||
if(istype(src, /obj/item/flag/chameleon))
|
||||
var/obj/item/flag/chameleon/C = src
|
||||
icon_state = C.updated_icon_state
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
updateFlagIcon()
|
||||
item_state = icon_state
|
||||
if(rolled)
|
||||
icon_state = "[icon_state]_rolled"
|
||||
@@ -50,6 +46,9 @@
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
/obj/item/flag/proc/updateFlagIcon()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/flag/nt
|
||||
name = "Nanotrasen flag"
|
||||
desc = "A flag proudly boasting the logo of NT."
|
||||
@@ -240,3 +239,6 @@
|
||||
/obj/item/flag/chameleon/burn()
|
||||
explosion(loc,1,2,4,4, flame_range = 4)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/flag/chameleon/updateFlagIcon()
|
||||
icon_state = updated_icon_state
|
||||
|
||||
Reference in New Issue
Block a user