mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +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:
@@ -104,21 +104,16 @@ GLOBAL_DATUM_INIT(lost_crew_manager, /datum/lost_crew_manager, new)
|
||||
|
||||
/// Give medbay a happy announcement and put some money into their budget
|
||||
/datum/lost_crew_manager/proc/award_succes(datum/mind/revived_mind, list/death_lore)
|
||||
var/obj/item/radio/headset/radio = new /obj/item/radio/headset/silicon/ai(revived_mind.current) //radio cant be in nullspace or brit shakes
|
||||
radio.set_frequency(FREQ_MEDICAL)
|
||||
radio.name = "Medical Announcer"
|
||||
|
||||
// i am incredibly disappointed in you
|
||||
// I am incredibly disappointed in you
|
||||
if(revived_mind.current.stat == DEAD)
|
||||
radio.talk_into(radio, "Sensors indicate lifesigns of [revived_mind.name] have seized. Please inform their family of your failure.", RADIO_CHANNEL_MEDICAL)
|
||||
aas_config_announce(/datum/aas_config_entry/medical_lost_crew_reward, list("PERSON" = revived_mind.name, "AWARD" = 0), null, list(RADIO_CHANNEL_MEDICAL), "Deceased")
|
||||
return
|
||||
|
||||
// You are a credit to society
|
||||
radio.talk_into(radio, "Sensors indicate continued survival of [revived_mind.name]. Well done, [credits_on_succes]cr has been transferred to the medical budget.", RADIO_CHANNEL_MEDICAL)
|
||||
aas_config_announce(/datum/aas_config_entry/medical_lost_crew_reward, list("PERSON" = revived_mind.name, "AWARD" = credits_on_succes), null, list(RADIO_CHANNEL_MEDICAL), "Revived")
|
||||
|
||||
var/datum/bank_account/medical_budget = SSeconomy.get_dep_account(ACCOUNT_MED)
|
||||
medical_budget.adjust_money(credits_on_succes)
|
||||
qdel(radio)
|
||||
|
||||
/// A box for recovered items that can only be opened by the new crewmember
|
||||
/obj/item/storage/lockbox/mind
|
||||
@@ -162,3 +157,15 @@ GLOBAL_DATUM_INIT(lost_crew_manager, /datum/lost_crew_manager, new)
|
||||
return NONE
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Use in-hand to unlock"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/datum/aas_config_entry/medical_lost_crew_reward
|
||||
name = "Medical Alert: Lost Crew Revival Program"
|
||||
announcement_lines_map = list(
|
||||
"Deceased" = "Sensors indicate lifesigns of %PERSON have seized. Please inform their family of your failure.",
|
||||
"Revived" = "Sensors indicate continued survival of %PERSON. Well done, %AWARDcr has been transferred to the medical budget."
|
||||
)
|
||||
vars_and_tooltips_map = list(
|
||||
"PERSON" = "will be replaced with body's name",
|
||||
"AWARD" = "with money that medical department receive, if any"
|
||||
)
|
||||
modifiable = FALSE
|
||||
|
||||
Reference in New Issue
Block a user