[MIRROR] Replaced body zone magic strings with defines (#6004)
* Replaced body zone magic strings with defines * merge conflicts
This commit is contained in:
committed by
Poojawa
parent
9338d18a28
commit
3d26cd4a6f
@@ -393,7 +393,7 @@
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='warning'>[user] crushes the can of [src] on [user.p_their()] forehead!</span>", "<span class='notice'>You crush the can of [src] on your forehead.</span>")
|
||||
playsound(user.loc,'sound/weapons/pierce.ogg', rand(10,50), 1)
|
||||
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(user.loc)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage
|
||||
|
||||
//If they have a hat/helmet and the user is targeting their head.
|
||||
if(istype(H.head, /obj/item/clothing/head) && affecting == "head")
|
||||
if(istype(H.head, /obj/item/clothing/head) && affecting == BODY_ZONE_HEAD)
|
||||
headarmor = H.head.armor.melee
|
||||
else
|
||||
headarmor = 0
|
||||
@@ -78,7 +78,7 @@
|
||||
else
|
||||
//Only humans can have armor, right?
|
||||
armor_block = target.run_armor_check(affecting, "melee")
|
||||
if(affecting == "head")
|
||||
if(affecting == BODY_ZONE_HEAD)
|
||||
armor_duration = duration + force
|
||||
|
||||
//Apply the damage!
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
// You are going to knock someone out for longer if they are not wearing a helmet.
|
||||
var/head_attack_message = ""
|
||||
if(affecting == "head" && istype(target, /mob/living/carbon/))
|
||||
if(affecting == BODY_ZONE_HEAD && istype(target, /mob/living/carbon/))
|
||||
head_attack_message = " on the head"
|
||||
//Knockdown the target for the duration that we calculated and divide it by 5.
|
||||
if(armor_duration)
|
||||
|
||||
@@ -142,7 +142,7 @@ God bless America.
|
||||
var/mob/living/carbon/C = user.pulling
|
||||
user.visible_message("<span class = 'danger'>[user] dunks [C]'s face in [src]!</span>")
|
||||
reagents.reaction(C, TOUCH)
|
||||
C.apply_damage(min(30, reagents.total_volume), BURN, "head")
|
||||
C.apply_damage(min(30, reagents.total_volume), BURN, BODY_ZONE_HEAD)
|
||||
reagents.remove_any((reagents.total_volume/2))
|
||||
C.Knockdown(60)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
Reference in New Issue
Block a user