[MIRROR] Support button (#6968)

Co-authored-by: Casey <a.roaming.shadow@gmail.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
CHOMPStation2
2023-09-21 22:57:21 -07:00
committed by GitHub
parent 773ad41465
commit 911f1990fa
3 changed files with 30 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ var/list/gamemode_cache = list()
var/static/discordurl var/static/discordurl
var/static/rulesurl var/static/rulesurl
var/static/mapurl var/static/mapurl
var/static/patreonurl
//Alert level description //Alert level description
var/static/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." var/static/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
@@ -556,7 +557,10 @@ var/list/gamemode_cache = list()
if ("discordurl") if ("discordurl")
config.discordurl = value config.discordurl = value
if ("patreonurl")
config.patreonurl = value
if ("guest_jobban") if ("guest_jobban")
config.guest_jobban = 1 config.guest_jobban = 1

View File

@@ -80,6 +80,19 @@
to_chat(src, "<span class='danger'>The Discord URL is not set in the server configuration.</span>") to_chat(src, "<span class='danger'>The Discord URL is not set in the server configuration.</span>")
return return
/client/verb/patreon()
set name = "Patreon"
set desc = "Visit the patreon"
set hidden = 1
if(config.patreonurl)
if(tgui_alert(usr, "This will open the Patreon in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
return
src << link(config.patreonurl)
else
to_chat(src, "<span class='danger'>The Patreon URL is not set in the server configuration.</span>")
return
/client/verb/hotkeys_help() /client/verb/hotkeys_help()
set name = "hotkeys-help" set name = "hotkeys-help"
set category = "OOC" set category = "OOC"

View File

@@ -1337,6 +1337,18 @@ window "rpane"
saved-params = "splitter" saved-params = "splitter"
right = "outputwindow" right = "outputwindow"
is-vert = false is-vert = false
elem "patreon"
type = BUTTON
pos = 488,0
size = 60x16
anchor1 = -1,-1
anchor2 = -1,-1
background-color = '#005813'
text-color = #FFFFFF
saved-params = "is-checked"
text = "Patreon"
command = "patreon"
group = "rpanemode"
elem "discord" elem "discord"
type = BUTTON type = BUTTON
pos = 428,0 pos = 428,0