mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
- Removed support for the ONBACK and ONBELT flags.
- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of. - Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions! This commit should not bring any change whatsoever to the game from a player's perspective. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3659 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -454,7 +454,7 @@
|
||||
return
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.flags & ONBACK ))
|
||||
if (!( W.slot_flags & SLOT_BACK ))
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
|
||||
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
|
||||
@@ -478,7 +478,9 @@
|
||||
if (emptyHand)
|
||||
wear_suit.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/suit) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_OCLOTHING ))
|
||||
return
|
||||
if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
|
||||
src << "\red You're too fat to wear the [W.name]!"
|
||||
@@ -491,7 +493,9 @@
|
||||
if (emptyHand)
|
||||
gloves.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/gloves) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_GLOVES ))
|
||||
return
|
||||
u_equip(W)
|
||||
gloves = W
|
||||
@@ -501,7 +505,9 @@
|
||||
if (emptyHand)
|
||||
shoes.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/shoes) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_FEET ))
|
||||
return
|
||||
u_equip(W)
|
||||
shoes = W
|
||||
@@ -511,7 +517,9 @@
|
||||
if (emptyHand)
|
||||
belt.DblClick()
|
||||
return
|
||||
if (!W || !W.flags || !( W.flags & ONBELT ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_BELT ))
|
||||
return
|
||||
u_equip(W)
|
||||
belt = W
|
||||
@@ -521,7 +529,9 @@
|
||||
if (emptyHand)
|
||||
glasses.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/glasses) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_EYES ))
|
||||
return
|
||||
u_equip(W)
|
||||
glasses = W
|
||||
@@ -531,10 +541,9 @@
|
||||
if (emptyHand)
|
||||
head.DblClick()
|
||||
return
|
||||
if (( istype(W, /obj/item/weapon/paper) ))
|
||||
u_equip(W)
|
||||
head = W
|
||||
else if (!( istype(W, /obj/item/clothing/head) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_HEAD ))
|
||||
return
|
||||
u_equip(W)
|
||||
head = W
|
||||
@@ -550,7 +559,9 @@
|
||||
if (emptyHand)
|
||||
ears.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_EARS ))
|
||||
return
|
||||
u_equip(W)
|
||||
ears = W
|
||||
@@ -560,7 +571,9 @@
|
||||
if (emptyHand)
|
||||
w_uniform.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/under) ))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_ICLOTHING ))
|
||||
return
|
||||
if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
|
||||
src << "\red You're too fat to wear the [W.name]!"
|
||||
@@ -575,7 +588,9 @@
|
||||
return
|
||||
if (!w_uniform)
|
||||
return
|
||||
if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) )
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_ID ))
|
||||
return
|
||||
u_equip(W)
|
||||
wear_id = W
|
||||
@@ -585,19 +600,25 @@
|
||||
if (emptyHand)
|
||||
l_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
|
||||
return
|
||||
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
if("storage2")
|
||||
if (r_store)
|
||||
if (emptyHand)
|
||||
r_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
|
||||
return
|
||||
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
if("suit storage")
|
||||
if (s_store)
|
||||
if (emptyHand)
|
||||
|
||||
Reference in New Issue
Block a user