mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Renames inventory slot string key defines
This commit is contained in:
@@ -7,15 +7,15 @@
|
|||||||
name = "backpack"
|
name = "backpack"
|
||||||
desc = "You wear this on your back and put items into it."
|
desc = "You wear this on your back and put items into it."
|
||||||
item_icons = list(
|
item_icons = list(
|
||||||
slot_l_hand_key = 'icons/mob/items/lefthand_backpacks.dmi',
|
slot_l_hand_str = 'icons/mob/items/lefthand_backpacks.dmi',
|
||||||
slot_r_hand_key = 'icons/mob/items/righthand_backpacks.dmi',
|
slot_r_hand_str = 'icons/mob/items/righthand_backpacks.dmi',
|
||||||
)
|
)
|
||||||
icon_state = "backpack"
|
icon_state = "backpack"
|
||||||
item_state = null
|
item_state = null
|
||||||
//most backpacks use the default backpack state for inhand overlays
|
//most backpacks use the default backpack state for inhand overlays
|
||||||
item_state_slots = list(
|
item_state_slots = list(
|
||||||
slot_l_hand_key = "backpack",
|
slot_l_hand_str = "backpack",
|
||||||
slot_r_hand_key = "backpack",
|
slot_r_hand_str = "backpack",
|
||||||
)
|
)
|
||||||
w_class = 4
|
w_class = 4
|
||||||
slot_flags = SLOT_BACK
|
slot_flags = SLOT_BACK
|
||||||
@@ -190,8 +190,8 @@
|
|||||||
desc = "A tough satchel with extra pockets."
|
desc = "A tough satchel with extra pockets."
|
||||||
icon_state = "satchel-eng"
|
icon_state = "satchel-eng"
|
||||||
item_state_slots = list(
|
item_state_slots = list(
|
||||||
slot_l_hand_key = "engiepack",
|
slot_l_hand_str = "engiepack",
|
||||||
slot_r_hand_key = "engiepack",
|
slot_r_hand_str = "engiepack",
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/backpack/satchel_med
|
/obj/item/weapon/storage/backpack/satchel_med
|
||||||
@@ -199,8 +199,8 @@
|
|||||||
desc = "A sterile satchel used in medical departments."
|
desc = "A sterile satchel used in medical departments."
|
||||||
icon_state = "satchel-med"
|
icon_state = "satchel-med"
|
||||||
item_state_slots = list(
|
item_state_slots = list(
|
||||||
slot_l_hand_key = "medicalpack",
|
slot_l_hand_str = "medicalpack",
|
||||||
slot_r_hand_key = "medicalpack",
|
slot_r_hand_str = "medicalpack",
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/backpack/satchel_vir
|
/obj/item/weapon/storage/backpack/satchel_vir
|
||||||
@@ -228,8 +228,8 @@
|
|||||||
desc = "A robust satchel for security related needs."
|
desc = "A robust satchel for security related needs."
|
||||||
icon_state = "satchel-sec"
|
icon_state = "satchel-sec"
|
||||||
item_state_slots = list(
|
item_state_slots = list(
|
||||||
slot_l_hand_key = "securitypack",
|
slot_l_hand_str = "securitypack",
|
||||||
slot_r_hand_key = "securitypack",
|
slot_r_hand_str = "securitypack",
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/backpack/satchel_hyd
|
/obj/item/weapon/storage/backpack/satchel_hyd
|
||||||
@@ -250,8 +250,8 @@
|
|||||||
desc = "A spacious backpack with lots of pockets, used by members of the Nanotrasen Emergency Response Team."
|
desc = "A spacious backpack with lots of pockets, used by members of the Nanotrasen Emergency Response Team."
|
||||||
icon_state = "ert_commander"
|
icon_state = "ert_commander"
|
||||||
item_state_slots = list(
|
item_state_slots = list(
|
||||||
slot_l_hand_key = "securitypack",
|
slot_l_hand_str = "securitypack",
|
||||||
slot_r_hand_key = "securitypack",
|
slot_r_hand_str = "securitypack",
|
||||||
)
|
)
|
||||||
|
|
||||||
//Commander
|
//Commander
|
||||||
|
|||||||
@@ -757,8 +757,8 @@ var/global/list/damage_icon_parts = list()
|
|||||||
|
|
||||||
//determine state to use
|
//determine state to use
|
||||||
var/overlay_state
|
var/overlay_state
|
||||||
if(back.item_state_slots && 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_key]
|
overlay_state = back.item_state_slots[slot_back_str]
|
||||||
else if(back.item_state)
|
else if(back.item_state)
|
||||||
overlay_state = back.item_state
|
overlay_state = back.item_state
|
||||||
else
|
else
|
||||||
@@ -811,15 +811,15 @@ var/global/list/damage_icon_parts = list()
|
|||||||
var/icon/t_icon
|
var/icon/t_icon
|
||||||
if(r_hand.icon_override)
|
if(r_hand.icon_override)
|
||||||
t_icon = 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))
|
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||||
t_icon = r_hand.item_icons[slot_r_hand_key]
|
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||||
else
|
else
|
||||||
t_icon = INV_R_HAND_DEF_ICON
|
t_icon = INV_R_HAND_DEF_ICON
|
||||||
|
|
||||||
//determine icon state to use
|
//determine icon state to use
|
||||||
var/t_state
|
var/t_state
|
||||||
if(r_hand.item_state_slots && 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_key]
|
t_state = r_hand.item_state_slots[slot_r_hand_str]
|
||||||
else if(r_hand.item_state)
|
else if(r_hand.item_state)
|
||||||
t_state = r_hand.item_state
|
t_state = r_hand.item_state
|
||||||
else
|
else
|
||||||
@@ -842,15 +842,15 @@ var/global/list/damage_icon_parts = list()
|
|||||||
var/icon/t_icon
|
var/icon/t_icon
|
||||||
if(l_hand.icon_override)
|
if(l_hand.icon_override)
|
||||||
t_icon = 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))
|
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||||
t_icon = l_hand.item_icons[slot_l_hand_key]
|
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||||
else
|
else
|
||||||
t_icon = INV_L_HAND_DEF_ICON
|
t_icon = INV_L_HAND_DEF_ICON
|
||||||
|
|
||||||
//determine icon state to use
|
//determine icon state to use
|
||||||
var/t_state
|
var/t_state
|
||||||
if(l_hand.item_state_slots && 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_key]
|
t_state = l_hand.item_state_slots[slot_l_hand_str]
|
||||||
else if(l_hand.item_state)
|
else if(l_hand.item_state)
|
||||||
t_state = l_hand.item_state
|
t_state = l_hand.item_state
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
desc = "Its a gun. It's pretty terrible, though."
|
desc = "Its a gun. It's pretty terrible, though."
|
||||||
icon = 'icons/obj/gun.dmi'
|
icon = 'icons/obj/gun.dmi'
|
||||||
item_icons = list(
|
item_icons = list(
|
||||||
slot_l_hand_key = 'icons/mob/items/lefthand_guns.dmi',
|
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
|
||||||
slot_r_hand_key = 'icons/mob/items/righthand_guns.dmi',
|
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi',
|
||||||
)
|
)
|
||||||
icon_state = "detective"
|
icon_state = "detective"
|
||||||
item_state = "gun"
|
item_state = "gun"
|
||||||
|
|||||||
@@ -257,10 +257,11 @@
|
|||||||
|
|
||||||
// Inventory slot strings.
|
// Inventory slot strings.
|
||||||
// since numbers cannot be used as associative list keys.
|
// since numbers cannot be used as associative list keys.
|
||||||
#define slot_l_hand_key "slot_l_hand"
|
#define slot_l_hand_str "slot_l_hand"
|
||||||
#define slot_r_hand_key "slot_r_hand"
|
#define slot_r_hand_str "slot_r_hand"
|
||||||
#define slot_w_uniform_key "w_uniform"
|
#define slot_w_uniform_str "w_uniform"
|
||||||
#define slot_back_key "back"
|
#define slot_back_str "back"
|
||||||
|
#define slot_w_uniform_str "w_uniform"
|
||||||
|
|
||||||
// Bitflags for clothing parts.
|
// Bitflags for clothing parts.
|
||||||
#define HEAD 1
|
#define HEAD 1
|
||||||
|
|||||||
Reference in New Issue
Block a user