Mob inventory cleanup

This commit is contained in:
Kelenius
2016-03-15 16:39:40 +03:00
parent 5104957ff8
commit afbc235b96
59 changed files with 432 additions and 390 deletions

View File

@@ -93,7 +93,7 @@
if(requires_two_hands)
var/mob/living/M = loc
if(istype(M))
if((M.l_hand == src && !M.r_hand) || (M.r_hand == src && !M.l_hand))
if(M.item_is_in_hands(src) && !M.hands_are_full())
name = "[initial(name)] (wielded)"
item_state = wielded_icon
else
@@ -179,7 +179,7 @@
var/held_acc_mod = 0
var/held_disp_mod = 0
if(requires_two_hands)
if((user.l_hand == src && user.r_hand) || (user.r_hand == src && user.l_hand))
if(user.item_is_in_hands(src) && user.hands_are_full())
held_acc_mod = -3
held_disp_mod = 3

View File

@@ -171,10 +171,10 @@
name = "holdout signal pistol"
magazine_type = /obj/item/ammo_magazine/mc9mm/flash
/obj/item/weapon/gun/projectile/pistol/attack_hand(mob/user as mob)
/obj/item/weapon/gun/projectile/pistol/attack_hand(mob/living/user as mob)
if(user.get_inactive_hand() == src)
if(silenced)
if(user.l_hand != src && user.r_hand != src)
if(!user.item_is_in_hands(src))
..()
return
user << "<span class='notice'>You unscrew [silenced] from [src].</span>"
@@ -185,9 +185,9 @@
return
..()
/obj/item/weapon/gun/projectile/pistol/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/gun/projectile/pistol/attackby(obj/item/I as obj, mob/living/user as mob)
if(istype(I, /obj/item/weapon/silencer))
if(user.l_hand != src && user.r_hand != src) //if we're not in his hands
if(!user.item_is_in_hands(src)) //if we're not in his hands
user << "<span class='notice'>You'll need [src] in your hands to do that.</span>"
return
user.drop_item()

View File

@@ -113,7 +113,8 @@ obj/aiming_overlay/proc/update_aiming_deferred()
var/cancel_aim = 1
if(!(aiming_with in owner) || (istype(owner, /mob/living/carbon/human) && (owner.l_hand != aiming_with && owner.r_hand != aiming_with)))
var/mob/living/carbon/human/H = owner
if(!(aiming_with in owner) || (istype(H) && !H.item_is_in_hands(aiming_with)))
owner << "<span class='warning'>You must keep hold of your weapon!</span>"
else if(owner.eye_blind)
owner << "<span class='warning'>You are blind and cannot see your target!</span>"