Fixes bloodbath effects not working on people in crit (#36598)
Also some minor improvements to performance by caching the nearby mobs list once
This commit is contained in:
committed by
CitadelStationBot
parent
5dddb2db45
commit
4fb2e612df
@@ -208,8 +208,8 @@
|
||||
|
||||
|
||||
//Puts the item into our active hand if possible. returns TRUE on success.
|
||||
/mob/proc/put_in_active_hand(obj/item/I)
|
||||
return put_in_hand(I, active_hand_index)
|
||||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE)
|
||||
return put_in_hand(I, active_hand_index, forced)
|
||||
|
||||
|
||||
//Puts the item into our inactive hand if possible, returns TRUE on success
|
||||
@@ -220,7 +220,7 @@
|
||||
//Puts the item our active hand if possible. Failing that it tries other hands. Returns TRUE on success.
|
||||
//If both fail it drops it on the floor and returns FALSE.
|
||||
//This is probably the main one you need to know :)
|
||||
/mob/proc/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE)
|
||||
/mob/proc/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE, forced = FALSE)
|
||||
if(!I)
|
||||
return FALSE
|
||||
|
||||
@@ -244,14 +244,14 @@
|
||||
to_chat(usr, "<span class='notice'>Your [inactive_stack.name] stack now contains [inactive_stack.get_amount()] [inactive_stack.singular_name]\s.</span>")
|
||||
return TRUE
|
||||
|
||||
if(put_in_active_hand(I))
|
||||
if(put_in_active_hand(I, forced))
|
||||
return TRUE
|
||||
|
||||
var/hand = get_empty_held_index_for_side("l")
|
||||
if(!hand)
|
||||
hand = get_empty_held_index_for_side("r")
|
||||
if(hand)
|
||||
if(put_in_hand(I, hand))
|
||||
if(put_in_hand(I, hand, forced))
|
||||
return TRUE
|
||||
if(del_on_fail)
|
||||
qdel(I)
|
||||
|
||||
Reference in New Issue
Block a user