Merge pull request #1191 from Kelenius/inventoryCleanup

Mob inventory cleanup
This commit is contained in:
Neerti
2016-03-22 21:42:27 -04:00
59 changed files with 432 additions and 390 deletions

View File

@@ -28,7 +28,7 @@
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))

View File

@@ -107,7 +107,7 @@
if(!isliving(usr))
return
var/mob/living/user = usr
if(href_list["take"])
switch(href_list["take"])
if("garbage")
@@ -213,10 +213,10 @@
..()
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
if(user.get_type_in_hands(/obj/item/key))
step(src, direction)
update_mob()
else

View File

@@ -64,15 +64,14 @@
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
add_fingerprint(usr)
P.attackby(usr.r_hand, usr) //then do ittttt
else
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
add_fingerprint(usr)
P.attackby(usr.l_hand, usr)
var/mob/living/M = usr
if(istype(M))
var/obj/item/weapon/pen/E = M.get_type_in_hands(/obj/item/weapon/pen)
if(E)
add_fingerprint(M)
P.attackby(E, usr)
else
usr << "<span class='notice'>You'll need something to write with!</span>"
M << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))

View File

@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
if(user.get_type_in_hands(/obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])

View File

@@ -358,7 +358,7 @@
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"