Adds the new health analyser noises to PDA scanners and mech scanners (#14860)

This commit is contained in:
Jaraci
2022-10-04 09:00:02 +01:00
committed by GitHub
parent 7123acd5a4
commit 4a72baca43
4 changed files with 25 additions and 3 deletions

View File

@@ -280,9 +280,13 @@
to_chat(user, SPAN_NOTICE("You switch to \the [src]'s [HA.fullScan ? "full body" : "basic"] scan mode.")) to_chat(user, SPAN_NOTICE("You switch to \the [src]'s [HA.fullScan ? "full body" : "basic"] scan mode."))
/obj/item/device/healthanalyzer/mech/attack(mob/living/M, var/mob/living/heavy_vehicle/user) /obj/item/device/healthanalyzer/mech/attack(mob/living/M, var/mob/living/heavy_vehicle/user)
sound_scan = FALSE
if(last_scan <= world.time - 20) //Spam limiter.
last_scan = world.time
sound_scan = TRUE
if(!fullScan) if(!fullScan)
for(var/mob/pilot in user.pilots) for(var/mob/pilot in user.pilots)
health_scan_mob(M, pilot, TRUE, TRUE) health_scan_mob(M, pilot, TRUE, TRUE, sound_scan = sound_scan)
else else
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src].")) user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
if(do_after(user, 7 SECONDS, TRUE)) if(do_after(user, 7 SECONDS, TRUE))

View File

@@ -146,9 +146,13 @@
else else
to_chat(user, SPAN_WARNING("\The [src] does not have a card or item stored in the card slot.")) to_chat(user, SPAN_WARNING("\The [src] does not have a card or item stored in the card slot."))
/obj/item/modular_computer/attack(mob/living/M, mob/living/user) /obj/item/modular_computer/attack(mob/living/M, mob/living/user, var/sound_scan)
sound_scan = FALSE
if(last_scan <= world.time - 20) //Spam limiter.
last_scan = world.time
sound_scan = TRUE
if(scan_mode == SCANNER_MEDICAL) if(scan_mode == SCANNER_MEDICAL)
health_scan_mob(M, user, TRUE) health_scan_mob(M, user, TRUE, sound_scan = sound_scan)
/obj/item/modular_computer/afterattack(atom/A, mob/user, proximity_flag, click_parameters) /obj/item/modular_computer/afterattack(atom/A, mob/user, proximity_flag, click_parameters)
. = ..() . = ..()

View File

@@ -25,6 +25,7 @@
var/pAI_lock = FALSE // Toggles whether pAI can interact with the modular computer while installed in it var/pAI_lock = FALSE // Toggles whether pAI can interact with the modular computer while installed in it
var/obj/item/card/id/registered_id = null // ID used for chat client registering var/obj/item/card/id/registered_id = null // ID used for chat client registering
var/scan_mode = null // Mode used for health/reagent scanners var/scan_mode = null // Mode used for health/reagent scanners
var/last_scan = 0 // Used for the PDA analyser spam detection
var/silent = FALSE var/silent = FALSE
var/doorcode = "smindicate" var/doorcode = "smindicate"
var/hidden = FALSE var/hidden = FALSE

View File

@@ -0,0 +1,13 @@
# Your name.
author: Omicega
# 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:
- rscadd: "Added the new health scanner sound effects to PDA scanners and mech scanners too."