DMAPI Update (#17935)

* DMAPI Update

* Fix

* More changes

* InitTgs

* .

* css

* urg

* fix that

* some linux fixes

* .

* .

* .

* update

* .

* pref fixing

* .

* those are already sent

* .

* .

* .

* fully off

* fix that

* New classes & Format

* make this nicer

* CSS Edits

* .

* eh use switch

* .

* Update client procs.dm

* Hard restart counter

* Improved Staffwho style

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2025-07-02 22:21:14 +02:00
committed by GitHub
co-authored by Kashargul
parent 585d3969f6
commit 355c8ca5f0
74 changed files with 3174 additions and 1187 deletions
+6 -1
View File
@@ -151,7 +151,10 @@
log_and_message_admins("[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord snowflake ID is: [their_id]", src)
admin_chat_message(message = "[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord is: <@[their_id]>", color = "#4eff22")
notes_add(ckey, "Discord ID: [their_id]")
world.VgsAddMemberRole(their_id)
var/port = CONFIG_GET(number/register_server_port)
if(port)
// Designed to be used with `tools/registration`
world.Export("http://127.0.0.1:[port]?member=[url_encode(json_encode(their_id))]")
else
to_chat(src, span_warning("There was an error registering your Discord ID in the database. Contact an administrator."))
log_and_message_admins("[ckey] failed to register their Discord ID. Their Discord snowflake ID is: [their_id]. Is the database connected?", src)
@@ -348,6 +351,8 @@
alert = TRUE
if(alert)
for(var/client/X in GLOB.admins)
if(!check_rights_for(X, R_HOLDER))
continue
if(X.prefs?.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping))
X << 'sound/effects/tones/newplayerping.ogg'
window_flash(X)
+2
View File
@@ -403,6 +403,8 @@ var/list/preferences_datums = list()
sanitize_preferences()
save_preferences()
save_character()
load_preferences(TRUE)
load_character()
attempt_vr(user.client?.prefs_vr,"load_vore","")
ShowChoices(user)
+10 -10
View File
@@ -136,8 +136,8 @@
switch(action)
// Basic actions
if("load")
if(!IsGuestKey(usr.key))
open_load_dialog(usr)
if(!IsGuestKey(ui.user.key))
open_load_dialog(ui.user)
. = TRUE
if("save")
save_character()
@@ -146,22 +146,22 @@
VARSET_IN(src, saved_notification, FALSE, 1 SECONDS)
. = TRUE
if("reload")
load_preferences()
load_preferences(TRUE)
load_character()
attempt_vr(client.prefs_vr,"load_vore","") //VOREStation Edit
sanitize_preferences()
. = TRUE
if("resetslot")
if("Yes" != tgui_alert(usr, "This will reset the current slot. Continue?", "Reset current slot?", list("No", "Yes")))
if("Yes" != tgui_alert(ui.user, "This will reset the current slot. Continue?", "Reset current slot?", list("No", "Yes")))
return
if("Yes" != tgui_alert(usr, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", list("No", "Yes")))
if("Yes" != tgui_alert(ui.user, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", list("No", "Yes")))
return
reset_slot()
sanitize_preferences()
. = TRUE
if("copy")
if(!IsGuestKey(usr.key))
open_copy_dialog(usr)
if(!IsGuestKey(ui.user.key))
open_copy_dialog(ui.user)
. = TRUE
// More specific stuff
if("switch_category")
@@ -169,11 +169,11 @@
for(var/datum/category_group/player_setup_category/PS in player_setup.categories)
if(PS.name == new_category)
player_setup.selected_category = PS
update_tgui_static_data(usr, ui)
update_tgui_static_data(ui.user, ui)
break
. = TRUE
if("game_prefs")
usr.client.game_options()
ui.user.client.game_options()
. = TRUE
if("refresh_character_preview")
if(!COOLDOWN_FINISHED(src, ui_refresh_cooldown))
@@ -192,7 +192,7 @@
PMH.screen_loc = LAZYACCESS(preview_screen_locs, "PMH")
/datum/preferences/tgui_close(mob/user)
save_character()
// save_character()
save_preferences()
/datum/preferences/proc/create_character_profiles()
+8 -2
View File
@@ -1,3 +1,5 @@
#define NO_ADMINS_ONLINE_MESSAGE "Adminhelps are also sent through TGS to services like Discord. If no admins are available in game, sending an adminhelp might still be noticed and responded to."
/client/verb/who()
set name = "Who"
set category = "OOC.Resources"
@@ -58,6 +60,8 @@
set category = "Admin"
set name = "Staffwho"
var/header = GLOB.admins.len == 0 ? "No Admins Currently Online" : "Current Admins"
var/msg = ""
var/modmsg = ""
var/devmsg = ""
@@ -132,6 +136,8 @@
if(CONFIG_GET(flag/show_mentors))
msg += "\n" + span_bold(" Current Mentors ([num_mentors_online]):") + "\n" + mentormsg
msg += "\n" + span_info("Adminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond.")
msg += "\n" + span_info(NO_ADMINS_ONLINE_MESSAGE)
to_chat(src,span_filter_notice("[jointext(msg, "<br>")]"))
to_chat(src, fieldset_block(span_bold(header), span_filter_notice("[jointext(msg, "<br>")]"), "boxed_message"), type = MESSAGE_TYPE_INFO)
#undef NO_ADMINS_ONLINE_MESSAGE