diff --git a/code/controllers/configuration/entries/~crimson.dm b/code/controllers/configuration/entries/~crimson.dm index e7d1aa09785c..d47298ff253b 100644 --- a/code/controllers/configuration/entries/~crimson.dm +++ b/code/controllers/configuration/entries/~crimson.dm @@ -9,6 +9,12 @@ /datum/config_entry/number/extra_save_slots_donator default = 10 +/datum/config_entry/string/discordurl + default = "https://discord.gg/qezxHW6xS" + +/datum/config_entry/string/webmapurl + default = "https://maps.crimson-grid.city/" + // ------------- dbconfig.txt ------------- diff --git a/code/modules/escape_menu/home_page.dm b/code/modules/escape_menu/home_page.dm index aead9cc8d513..38639826f7d6 100644 --- a/code/modules/escape_menu/home_page.dm +++ b/code/modules/escape_menu/home_page.dm @@ -101,6 +101,8 @@ -360, -420, -480, + -540, // CRIMSON EDIT ADD - Discord and Webmap + -600, // CRIMSON EDIT ADD - Discord and Webmap ) resource_panels = list() @@ -195,6 +197,37 @@ /* button_overlay = */ "changelog", /* end_point */ offset_order[1], )) + offset_order -= offset_order[1] + + // CRIMSON EDIT ADD - Discord and Webmap + var/discordurl = CONFIG_GET(string/discordurl) + if(discordurl) + resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible( + null, + /* hud_owner = */ null, + "Discord", + "Join the server's discord", + /* button_screen_loc */ "BOTTOM:30,RIGHT:-20", + CALLBACK(client, TYPE_VERB_REF(/client, discord)), + /* button_overlay = */ "discord", + /* end_point */ offset_order[1], + )) + offset_order -= offset_order[1] + + var/webmapurl = CONFIG_GET(string/webmapurl) + if(webmapurl) + resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible( + null, + /* hud_owner = */ null, + "Webmap", + "View the server's webmap", + /* button_screen_loc */ "BOTTOM:30,RIGHT:-20", + CALLBACK(client, TYPE_VERB_REF(/client, webmap)), + /* button_overlay = */ "webmap", + /* end_point */ offset_order[1], + )) + offset_order -= offset_order[1] + // CRIMSON EDIT ADD END - Discord and Webmap /datum/escape_menu/proc/home_resume() qdel(src) diff --git a/config/crimson/config.txt b/config/crimson/config.txt index 5b14603a1ae2..1a92b15cdff5 100644 --- a/config/crimson/config.txt +++ b/config/crimson/config.txt @@ -7,3 +7,10 @@ $include plexora.txt ## For easy embedding links for restricted feature notices. #PATREON_LINK https://www.patreon.com/dukeook #TWITCH_LINK https://www.twitch.tv/thedukeofook + + +## Discord URL +#DISCORDURL https://discord.gg/qezxHW6xS + +## Github address +#WEBMAP https://maps.crimson-grid.city/ diff --git a/interface/interface.dm b/interface/interface.dm index 8c8c102d97d2..0e41cb5d63d2 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -144,3 +144,21 @@ GAME_VERB_HIDDEN(/client, emote_panel, "Emote Panel") if(!GLOB.emote_panel) GLOB.emote_panel = new /datum/emote_panel() GLOB.emote_panel.ui_interact(mob) + +// CRIMSON EDIT ADD - Discord and Webmap +GAME_VERB_HIDDEN(/client, discord, "discord") + + var/discordurl = CONFIG_GET(string/discordurl) + if(!discordurl) + to_chat(src, span_danger("The Discord URL is not set in the server configuration.")) + return + DIRECT_OUTPUT(src, link(discordurl)) + +GAME_VERB_HIDDEN(/client, webmap, "webmap") + + var/webmapurl = CONFIG_GET(string/webmapurl) + if(!webmapurl) + to_chat(src, span_danger("The Webmap URL is not set in the server configuration.")) + return + DIRECT_OUTPUT(src, link(webmapurl)) +// CRIMSON EDIT ADD END - Discord and Webmap