mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
Adds on-sprite belt icons
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "flash"
|
||||
desc = "Used for blinding and being an asshole."
|
||||
icon_state = "flash"
|
||||
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
|
||||
item_state = "flash"
|
||||
throwforce = 5
|
||||
w_class = 2.0
|
||||
throw_speed = 4
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
|
||||
|
||||
/obj/item/weapon/storage/update_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_belt()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility
|
||||
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
desc = "Can hold various tools."
|
||||
@@ -79,7 +86,7 @@
|
||||
name = "security belt"
|
||||
desc = "Can hold security gear like handcuffs and flashes."
|
||||
icon_state = "securitybelt"
|
||||
item_state = "security"//Could likely use a better one.
|
||||
item_state = "security"
|
||||
storage_slots = 7
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 21
|
||||
|
||||
@@ -721,13 +721,22 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
belt.screen_loc = ui_belt //TODO
|
||||
var/t_state = belt.item_state
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
var/image/standing = image("icon_state" = "[t_state]")
|
||||
|
||||
if(belt.icon_override)
|
||||
overlays_standing[BELT_LAYER] = image("icon" = belt.icon_override, "icon_state" = "[t_state]")
|
||||
standing.icon = belt.icon_override
|
||||
else if(belt.sprite_sheets && belt.sprite_sheets[species.name])
|
||||
overlays_standing[BELT_LAYER] = image("icon" = belt.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
standing.icon = belt.sprite_sheets[species.name]
|
||||
else
|
||||
overlays_standing[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]")
|
||||
standing.icon = 'icons/mob/belt.dmi'
|
||||
|
||||
if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt))
|
||||
for(var/obj/item/i in belt.contents)
|
||||
var/i_state = i.item_state
|
||||
if(!i_state) i_state = i.icon_state
|
||||
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
|
||||
|
||||
overlays_standing[BELT_LAYER] = standing
|
||||
else
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Reference in New Issue
Block a user