Files
Aurora.3/code/modules/events/ccia_general_notice.dm
T
03f313a19d Moves various things to the new DBCore (#21544)
```
- server: "Changed the synthsprites to use the new DBCore"
- server: "Changed the MalfAI to use the new DBCore"
- server: "Changed the Alien Whitelists to use the new DBCore"
- server: "Changed the Requests Console to use the new DBCore"
- server: "Changed the Contracts Uplink to use the new DBCore"
- server: "Changed the Admin Ranks to use the new DBCore"
- server: "Changed the Job Bans to use the new DBCore"
- server: "Changed the Tickets to use the new DBCore"
- server: "Changed the Create Command Report to use the new DBCore"
- server: "Changed the WebInterface interconnect to use the new DBCore"
- server: "Changed the CCIA Recorder to use the new DBCore"
- server: "Changed the IPCTags to use the new DBCore"
- server: "Changed the Main Menu Poll-Check to use the new DBCore"
- server: "Changed the Client-Procs to use the new DBCore"
```

---------

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
2026-04-13 22:45:29 +02:00

25 lines
875 B
Plaintext

/datum/event/ccia_general_notice
var/reporttitle = "CCIA Title"
var/reportbody = "CCIA Message"
var/announce = 0
no_fake = 1
/datum/event/ccia_general_notice/start()
..()
if (!SSdbcore.Connect())
LOG_DEBUG("CCIA Automatic General Notice - Could not establish database connection")
return
var/datum/db_query/query = SSdbcore.NewQuery("SELECT SQL_NO_CACHE title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL AND automatic = 1 ORDER BY RAND() LIMIT 1;")
query.Execute()
if (query.NextRow())
reporttitle = query.item[1]
reportbody = query.item[2]
reportbody += "\n\n- CCIAAMS, [commstation_name()]"
announce = 1
qdel(query)
/datum/event/ccia_general_notice/announce()
if(announce)
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1)