Renames inventory slot string key defines

This commit is contained in:
mwerezak
2015-04-23 04:57:03 -04:00
parent 1bbb19297e
commit 3acfe5960e
4 changed files with 29 additions and 28 deletions

View File

@@ -757,8 +757,8 @@ var/global/list/damage_icon_parts = list()
//determine state to use
var/overlay_state
if(back.item_state_slots && back.item_state_slots[slot_back_key])
overlay_state = back.item_state_slots[slot_back_key]
if(back.item_state_slots && back.item_state_slots[slot_back_str])
overlay_state = back.item_state_slots[slot_back_str]
else if(back.item_state)
overlay_state = back.item_state
else
@@ -811,15 +811,15 @@ var/global/list/damage_icon_parts = list()
var/icon/t_icon
if(r_hand.icon_override)
t_icon = r_hand.icon_override
else if(r_hand.item_icons && (slot_r_hand_key in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_key]
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else
t_icon = INV_R_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_key])
t_state = r_hand.item_state_slots[slot_r_hand_key]
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
t_state = r_hand.item_state_slots[slot_r_hand_str]
else if(r_hand.item_state)
t_state = r_hand.item_state
else
@@ -842,15 +842,15 @@ var/global/list/damage_icon_parts = list()
var/icon/t_icon
if(l_hand.icon_override)
t_icon = l_hand.icon_override
else if(l_hand.item_icons && (slot_l_hand_key in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_key]
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else
t_icon = INV_L_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_key])
t_state = l_hand.item_state_slots[slot_l_hand_key]
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
t_state = l_hand.item_state_slots[slot_l_hand_str]
else if(l_hand.item_state)
t_state = l_hand.item_state
else

View File

@@ -4,8 +4,8 @@
desc = "Its a gun. It's pretty terrible, though."
icon = 'icons/obj/gun.dmi'
item_icons = list(
slot_l_hand_key = 'icons/mob/items/lefthand_guns.dmi',
slot_r_hand_key = 'icons/mob/items/righthand_guns.dmi',
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi',
)
icon_state = "detective"
item_state = "gun"