mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-08 07:08:30 +00:00
Refactors pepperspray touch effect, adjusts pepperspray messages.
This commit is contained in:
@@ -238,11 +238,11 @@
|
||||
return
|
||||
if(dose < agony_dose)
|
||||
if(prob(5) || dose == metabolism) //dose == metabolism is a very hacky way of forcing the message the first time this procs
|
||||
M << initial_message
|
||||
M << discomfort_message
|
||||
else
|
||||
M.apply_effect(agony_amount, AGONY, 0)
|
||||
if(prob(5))
|
||||
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>")
|
||||
M.custom_emote(2, "[pick("dry heaves!","coughs!","splutters!")]")
|
||||
M << "<span class='danger'>You feel like your insides are burning!</span>"
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature += rand(0, 15) + slime_temp_adj
|
||||
@@ -263,51 +263,51 @@
|
||||
/datum/reagent/capsaicin/condensed/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
var/eyes_covered = 0
|
||||
var/mouth_covered = 0
|
||||
var/obj/item/safe_thing = null
|
||||
var/no_pain = 0
|
||||
var/obj/item/eye_protection = null
|
||||
var/obj/item/face_protection = null
|
||||
|
||||
var/list/protection
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
protection = list(H.head, H.glasses, H.wear_mask)
|
||||
if(H.species && (H.species.flags & NO_PAIN))
|
||||
return
|
||||
if(H.head)
|
||||
if(H.head.flags & MASKCOVERSEYES)
|
||||
no_pain = 1 //TODO: living-level can_feel_pain() proc
|
||||
else
|
||||
protection = list(M.wear_mask)
|
||||
|
||||
for(var/obj/item/I in protection)
|
||||
if(I)
|
||||
if(I.flags & MASKCOVERSEYES)
|
||||
eyes_covered = 1
|
||||
safe_thing = H.head
|
||||
if(H.head.flags & MASKCOVERSMOUTH)
|
||||
eye_protection = I
|
||||
if(I.flags & MASKCOVERSMOUTH)
|
||||
mouth_covered = 1
|
||||
safe_thing = H.head
|
||||
if(H.wear_mask)
|
||||
if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES)
|
||||
eyes_covered = 1
|
||||
safe_thing = H.wear_mask
|
||||
if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH)
|
||||
mouth_covered = 1
|
||||
safe_thing = H.wear_mask
|
||||
if(H.glasses)
|
||||
if(!eyes_covered)
|
||||
eyes_covered = 1
|
||||
if(!safe_thing)
|
||||
safe_thing = H.glasses
|
||||
if(eyes_covered && mouth_covered)
|
||||
M << "<span class='warning'>Your [safe_thing] protects you from the pepperspray!</span>"
|
||||
return
|
||||
else if(eyes_covered)
|
||||
M << "<span class='warning'>Your [safe_thing] protect your eyes from the pepperspray!</span>"
|
||||
M.eye_blurry = max(M.eye_blurry, 5)
|
||||
face_protection = I
|
||||
|
||||
var/message = null
|
||||
if(eyes_covered)
|
||||
message = "<span class='warning'>Your [eye_protection] protects your eyes from the pepperspray!</span>"
|
||||
else
|
||||
message = "<span class='warning'>The pepperspray gets in your eyes!</span>"
|
||||
if(mouth_covered)
|
||||
M.eye_blurry = max(M.eye_blurry, 15)
|
||||
M.eye_blind = max(M.eye_blind, 5)
|
||||
else
|
||||
M.eye_blurry = max(M.eye_blurry, 25)
|
||||
M.eye_blind = max(M.eye_blind, 10)
|
||||
|
||||
if(mouth_covered)
|
||||
if(!message)
|
||||
message = "<span class='warning'>Your [face_protection] protects you from the pepperspray!</span>"
|
||||
else if(!no_pain)
|
||||
message = "<span class='danger'>Your face and throat burn!</span>"
|
||||
if(prob(25))
|
||||
M.custom_emote(2, "[pick("coughs!","coughs hysterically!","splutters!")]")
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
return
|
||||
else if (mouth_covered) // Mouth cover is better than eye cover
|
||||
M << "<span class='warning'>Your [safe_thing] protects your face from the pepperspray!</span>"
|
||||
M.eye_blurry = max(M.eye_blurry, 15)
|
||||
M.eye_blind = max(M.eye_blind, 5)
|
||||
return
|
||||
else // Oh dear :D
|
||||
M << "<span class='warning'>You're sprayed directly with the pepperspray!</span>"
|
||||
M.eye_blurry = max(M.eye_blurry, 25)
|
||||
M.eye_blind = max(M.eye_blind, 10)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
return
|
||||
|
||||
M << message
|
||||
|
||||
/* Drinks */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user