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
+9 -6
View File
@@ -407,15 +407,18 @@ ABSTRACT_TYPE(/atom/movable/screen/new_player/selection)
/atom/movable/screen/new_player/selection/polls/Initialize()
. = ..()
if(establish_db_connection(GLOB.dbcon))
if(SSdbcore.Connect())
var/mob/M = hud.mymob
var/isadmin = M && M.client && M.client.holder
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT id FROM ss13_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM ss13_poll_vote WHERE ckey = \"[M.ckey]\") AND id NOT IN (SELECT pollid FROM ss13_poll_textreply WHERE ckey = \"[M.ckey]\")")
query.Execute()
var/newpoll = query.NextRow()
var/datum/db_query/query = SSdbcore.NewQuery("SELECT id FROM ss13_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM ss13_poll_vote WHERE ckey = :ckey) AND id NOT IN (SELECT pollid FROM ss13_poll_textreply WHERE ckey = :ckey) LIMIT 0,1", list("ckey" = M.ckey))
query.SetSuccessCallback(CALLBACK(src, PROC_REF(_polls_check_cb)))
query.SetFailCallback(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel)))
query.ExecuteNoSleep(TRUE)
if(newpoll)
new_polls = TRUE
/atom/movable/screen/new_player/selection/polls/proc/_polls_check_cb(datum/db_query/query)
if (query.NextRow())
new_polls = TRUE
qdel(query)
/atom/movable/screen/new_player/selection/polls/Click()
var/mob/abstract/new_player/player = usr
@@ -303,15 +303,15 @@
if (!target || !player)
return
if (establish_db_connection(GLOB.dbcon) && target.character_id)
if (SSdbcore.Connect() && target.character_id)
var/status = FALSE
var/sql_status = FALSE
if (target.internal_organs_by_name[BP_IPCTAG])
status = TRUE
var/list/query_details = list("char_id" = target.character_id)
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT tag_status FROM ss13_characters_ipc_tags WHERE char_id = :char_id:")
query.Execute(query_details)
var/datum/db_query/query = SSdbcore.NewQuery("SELECT tag_status FROM ss13_characters_ipc_tags WHERE char_id = :char_id",query_details)
query.Execute()
if (query.NextRow())
sql_status = text2num(query.item[1])
@@ -319,8 +319,10 @@
return
query_details["status"] = status
var/DBQuery/update_query = GLOB.dbcon.NewQuery("UPDATE ss13_characters_ipc_tags SET tag_status = :status: WHERE char_id = :char_id:")
update_query.Execute(query_details)
var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE ss13_characters_ipc_tags SET tag_status = :status: WHERE char_id = :char_id",query_details)
update_query.Execute()
qdel(update_query)
qdel(query)
/datum/species/machine/get_light_color(mob/living/carbon/human/H)
if (!istype(H))