mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Roll-down-jumpsuit now works properly with custom items, icon_override and (hopefully) species variants.
This commit is contained in:
@@ -49,18 +49,22 @@
|
||||
item.icon = CUSTOM_ITEM_OBJ
|
||||
item.icon_state = item_icon
|
||||
return
|
||||
else
|
||||
else
|
||||
if(inherit_inhands)
|
||||
apply_inherit_inhands(item)
|
||||
else
|
||||
item.item_state_slots = null
|
||||
item.item_icons = null
|
||||
|
||||
|
||||
item.icon = CUSTOM_ITEM_OBJ
|
||||
item.icon_state = item_icon
|
||||
item.item_state = null
|
||||
item.icon_override = CUSTOM_ITEM_MOB
|
||||
|
||||
var/obj/item/clothing/under/U = item
|
||||
if(istype(U))
|
||||
U.update_rolldown_status()
|
||||
|
||||
// Kits are dumb so this is going to have to be hardcoded/snowflake.
|
||||
if(istype(item, /obj/item/device/kit))
|
||||
var/obj/item/device/kit/K = item
|
||||
@@ -81,9 +85,9 @@
|
||||
/datum/custom_item/proc/apply_inherit_inhands(var/obj/item/item)
|
||||
var/list/new_item_icons = list()
|
||||
var/list/new_item_state_slots = list()
|
||||
|
||||
|
||||
var/list/available_states = icon_states(CUSTOM_ITEM_MOB)
|
||||
|
||||
|
||||
//If l_hand or r_hand are not present, preserve them using item_icons/item_state_slots
|
||||
//Then use icon_override to make every other slot use the custom sprites by default.
|
||||
//This has to be done before we touch any of item's vars
|
||||
@@ -93,7 +97,7 @@
|
||||
if(!("[item_icon]_r" in available_states))
|
||||
new_item_state_slots[slot_r_hand_str] = get_state(item, slot_r_hand_str, "_r")
|
||||
new_item_icons[slot_r_hand_str] = get_icon(item, slot_r_hand_str, 'icons/mob/items/righthand.dmi')
|
||||
|
||||
|
||||
item.item_state_slots = new_item_state_slots
|
||||
item.item_icons = new_item_icons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user