mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
QoL changes for loreconsoles (#22784)
## About PR - Adds a looping sound for the lore consoles which can be heard in a 11 tile radius in 6 second intervals. The loop stops once a human mob has interacted with the console - Removes abstract macro from loreconsole base types, since these are intended to be spawned - Slightly decreased font size of the body text so it feels less like you're in your 60s and this is the font size of your phone - Fixed being able to interact with power reliant loreconsoles without power ## Images https://github.com/user-attachments/assets/69c94128-d84a-426b-bc8c-27d94c5974cb ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | sound/machines/data_ping.ogg | Timbre (https://freesound.org/people/Timbre/sounds/444876/) | CC BY-NC 4.0 |
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
author: kano
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Added a looping sound for loreconsoles."
|
||||
Binary file not shown.
@@ -76,6 +76,6 @@
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
font-size: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user