diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index ca7bdbf5a743..00a7fd0fccd6 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -131,8 +131,11 @@ SUBSYSTEM_DEF(ticker) window_flash(C, ignorepref = TRUE) //let them know lobby has opened up. to_chat(world, span_notice("Welcome to [station_name()]!")) for(var/channel_tag in CONFIG_GET(str_list/channel_announce_new_game)) - send2chat(new /datum/tgs_message_content("New round starting on [SSmapping.current_map.map_name]!"), channel_tag) - + if(SSticker.GetTimeLeft() == -10) // APOC EDIT CHANGE START - DISCORD + send2chat(new /datum/tgs_message_content("New round delayed. Thanks for playing [CONFIG_GET(string/servername)]"), channel_tag) // APOC EDIT CHANGE + else + send2chat(new /datum/tgs_message_content("<@&1474327242510303336> New round starting on [station_name()]!"), channel_tag) + // APOC EDIT CHANGE END current_state = GAME_STATE_PREGAME SEND_SIGNAL(src, COMSIG_TICKER_ENTER_PREGAME) fire() diff --git a/modular_zapoc/master_files/code/controllers/configuration/entries/general.dm b/modular_zapoc/master_files/code/controllers/configuration/entries/general.dm new file mode 100644 index 000000000000..9ec94fb94c4f --- /dev/null +++ b/modular_zapoc/master_files/code/controllers/configuration/entries/general.dm @@ -0,0 +1,2 @@ +/datum/config_entry/string/bite_img_list + config_entry_value = "No bites for you." diff --git a/modular_zapoc/master_files/code/modules/discord/tgs_commands.dm b/modular_zapoc/master_files/code/modules/discord/tgs_commands.dm new file mode 100644 index 000000000000..96ebf4afd718 --- /dev/null +++ b/modular_zapoc/master_files/code/modules/discord/tgs_commands.dm @@ -0,0 +1,32 @@ +/datum/tgs_chat_command/tgscheck/Run(datum/tgs_chat_user/sender, params) + var/server = CONFIG_GET(string/public_address) || CONFIG_GET(string/server) + var/round_status + var/timeleft = SSticker.GetTimeLeft() + + switch(SSticker.current_state) + if(GAME_STATE_STARTUP) + round_status = "Round Initializing" + if(GAME_STATE_PREGAME) + round_status = "Pre-Game" + if(GAME_STATE_SETTING_UP) + round_status = "Round Starting" + if(GAME_STATE_PLAYING) + round_status = "Active -- Join now!" + if(GAME_STATE_FINISHED) + round_status = "Round Restarting" + + if(timeleft == -10) + round_status = "Round Delayed -- Thanks for playing!" + + return new /datum/tgs_message_content("[GLOB.round_id ? "Round #[GLOB.round_id] ([round_timestamp()]): " : "([round_timestamp()]): "]Players: [length(GLOB.clients)] (Active: [get_active_player_count(0,1,0)]), Map: [station_name()], [round_status] -- [server]") + +/datum/tgs_chat_command/fangfuckies // Friend + name = "fangfuckies" + help_text = "Posts a random biting gif (0.1% chance for an ultra-rare bonus gif.)" + +/datum/tgs_chat_command/fangfuckies/Run(datum/tgs_chat_user/sender, params) + var/random_image = splittext(CONFIG_GET(string/bite_img_list), ", ") // comma + space delimiter + if(prob(0.1)) + return new /datum/tgs_message_content("https://images2.imgbox.com/de/57/LouUHBzY_o.gif") // sneefer + + return new /datum/tgs_message_content("[pick(random_image)]") diff --git a/tgstation.dme b/tgstation.dme index bd9685e2cd9b..2da6c85f280b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8134,7 +8134,9 @@ #include "modular_darkpack\modules\z_travel\code\helpers.dm" #include "modular_darkpack\modules\z_travel\code\manhole.dm" #include "modular_darkpack\modules\z_travel\code\transfer_point.dm" +#include "modular_zapoc\master_files\code\controllers\configuration\entries\general.dm" #include "modular_zapoc\master_files\code\game\objects\structures\stairs.dm" +#include "modular_zapoc\master_files\code\modules\discord\tgs_commands.dm" #include "modular_zapoc\modules\areas\code\areas.dm" #include "modular_zapoc\modules\areas\code\voivodate.dm" #include "modular_zapoc\modules\areas\code\western_eye.dm"