mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge pull request #10010 from dovydas12345/Two-handed-catch
Fixes catching two handed items with one hand
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)
|
||||
if(!skipcatch)
|
||||
if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode
|
||||
if(canmove && !restrained())
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
if(isturf(I.loc))
|
||||
put_in_active_hand(I)
|
||||
visible_message("<span class='warning'>[src] catches [I]!</span>")
|
||||
throw_mode_off()
|
||||
return 1
|
||||
if(in_throw_mode && canmove && !restrained()) //Makes sure player is in throw mode
|
||||
if(!istype(AM,/obj/item) || !isturf(AM.loc))
|
||||
return FALSE
|
||||
if(get_active_hand())
|
||||
return FALSE
|
||||
if(istype(AM, /obj/item/twohanded))
|
||||
if(get_inactive_hand())
|
||||
return FALSE
|
||||
put_in_active_hand(AM)
|
||||
visible_message("<span class='warning'>[src] catches [AM]!</span>")
|
||||
throw_mode_off()
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/mob/living/carbon/water_act(volume, temperature, source)
|
||||
|
||||
Reference in New Issue
Block a user