Merge pull request #7071 from Segrain/dev

Equipping custom loadout.
This commit is contained in:
PsiOmegaDelta
2014-11-21 08:03:24 +01:00
9 changed files with 121 additions and 53 deletions

View File

@@ -73,6 +73,8 @@
return has_organ("chest")
if(slot_in_backpack)
return 1
if(slot_tie)
return 1
/mob/living/carbon/human/u_equip(obj/item/W as obj)
if(!W) return 0
@@ -202,13 +204,6 @@
if(!istype(W)) return
if(!has_organ_for_slot(slot)) return
if(W == src.l_hand)
src.l_hand = null
update_inv_l_hand() //So items actually disappear from hands.
else if(W == src.r_hand)
src.r_hand = null
update_inv_r_hand()
W.loc = src
switch(slot)
if(slot_back)
@@ -311,10 +306,20 @@
if(src.get_active_hand() == W)
src.u_equip(W)
W.loc = src.back
if(slot_tie)
var/obj/item/clothing/under/uniform = src.w_uniform
uniform.attackby(W,src)
else
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
return
if(W == src.l_hand)
src.l_hand = null
update_inv_l_hand() //So items actually disappear from hands.
else if(W == src.r_hand)
src.r_hand = null
update_inv_r_hand()
W.layer = 20
return
@@ -801,4 +806,4 @@ It can still be worn/put on as normal.
if(source && target)
if(source.machine == target)
target.show_inv(source)
del(src)
del(src)

View File

@@ -612,4 +612,7 @@
if(slot_back in equip_slots)
equip_slots |= slot_in_backpack
if(slot_w_uniform in equip_slots)
equip_slots |= slot_tie
equip_slots |= slot_legcuffed

View File

@@ -165,6 +165,7 @@ var/list/slot_equipment_priority = list( \
slot_glasses,\
slot_belt,\
slot_s_store,\
slot_tie,\
slot_l_store,\
slot_r_store\
)