mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Automated Announcement System refactor (#89276)
I standardized stuff in AASs code, and all current reference to it. Also added interactions for bounty cubes, weather reports and request consoles, all of it can be changed from AASs UI. Also it's easier now to add new config entries for AAS to proceed, and it's now downstream friendly. Well, because kind of order in code and because it's funny to make custom messages for... Almost everything? BTW any entry can be blocked from ingame changes, by default you can't change Broken Arrival shuttle and Security Officer arrival announcements, how it was before. But may be we should allow it - it's an open question. 🆑 add: Many things now handles via AAS: Bounty Cubes, Request Consoles, Brig Cells, Vending Machines and Orion Trails alerts, Weather Reports, Cargo Order Console code: Now anyone can make their own entry for AAS refactor: AAS internals, also cleanup /🆑
This commit is contained in:
@@ -28,8 +28,6 @@
|
||||
var/list/datum/weakref/spawned_threat_refs = list()
|
||||
/// Scales loot with extra players
|
||||
var/multiplayer_bonus = 1.1
|
||||
///The radio the console can speak into
|
||||
var/obj/item/radio/radio
|
||||
/// The amount of points in the system, used to purchase maps
|
||||
var/points = 0
|
||||
/// Keeps track of the number of times someone has built a hololadder
|
||||
@@ -54,11 +52,6 @@
|
||||
/obj/machinery/quantum_server/post_machine_initialize()
|
||||
. = ..()
|
||||
|
||||
radio = new(src)
|
||||
radio.keyslot = new /obj/item/encryptionkey/headset_cargo()
|
||||
radio.set_listening(FALSE)
|
||||
radio.recalculateChannels()
|
||||
|
||||
RegisterSignals(src, list(COMSIG_MACHINERY_BROKEN, COMSIG_MACHINERY_POWER_LOST), PROC_REF(on_broken))
|
||||
RegisterSignal(src, COMSIG_QDELETING, PROC_REF(on_delete))
|
||||
|
||||
@@ -70,7 +63,6 @@
|
||||
spawned_threat_refs.Cut()
|
||||
QDEL_NULL(exit_turfs)
|
||||
QDEL_NULL(generated_domain)
|
||||
QDEL_NULL(radio)
|
||||
|
||||
/obj/machinery/quantum_server/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -178,3 +170,10 @@
|
||||
servo_bonus = servo_rating
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/aas_config_entry/bitrunning_QS_ready_announcement
|
||||
name = "Cargo Alert: Bitrunning QS Ready"
|
||||
general_tooltip = "Announces when the quantum server is ready to be used. No variables provided"
|
||||
announcement_lines_map = list(
|
||||
"Message" = "Quantum Server report: Thermal systems within operational parameters. Proceeding to domain configuration."
|
||||
)
|
||||
|
||||
@@ -132,12 +132,15 @@
|
||||
/obj/machinery/quantum_server/proc/station_spawn(mob/living/antag, obj/machinery/byteforge/chosen_forge)
|
||||
antag.balloon_alert(antag, "scanning...")
|
||||
chosen_forge.setup_particles(angry = TRUE)
|
||||
radio.talk_into(src, "SECURITY BREACH: Unauthorized entry sequence detected.", RADIO_CHANNEL_SUPPLY)
|
||||
var/obj/machinery/announcement_system/aas = get_announcement_system(source = src)
|
||||
if (aas)
|
||||
aas.broadcast("QUANTUM SERVER ALERT: Security breach detected. Unauthorized entry sequence in progress...", list(RADIO_CHANNEL_SUPPLY))
|
||||
SEND_SIGNAL(src, COMSIG_BITRUNNER_STATION_SPAWN)
|
||||
|
||||
var/timeout = 2 SECONDS
|
||||
if(!ishuman(antag))
|
||||
radio.talk_into(src, "Fabrication protocols have crashed unexpectedly. Please evacuate the area.", RADIO_CHANNEL_SUPPLY)
|
||||
if (aas)
|
||||
aas.broadcast("QUANTUM SERVER ALERT: Fabrication protocols have crashed unexpectedly. Please evacuate the area.", list(RADIO_CHANNEL_SUPPLY))
|
||||
timeout = 10 SECONDS
|
||||
|
||||
if(!do_after(antag, timeout) || QDELETED(chosen_forge) || QDELETED(antag) || QDELETED(src) || !is_ready || !is_operational)
|
||||
@@ -159,8 +162,8 @@
|
||||
|
||||
if(ishuman(antag))
|
||||
reset_equipment(antag)
|
||||
else
|
||||
radio.talk_into(src, "CRITICAL ALERT: Unregistered mechanical entity deployed.")
|
||||
else if (aas)
|
||||
aas.broadcast("QUANTUM SERVER CRITICAL ALERT: Unregistered mechanical entity deployed.", list())
|
||||
|
||||
var/datum/antagonist/antag_datum = antag.mind?.has_antag_datum(/datum/antagonist/bitrunning_glitch)
|
||||
if(istype(antag_datum))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
balloon_alert_to_viewers("cooldown has completed")
|
||||
return
|
||||
//BUBBER ADDITION END
|
||||
radio.talk_into(src, "Thermal systems within operational parameters. Proceeding to domain configuration.", RADIO_CHANNEL_SUPPLY)
|
||||
aas_config_announce(/datum/aas_config_entry/bitrunning_QS_ready_announcement, list(), src, list(RADIO_CHANNEL_SUPPLY))
|
||||
|
||||
|
||||
/// If there are hosted minds, attempts to get a list of their current virtual bodies w/ vitals
|
||||
|
||||
Reference in New Issue
Block a user