mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Automated announcement systems now announce researched nodes. (#86093)
## About The Pull Request The idea was born from a small conversation about bepis nodes having low visibility, which somehow degressed into the idea of announcing researched nodes to the channels of the interested departments thru the announcement system machine, which is what I'm doing here, while also adding documentation, defines and purging some, not all, instances of camel cases from announcement_system.dm. Oh, by the by, like the arrival and new head arrival messages, it can be customized or disabled by interacting with the announcement system. ## Why It's Good For The Game I think it's helpful to let players know when the research of their dept is researched, and I think it's kinda interesting to announce bepis tech on common like it's some hot stuff while it actually isn't just because it's often missed out and miscellaneous. ## Changelog 🆑 add: Automated announcement systems now announce researched nodes to their respective departments. You can stop this by either disabling the announcement systems or by using a multitool on the circuitboard of the console you're researching nodes from. /🆑
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
var/show_on_wiki = TRUE
|
||||
/// Hidden Mech nodes unlocked when mech fabricator emaged.
|
||||
var/illegal_mech_node = FALSE
|
||||
/**
|
||||
* If set, the researched node will be announced on these channels by an announcement system
|
||||
* with 'announce_research_node' set to TRUE when researched by the station.
|
||||
* Not every node has to be announced if you want, some are best kept a little "subtler", like Illegal Weapons.
|
||||
*/
|
||||
var/list/announce_channels
|
||||
|
||||
/datum/techweb_node/error_node
|
||||
id = "ERROR"
|
||||
@@ -109,5 +115,25 @@
|
||||
return techweb_point_display_generic(get_price(TN))
|
||||
|
||||
///Proc called when the Station (Science techweb specific) researches a node.
|
||||
/datum/techweb_node/proc/on_station_research()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
/datum/techweb_node/proc/on_station_research(atom/research_source)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
var/channels_to_use = announce_channels
|
||||
if(istype(research_source, /obj/machinery/computer/rdconsole))
|
||||
var/obj/machinery/computer/rdconsole/console = research_source
|
||||
var/obj/item/circuitboard/computer/rdconsole/board = console.circuit
|
||||
if(board.silence_announcements)
|
||||
return
|
||||
if(board.obj_flags & EMAGGED)
|
||||
channels_to_use = list(RADIO_CHANNEL_COMMON)
|
||||
if(!length(channels_to_use) || starting_node)
|
||||
return
|
||||
var/obj/machinery/announcement_system/system
|
||||
var/list/available_machines = list()
|
||||
for(var/obj/machinery/announcement_system/announce as anything in GLOB.announcement_systems)
|
||||
if(announce.announce_research_node)
|
||||
available_machines += announce
|
||||
break
|
||||
if(!length(available_machines))
|
||||
return
|
||||
system = pick(available_machines)
|
||||
system.announce(AUTO_ANNOUNCE_NODE, display_name, channels = channels_to_use)
|
||||
|
||||
Reference in New Issue
Block a user