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>
This commit is contained in:
Arrow768
2026-04-13 22:45:29 +02:00
committed by GitHub
co-authored by Werner
parent 17721ddae4
commit 03f313a19d
33 changed files with 717 additions and 384 deletions
+19 -16
View File
@@ -162,25 +162,28 @@ GLOBAL_LIST_EMPTY(ticket_panels)
if (status != TICKET_CLOSED)
return
if (!establish_db_connection(GLOB.dbcon))
if (!SSdbcore.Connect())
return
var/DBQuery/Q = GLOB.dbcon.NewQuery({"INSERT INTO ss13_tickets
var/datum/db_query/query = SSdbcore.NewQuery({"INSERT INTO ss13_tickets
(game_id, message_count, admin_count, admin_list, opened_by, taken_by, closed_by, response_delay, opened_at, closed_at)
VALUES
(:g_id:, :m_count:, :a_count:, :a_list:, :opened_by:, :taken_by:, :closed_by:, :delay:, :opened_at:, :closed_at:)"})
Q.Execute(list(
"g_id" = GLOB.round_id,
"m_count" = length(msgs),
"a_count" = length(assigned_admins),
"a_list" = json_encode(assigned_admins),
"opened_by" = owner,
"taken_by" = length(assigned_admins) ? assigned_admins[1] : null,
"closed_by" = closed_by,
"delay" = response_time || -1,
"opened_at" = SQLtime(opened_rt),
"closed_at" = SQLtime(closed_rt)
))
VALUES (:g_id, :m_count, :a_count, :a_list, :opened_by, :taken_by, :closed_by, :delay, :opened_at, :closed_at)"},
list(
"g_id" = GLOB.round_id,
"m_count" = length(msgs),
"a_count" = length(assigned_admins),
"a_list" = json_encode(assigned_admins),
"opened_by" = owner,
"taken_by" = length(assigned_admins) ? assigned_admins[1] : null,
"closed_by" = closed_by,
"delay" = response_time || -1,
"opened_at" = SQLtime(opened_rt),
"closed_at" = SQLtime(closed_rt)
),
TRUE
)
query.SetSuccessCallback(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel)))
query.Execute()
/datum/ticket/proc/append_message(m_from, m_to, msg)
msgs += new /datum/ticket_msg(m_from, m_to, msg)