Fixes an air damage runtime and whisper verb printing (#9110)

This commit is contained in:
Matt Atlas
2020-06-13 11:50:41 +02:00
committed by GitHub
parent 8425bf2b66
commit 71fc63d2c7
5 changed files with 63 additions and 19 deletions
+3 -3
View File
@@ -118,13 +118,13 @@ mob/living/carbon/human/airflow_hit(atom/A)
var/b_loss = airflow_speed * vsc.airflow_damage
var/blocked = run_armor_check(BP_HEAD,"melee")
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, 0, "Airflow")
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, "Airflow")
blocked = run_armor_check(BP_CHEST,"melee")
apply_damage(b_loss/3, BRUTE, BP_CHEST, blocked, 0, "Airflow")
apply_damage(b_loss/3, BRUTE, BP_CHEST, blocked, "Airflow")
blocked = run_armor_check(BP_GROIN,"melee")
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, 0, "Airflow")
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, "Airflow")
if(airflow_speed > 10)
Paralyse(round(airflow_speed * vsc.airflow_stun))
+1 -1
View File
@@ -147,7 +147,7 @@
return 1
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
if(istype(O) && O.checkpass(PASSGLASS))
return 1
if(get_dir(O.loc, target) == dir)
+12 -12
View File
@@ -29,7 +29,7 @@
//This is used by both the whisper verb and human/say() to handle whispering
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/whisper_text = "whispers")
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
to_chat(src, "<span class='danger'>You're muzzled and cannot speak!</span>")
@@ -41,25 +41,25 @@
var/italics = 1
var/not_heard //the message displayed to people who could not hear the whispering
if (speaking)
if (speaking.whisper_verb)
verb = speaking.whisper_verb
not_heard = "[verb] something"
if(speaking)
if(speaking.whisper_verb)
whisper_text = speaking.whisper_verb
not_heard = "[whisper_text] something"
else
var/adverb = pick("quietly", "softly")
verb = "[speaking.speech_verb] [adverb]"
whisper_text = "[speaking.speech_verb] [adverb]"
not_heard = "[speaking.speech_verb] something [adverb]"
else
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
not_heard = "[whisper_text] something" //TODO get rid of the null language and just prevent speech if language is null
message = capitalize(trim(message))
if(speech_problem_flag)
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
whisper_text = handle_r[2]
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
whisper_text = "[whisper_text] [adverb]"
speech_problem_flag = handle_r[3]
@@ -122,7 +122,7 @@
for (var/obj/O in view(message_range, src))
spawn (0)
if (O)
O.hear_talk(src, message, verb, speaking)
O.hear_talk(src, message, whisper_text, speaking)
var/list/eavesdropping = hearers(eavesdropping_range, src)
eavesdropping -= src
@@ -138,14 +138,14 @@
var/list/listening_clients = list() // The clients we're going to show the speech bubble to.
for(var/mob/M in listening)
M.hear_say(message, verb, speaking, alt_name, italics, src)
M.hear_say(message, whisper_text, speaking, alt_name, italics, src)
if (M.client)
listening_clients += M.client
if (eavesdropping.len)
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
M.hear_say(new_message, whisper_text, speaking, alt_name, italics, src)
if (M.client)
listening_clients += M.client
+6 -3
View File
@@ -68,7 +68,7 @@
H.bloody_body(src)
H.bloody_hands(src)
var/blinding = FALSE
if(ran_zone("head", 75))
if(ran_zone(BP_HEAD, 75))
blinding = TRUE
for(var/obj/item/I in list(H.head, H.glasses, H.wear_mask))
if(I && (I.body_parts_covered & EYES))
@@ -82,10 +82,13 @@
to_chat(H, "<span class='danger'>You are hit by a spray of blood!</span>")
hit_mob = TRUE
if(hit_mob || !A.CanPass(src, sprayloc))
break
if(!(A.CanPass(src, sprayloc)) || hit_mob)
continue
drip(amt, sprayloc, spraydir)
bled += amt
if(hit_mob)
break
return bled
#undef BLOOD_SPRAY_DISTANCE
+41
View File
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: MattAtlas
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Whispers no longer put blank text in place of the whisper verb."