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
@@ -123,8 +123,8 @@
|
|||||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||||
SEND_SOUND(victim, sound('sound/misc/e1m1.ogg'))
|
SEND_SOUND(victim, sound('sound/misc/e1m1.ogg'))
|
||||||
var/old_color = victim.client.color
|
var/old_color = victim.client.color
|
||||||
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
var/static/list/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||||
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
var/static/list/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||||
chainsaw.flags_1 |= NODROP_1
|
chainsaw.flags_1 |= NODROP_1
|
||||||
victim.drop_all_held_items()
|
victim.drop_all_held_items()
|
||||||
victim.put_in_hands(chainsaw)
|
victim.put_in_hands(chainsaw, forced = TRUE)
|
||||||
chainsaw.attack_self(victim)
|
chainsaw.attack_self(victim)
|
||||||
chainsaw.wield(victim)
|
chainsaw.wield(victim)
|
||||||
victim.reagents.add_reagent("adminordrazine",25)
|
victim.reagents.add_reagent("adminordrazine",25)
|
||||||
|
|||||||
@@ -471,10 +471,13 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
|||||||
var/image/A = null
|
var/image/A = null
|
||||||
var/kind = force_kind ? force_kind : pick("monkey","corgi","carp","skeleton","demon","zombie")
|
var/kind = force_kind ? force_kind : pick("monkey","corgi","carp","skeleton","demon","zombie")
|
||||||
feedback_details += "Type: [kind]"
|
feedback_details += "Type: [kind]"
|
||||||
|
var/list/nearby
|
||||||
|
if(skip_nearby)
|
||||||
|
nearby = get_hearers_in_view(7, target)
|
||||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||||
if(H == target)
|
if(H == target)
|
||||||
continue
|
continue
|
||||||
if(skip_nearby && (H in view(target)))
|
if(skip_nearby && (H in nearby))
|
||||||
continue
|
continue
|
||||||
switch(kind)
|
switch(kind)
|
||||||
if("monkey")//Monkey
|
if("monkey")//Monkey
|
||||||
|
|||||||
@@ -208,8 +208,8 @@
|
|||||||
|
|
||||||
|
|
||||||
//Puts the item into our active hand if possible. returns TRUE on success.
|
//Puts the item into our active hand if possible. returns TRUE on success.
|
||||||
/mob/proc/put_in_active_hand(obj/item/I)
|
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE)
|
||||||
return put_in_hand(I, active_hand_index)
|
return put_in_hand(I, active_hand_index, forced)
|
||||||
|
|
||||||
|
|
||||||
//Puts the item into our inactive hand if possible, returns TRUE on success
|
//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.
|
//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.
|
//If both fail it drops it on the floor and returns FALSE.
|
||||||
//This is probably the main one you need to know :)
|
//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)
|
if(!I)
|
||||||
return FALSE
|
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>")
|
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
|
return TRUE
|
||||||
|
|
||||||
if(put_in_active_hand(I))
|
if(put_in_active_hand(I, forced))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
var/hand = get_empty_held_index_for_side("l")
|
var/hand = get_empty_held_index_for_side("l")
|
||||||
if(!hand)
|
if(!hand)
|
||||||
hand = get_empty_held_index_for_side("r")
|
hand = get_empty_held_index_for_side("r")
|
||||||
if(hand)
|
if(hand)
|
||||||
if(put_in_hand(I, hand))
|
if(put_in_hand(I, hand, forced))
|
||||||
return TRUE
|
return TRUE
|
||||||
if(del_on_fail)
|
if(del_on_fail)
|
||||||
qdel(I)
|
qdel(I)
|
||||||
|
|||||||
Reference in New Issue
Block a user