diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 2f46c4d2b55..f9bebf8153c 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -92,6 +92,15 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/looping_sound/loreconsole + mid_sounds = list('sound/machines/data_ping.ogg' = 1) + mid_length = 6 SECONDS + volume = 20 + extra_range = MEDIUM_RANGE_SOUND_EXTRARANGE + ignore_walls = FALSE + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /datum/looping_sound/gravgen mid_sounds = list('sound/machines/gravgen/gravgen_mid1.ogg' = 1, 'sound/machines/gravgen/gravgen_mid2.ogg' = 1, 'sound/machines/gravgen/gravgen_mid3.ogg' = 1, 'sound/machines/gravgen/gravgen_mid4.ogg' = 1) mid_length = 1.8 SECONDS @@ -169,4 +178,3 @@ mid_length = 3 SECONDS end_sound = 'sound/machines/synthfab/synthfab_end.ogg' volume = 75 - diff --git a/code/game/objects/structures/machinery/computer/loreconsole.dm b/code/game/objects/structures/machinery/computer/loreconsole.dm index eb1d4b9c1a0..c790aba2a97 100644 --- a/code/game/objects/structures/machinery/computer/loreconsole.dm +++ b/code/game/objects/structures/machinery/computer/loreconsole.dm @@ -12,21 +12,53 @@ * * Create `new/datum/lore_console_entry(title, body)` instances in the `entries` list * * This list can contain multiple datum entries, each entry represents a page */ -ABSTRACT_TYPE(/obj/structure/machinery/computer/terminal/loreconsole) +/obj/structure/machinery/computer/terminal/loreconsole name = "information terminal" desc = "A terminal with a blank screen, waiting to receive an input." icon_screen = "loreconsole" icon_keyboard = "power_key" light_power_on = 2 + light_color = "#7d5d3b" var/list/entries = list() + /// If true, this console will play a looping sound. + var/looping_sound = TRUE + /// Looping sound for this console to draw attention. + var/datum/looping_sound/loreconsole/soundloop + +/obj/structure/machinery/computer/terminal/loreconsole/Initialize() + . = ..() + if(looping_sound) + soundloop = new(src, TRUE) + +/obj/structure/machinery/computer/terminal/loreconsole/Destroy() + soundloop?.stop(src) + QDEL_NULL(soundloop) + return ..() + +// soundloop start/stop on power status handled here +/obj/structure/machinery/computer/terminal/loreconsole/power_change() + . = ..() + if(interact_offline || !looping_sound || !soundloop) + return + + if(stat & NOPOWER) + soundloop.stop(src) + else + soundloop.start(src) /obj/structure/machinery/computer/terminal/loreconsole/attack_hand(mob/user) + if(!interact_offline && !operable()) + return ui_interact(user) /obj/structure/machinery/computer/terminal/loreconsole/ui_state(mob/user) return GLOB.default_state /obj/structure/machinery/computer/terminal/loreconsole/ui_interact(mob/user, datum/tgui/ui = null) + if(looping_sound && ishuman(user)) + looping_sound = FALSE + soundloop.stop(src) // we stop the looping sound if a mob we care about found the console + ui = SStgui.try_update_ui(user, src, ui) if(!ui) ui = new(user, src, "LoreConsole", name) @@ -93,5 +125,11 @@ ABSTRACT_TYPE(/obj/structure/machinery/computer/terminal/loreconsole) ..() -ABSTRACT_TYPE(/obj/structure/machinery/computer/terminal/loreconsole/always_powered) +/obj/structure/machinery/computer/terminal/loreconsole/no_looping_sound + looping_sound = FALSE + +/obj/structure/machinery/computer/terminal/loreconsole/always_powered interact_offline = TRUE + +/obj/structure/machinery/computer/terminal/loreconsole/always_powered/no_looping_sound + looping_sound = FALSE diff --git a/html/changelogs/kano-noticable-lore-consoles.yml b/html/changelogs/kano-noticable-lore-consoles.yml new file mode 100644 index 00000000000..0205b9e4c55 --- /dev/null +++ b/html/changelogs/kano-noticable-lore-consoles.yml @@ -0,0 +1,4 @@ +author: kano +delete-after: True +changes: + - rscadd: "Added a looping sound for loreconsoles." diff --git a/sound/machines/data_ping.ogg b/sound/machines/data_ping.ogg new file mode 100644 index 00000000000..d63dcb7d926 Binary files /dev/null and b/sound/machines/data_ping.ogg differ diff --git a/tgui/packages/tgui/styles/themes/amberpos.scss b/tgui/packages/tgui/styles/themes/amberpos.scss index 3f2f815d8de..b62899af1ef 100644 --- a/tgui/packages/tgui/styles/themes/amberpos.scss +++ b/tgui/packages/tgui/styles/themes/amberpos.scss @@ -76,6 +76,6 @@ } h2 { - font-size: 120%; + font-size: 80%; } }