mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Updates the rules button and other interface buttons. (#18917)
the rules button now redirects to the rules page instead of using broken html --------- Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it> Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -250,6 +250,7 @@ GLOBAL_LIST_EMPTY(gamemode_cache)
|
||||
var/wikiurl
|
||||
var/forumurl
|
||||
var/forum_passphrase
|
||||
var/rulesurl
|
||||
var/githuburl
|
||||
|
||||
//Alert level description
|
||||
@@ -646,6 +647,9 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
|
||||
if ("forumurl")
|
||||
GLOB.config.forumurl = value
|
||||
|
||||
if ("rulesurl")
|
||||
GLOB.config.rulesurl = value
|
||||
|
||||
if ("forum_passphrase")
|
||||
GLOB.config.forum_passphrase = value
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ GUEST_BAN
|
||||
## GitHub address
|
||||
# GITHUBURL https://github.com/example-user/example-repository
|
||||
|
||||
## Rules address
|
||||
# RULESURL https://aurorastation.org/rules.html
|
||||
|
||||
## Ban appeals URL - usually for a forum or wherever people should go to contact your admins.
|
||||
# BANAPPEALS http://example.com
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: MattAtlas
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- qol: "The rules button now directly links to the rules page."
|
||||
- qol: "TGUIfied the interface button alerts."
|
||||
+15
-10
@@ -5,7 +5,7 @@
|
||||
set hidden = 1
|
||||
|
||||
if(GLOB.config.wikiurl)
|
||||
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
if(tgui_alert(usr, "This will open the wiki in your browser. Are you sure?", "Wiki", list("Yes", "No")) == "No")
|
||||
return
|
||||
|
||||
var/to_open = GLOB.config.wikiurl
|
||||
@@ -20,8 +20,8 @@
|
||||
set name = "forum"
|
||||
set desc = "Visit the forum."
|
||||
set hidden = 1
|
||||
if( GLOB.config.forumurl )
|
||||
if(alert("This will open the forum in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
if(GLOB.config.forumurl)
|
||||
if(tgui_alert(usr, "This will open the forum in your browser. Are you sure?", "Forum", list("Yes", "No")) == "No")
|
||||
return
|
||||
send_link(src, GLOB.config.forumurl)
|
||||
else
|
||||
@@ -32,22 +32,27 @@
|
||||
set name = "reportbug"
|
||||
set desc = "Report a bug."
|
||||
set hidden = 1
|
||||
if( GLOB.config.githuburl )
|
||||
if(alert("This will open the issue tracker in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
|
||||
if(GLOB.config.githuburl)
|
||||
if(tgui_alert(usr, "This will open the issue tracker in your browser. Are you sure?", "Issue Tracker", list("Yes", "No")) == "No")
|
||||
return
|
||||
send_link(src, GLOB.config.githuburl + "/issues")
|
||||
else
|
||||
to_chat(src, SPAN_WARNING("The issue tracker URL is not set in the server configuration."))
|
||||
return
|
||||
|
||||
#define RULES_FILE "config/rules.html"
|
||||
/client/verb/rules()
|
||||
set name = "Rules"
|
||||
set desc = "Show Server Rules."
|
||||
set hidden = 1
|
||||
|
||||
src << browse(file2text(RULES_FILE), "window=rules;size=640x500")
|
||||
#undef RULES_FILE
|
||||
if(GLOB.config.rulesurl)
|
||||
if(tgui_alert(usr, "This will open the rules in your browser. Are you sure?", "Rules", list("Yes", "No")) == "No")
|
||||
return
|
||||
send_link(src, GLOB.config.rulesurl)
|
||||
else
|
||||
to_chat(src, SPAN_WARNING("The rules URL is not set in the server configuration."))
|
||||
return
|
||||
|
||||
/client/verb/hotkeys_help()
|
||||
set name = "hotkeys-help"
|
||||
@@ -179,7 +184,7 @@ Any-Mode: (hotkey doesn't need to be on)
|
||||
set hidden = 1
|
||||
|
||||
if (GLOB.config.webint_url)
|
||||
if(alert("This will open the web interface in your browser. Are you sure?", ,"Yes","No") == "No")
|
||||
if(tgui_alert(usr, "This will open the Web Interface in your browser. Are you sure?", "Web Interface", list("Yes", "No")) == "No")
|
||||
return
|
||||
send_link(src, GLOB.config.webint_url)
|
||||
else
|
||||
@@ -192,7 +197,7 @@ Any-Mode: (hotkey doesn't need to be on)
|
||||
set hidden = 1
|
||||
|
||||
if (SSdiscord && SSdiscord.active)
|
||||
if(alert("This will open Discord in your browser or directly. Are you sure?",, "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "This will open Discord in your browser. Are you sure?", "Discord", list("Yes", "No")) == "No")
|
||||
var/url_link = SSdiscord.retreive_invite()
|
||||
if (url_link)
|
||||
send_link(src, url_link)
|
||||
|
||||
Reference in New Issue
Block a user