Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions code/controllers/configuration/entries/~crimson.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 -------------

Expand Down
33 changes: 33 additions & 0 deletions code/modules/escape_menu/home_page.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
-360,
-420,
-480,
-540, // CRIMSON EDIT ADD - Discord and Webmap
-600, // CRIMSON EDIT ADD - Discord and Webmap
)
resource_panels = list()

Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions config/crimson/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/
18 changes: 18 additions & 0 deletions interface/interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading