mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-26 18:13:35 +00:00
[MIRROR] tgui core 1.8.2 (#10398)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a078b5cf1b
commit
f682996b40
@@ -178,6 +178,7 @@
|
||||
// Admin log filters
|
||||
#define span_log_message(str) ("<span class='log_message'>" + str + "</span>")
|
||||
#define span_filter_adminlog(str) ("<span class='filter_adminlog'>" + str + "</span>") // (Uses the chat message type directly)
|
||||
#define span_adminprefix(str) ("<span class='admin prefix'>" + str + "</span>")
|
||||
|
||||
// Attack log filter
|
||||
#define span_filter_attacklog(str) ("<span class='filter_attacklog'>" + str + "</span>") // (Uses the chat message type directly)
|
||||
@@ -212,25 +213,25 @@
|
||||
|
||||
/* Byond Sizes */
|
||||
// Sizes only!
|
||||
#define span_small(str) "<font size='1'>" + str + "</font>"
|
||||
#define span_small(str) ("<font size='1'>" + str + "</font>")
|
||||
|
||||
#define span_normal(str) "<font size='2'>" + str + "</font>"
|
||||
#define span_normal(str) ("<font size='2'>" + str + "</font>")
|
||||
|
||||
#define span_large(str) "<font size='3'>" + str + "</font>"
|
||||
#define span_large(str) ("<font size='3'>" + str + "</font>")
|
||||
|
||||
#define span_huge(str) "<font size='4'>" + str + "</font>"
|
||||
#define span_huge(str) ("<font size='4'>" + str + "</font>")
|
||||
|
||||
#define span_giant(str) "<font size='5'>" + str + "</font>"
|
||||
#define span_giant(str) ("<font size='5'>" + str + "</font>")
|
||||
|
||||
#define span_giganteus(str) "<font size='6'>" + str + "</font>"
|
||||
#define span_giganteus(str) ("<font size='6'>" + str + "</font>")
|
||||
|
||||
#define span_massive(str) "<font size='7'>" + str + "</font>"
|
||||
#define span_massive(str) ("<font size='7'>" + str + "</font>")
|
||||
|
||||
#define span_extramassive(str) "<font size='8'>" + str + "</font>"
|
||||
#define span_extramassive(str) ("<font size='8'>" + str + "</font>")
|
||||
|
||||
#define span_narsie(str) "<font size='15'>" + str + "</font>"
|
||||
#define span_narsie(str) ("<font size='15'>" + str + "</font>")
|
||||
|
||||
#define span_cascade(str) "<span style='font-size:22pt'>" + str + "</span>"
|
||||
#define span_cascade(str) ("<span style='font-size:22pt'>" + str + "</span>")
|
||||
|
||||
/* Style spans */
|
||||
// text style only
|
||||
|
||||
@@ -106,7 +106,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
/// Return a list containing the backup data if they were loaded from the database backup json
|
||||
/proc/load_admin_ranks(dbfail, no_update)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin Reload blocked: Advanced ProcCall detected.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Admin Reload blocked: Advanced ProcCall detected."), confidential = TRUE)
|
||||
return
|
||||
GLOB.admin_ranks.Cut()
|
||||
GLOB.protected_ranks.Cut()
|
||||
@@ -303,7 +303,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
set waitfor = FALSE
|
||||
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin rank DB Sync blocked: Advanced ProcCall detected.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Admin rank DB Sync blocked: Advanced ProcCall detected."), confidential = TRUE)
|
||||
return
|
||||
|
||||
var/list/sql_ranks = list()
|
||||
@@ -347,7 +347,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
|
||||
/proc/sync_admins_with_db()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin rank DB Sync blocked: Advanced ProcCall detected.</span>")
|
||||
to_chat(usr, span_adminprefix("Admin rank DB Sync blocked: Advanced ProcCall detected."))
|
||||
return
|
||||
|
||||
if(CONFIG_GET(flag/admin_legacy_system) || !SSdbcore.IsConnected()) //we're already using legacy system so there's nothing to save
|
||||
@@ -364,7 +364,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
|
||||
/proc/save_admin_backup()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin rank DB Sync blocked: Advanced ProcCall detected.</span>")
|
||||
to_chat(usr, span_adminprefix("Admin rank DB Sync blocked: Advanced ProcCall detected."))
|
||||
return
|
||||
|
||||
if(CONFIG_GET(flag/admin_legacy_system)) //we're already using legacy system so there's nothing to save
|
||||
|
||||
@@ -232,7 +232,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
return TRUE
|
||||
else
|
||||
if(show_msg)
|
||||
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>", confidential = TRUE)
|
||||
to_chat(usr, span_red("Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")]."), confidential = TRUE)
|
||||
return FALSE
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
log_admin("[key_name(usr)] attempted to edit admin permissions without sufficient rights.")
|
||||
return
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin Edit blocked: Advanced ProcCall detected.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Admin Edit blocked: Advanced ProcCall detected."), confidential = TRUE)
|
||||
return
|
||||
var/datum/asset/permissions_assets = get_asset_datum(/datum/asset/simple/namespaced/common)
|
||||
permissions_assets.send(usr.client)
|
||||
@@ -161,14 +161,14 @@
|
||||
skip = TRUE
|
||||
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_admins) && task == "rank")
|
||||
if(admin_ckey in GLOB.protected_admins)
|
||||
to_chat(usr, "<span class='admin prefix'>Editing the rank of this admin is blocked by server configuration.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Editing the rank of this admin is blocked by server configuration."), confidential = TRUE)
|
||||
return
|
||||
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && task == "permissions")
|
||||
if((target_admin_datum.ranks & GLOB.protected_ranks).len > 0)
|
||||
to_chat(usr, "<span class='admin prefix'>Editing the flags of this rank is blocked by server configuration.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Editing the flags of this rank is blocked by server configuration."), confidential = TRUE)
|
||||
return
|
||||
if(CONFIG_GET(flag/load_legacy_ranks_only) && (task == "add" || task == "rank" || task == "permissions"))
|
||||
to_chat(usr, "<span class='admin prefix'>Database rank loading is disabled, only temporary changes can be made to a rank's permissions and permanently creating a new rank is blocked.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Database rank loading is disabled, only temporary changes can be made to a rank's permissions and permanently creating a new rank is blocked."), confidential = TRUE)
|
||||
legacy_only = TRUE
|
||||
//if(check_rights(R_DBRANKS, FALSE))
|
||||
if(!skip)
|
||||
@@ -504,13 +504,13 @@
|
||||
return
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
if(R.name == admin_rank && (!(R.rights & usr.client.holder.can_edit_rights_flags()) == R.rights))
|
||||
to_chat(usr, "<span class='admin prefix'>You don't have edit rights to all the rights this rank has, rank deletion not permitted.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("You don't have edit rights to all the rights this rank has, rank deletion not permitted."), confidential = TRUE)
|
||||
return
|
||||
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && (admin_rank in GLOB.protected_ranks))
|
||||
to_chat(usr, "<span class='admin prefix'>Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt."), confidential = TRUE)
|
||||
return
|
||||
if(CONFIG_GET(flag/load_legacy_ranks_only))
|
||||
to_chat(usr, "<span class='admin prefix'>Rank deletion not permitted while database rank loading is disabled.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_adminprefix("Rank deletion not permitted while database rank loading is disabled."), confidential = TRUE)
|
||||
return
|
||||
var/datum/db_query/query_admins_with_rank = SSdbcore.NewQuery(
|
||||
"SELECT 1 FROM [format_table_name("admin")] WHERE `rank` = :admin_rank",
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
if(holder && !holder.fakekey)
|
||||
ooc_style = "elevated"
|
||||
|
||||
if(check_rights(R_EVENT)) //Retired Admins
|
||||
if(check_rights(R_EVENT, FALSE)) //Retired Admins
|
||||
ooc_style = "event_manager"
|
||||
if(check_rights(R_ADMIN) && !(check_rights(R_BAN))) //Game Masters
|
||||
if(check_rights(R_ADMIN, FALSE) && !(check_rights(R_BAN, FALSE))) //Game Masters
|
||||
ooc_style = "moderator"
|
||||
if(check_rights(R_SERVER) && !(check_rights(R_BAN))) //Developers
|
||||
if(check_rights(R_SERVER, FALSE) && !(check_rights(R_BAN, FALSE))) //Developers
|
||||
ooc_style = "developer"
|
||||
if(check_rights(R_ADMIN) && check_rights(R_BAN)) //Admins
|
||||
if(check_rights(R_ADMIN, FALSE) && check_rights(R_BAN, FALSE)) //Admins
|
||||
ooc_style = "admin"
|
||||
|
||||
msg = GLOB.is_valid_url.Replace(msg,span_linkify("$1"))
|
||||
@@ -74,7 +74,7 @@
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
var/pref_color = prefs.read_preference(/datum/preference/color/ooc_color)
|
||||
if(holder && !holder.fakekey && (check_rights(R_ADMIN|R_FUN|R_EVENT)) && CONFIG_GET(flag/allow_admin_ooccolor) && pref_color != "#010000") // keeping this for the badmins
|
||||
if(holder && !holder.fakekey && (check_rights(R_ADMIN|R_FUN|R_EVENT, FALSE)) && CONFIG_GET(flag/allow_admin_ooccolor) && pref_color != "#010000") // keeping this for the badmins
|
||||
to_chat(target, span_ooc("<font color='[pref_color]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> [span_message(msg)]</font>"))
|
||||
else
|
||||
to_chat(target, span_ooc("<span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> " + span_message(msg)) + "</span>")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"sass-loader": "^16.0.3",
|
||||
"style-loader": "^4.0.0",
|
||||
"swc-loader": "^0.2.6",
|
||||
"tgui-core": "^1.8.1",
|
||||
"tgui-core": "^1.8.2",
|
||||
"typescript": "5.6.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.96.1",
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^1.8.1"
|
||||
"tgui-core": "^1.8.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^1.8.1",
|
||||
"tgui-core": "^1.8.2",
|
||||
"tgui-dev-server": "workspace:*",
|
||||
"tgui-polyfill": "workspace:*"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^1.8.1",
|
||||
"tgui-core": "^1.8.2",
|
||||
"tgui-polyfill": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-popper": "^2.3.0",
|
||||
"tgui-core": "^1.8.1",
|
||||
"tgui-core": "^1.8.2",
|
||||
"tgui-dev-server": "workspace:*",
|
||||
"tgui-polyfill": "workspace:*"
|
||||
}
|
||||
|
||||
653
tgui/yarn.lock
653
tgui/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user