* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force)
|
|
if(..())
|
|
update_inv_hands()
|
|
return 1
|
|
return 0
|
|
|
|
/mob/living/carbon/true_devil/update_inv_hands()
|
|
//TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_image should use the down sprite when facing down, left, or right, and the up sprite when facing up.
|
|
remove_overlay(DEVIL_HANDS_LAYER)
|
|
var/list/hands_overlays = list()
|
|
var/obj/item/l_hand = get_item_for_held_index(1) //hardcoded 2-hands only, for now.
|
|
var/obj/item/r_hand = get_item_for_held_index(2)
|
|
|
|
if(r_hand)
|
|
|
|
var/r_state = r_hand.item_state
|
|
if(!r_state)
|
|
r_state = r_hand.icon_state
|
|
|
|
var/image/r_hand_image = r_hand.build_worn_icon(state = r_state, default_layer = DEVIL_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
|
|
|
|
hands_overlays += r_hand_image
|
|
|
|
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
|
r_hand.layer = ABOVE_HUD_LAYER
|
|
r_hand.plane = ABOVE_HUD_PLANE
|
|
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
|
client.screen |= r_hand
|
|
|
|
if(l_hand)
|
|
|
|
var/l_state = l_hand.item_state
|
|
if(!l_state)
|
|
l_state = l_hand.icon_state
|
|
|
|
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = DEVIL_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
|
|
|
|
hands_overlays += l_hand_image
|
|
|
|
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
|
l_hand.layer = ABOVE_HUD_LAYER
|
|
l_hand.plane = ABOVE_HUD_PLANE
|
|
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
|
client.screen |= l_hand
|
|
if(hands_overlays.len)
|
|
devil_overlays[DEVIL_HANDS_LAYER] = hands_overlays
|
|
apply_overlay(DEVIL_HANDS_LAYER)
|
|
|
|
/mob/living/carbon/true_devil/remove_overlay(cache_index)
|
|
var/I = devil_overlays[cache_index]
|
|
if(I)
|
|
cut_overlay(I)
|
|
devil_overlays[cache_index] = null
|
|
|
|
|
|
/mob/living/carbon/true_devil/apply_overlay(cache_index)
|
|
var/image/I = devil_overlays[cache_index]
|
|
if(I)
|
|
add_overlay(I)
|