mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Ports the TG globals controller and converts globals. (#18057)
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -202,4 +202,4 @@
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/proc/can_select_ooc_color(var/mob/user)
|
||||
return config.allow_admin_ooccolor && check_rights(R_ADMIN, 0, user)
|
||||
return GLOB.config.allow_admin_ooccolor && check_rights(R_ADMIN, 0, user)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
pref.current_character = validate_current_character()
|
||||
|
||||
pref.lastchangelog = sanitize_text(pref.lastchangelog, initial(pref.lastchangelog))
|
||||
pref.default_slot = sanitize_integer(text2num(pref.default_slot), 1, config.character_slots, initial(pref.default_slot))
|
||||
pref.default_slot = sanitize_integer(text2num(pref.default_slot), 1, GLOB.config.character_slots, initial(pref.default_slot))
|
||||
pref.toggles = sanitize_integer(text2num(pref.toggles), 0, BITFIELDMAX, initial(pref.toggles))
|
||||
pref.sfx_toggles = sanitize_integer(text2num(pref.sfx_toggles), 0, BITFIELDMAX, initial(pref.toggles))
|
||||
pref.motd_hash = sanitize_text(pref.motd_hash, initial(pref.motd_hash))
|
||||
@@ -112,10 +112,10 @@
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/proc/validate_current_character()
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
return pref.current_character
|
||||
|
||||
var/DBQuery/is_ours = dbcon.NewQuery("SELECT COUNT(*) as valid_id FROM ss13_characters WHERE ckey = :ckey: AND id = :curr_char: AND deleted_at IS NULL")
|
||||
var/DBQuery/is_ours = GLOB.dbcon.NewQuery("SELECT COUNT(*) as valid_id FROM ss13_characters WHERE ckey = :ckey: AND id = :curr_char: AND deleted_at IS NULL")
|
||||
is_ours.Execute(list("ckey" = pref.client.ckey, "curr_char" = pref.current_character))
|
||||
|
||||
if (!is_ours.NextRow())
|
||||
@@ -129,10 +129,10 @@
|
||||
return pref.current_character
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/proc/select_default_character()
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
return 0
|
||||
|
||||
var/DBQuery/first_char = dbcon.NewQuery("SELECT id FROM ss13_characters WHERE ckey = :ckey: AND deleted_at IS NULL LIMIT 1")
|
||||
var/DBQuery/first_char = GLOB.dbcon.NewQuery("SELECT id FROM ss13_characters WHERE ckey = :ckey: AND deleted_at IS NULL LIMIT 1")
|
||||
first_char.Execute(list("ckey" = pref.client.ckey))
|
||||
|
||||
if (!first_char.NextRow())
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
pref.language_prefixes = params2list(pref.language_prefixes)
|
||||
|
||||
if (isnull(pref.language_prefixes) || !pref.language_prefixes.len)
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
pref.language_prefixes = GLOB.config.language_prefixes.Copy()
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/language/content(var/mob/user)
|
||||
. += "<b>Language Keys</b><br>"
|
||||
@@ -55,7 +55,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_prefix"])
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
pref.language_prefixes = GLOB.config.language_prefixes.Copy()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user