forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a4a212
commit 1cdbdd5
Showing
11 changed files
with
109 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/datum/config_entry/number/force_verification | ||
default = null | ||
min_val = 0 |
1 change: 1 addition & 0 deletions
1
massmeta/interface/interface.dm → ...ures/discord_verification/code/discord.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
massmeta/features/discord_verification/code/master_new_player.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//ORIGINAL FILE: code/_onclick/hud/new_player.dm | ||
/atom/movable/screen/lobby/button | ||
var/requires_discord = TRUE | ||
|
||
/atom/movable/screen/lobby/button/Click(location, control, params) | ||
var/force_verification = CONFIG_GET(number/force_verification) | ||
var/discord = SSdiscord.lookup_id(usr.ckey) | ||
if (force_verification && !discord && requires_discord) | ||
if(tgui_alert(usr, "Для игры на сервере МассМета нужен привязанный аккаунт дискорда(OOC → Verify Discord). Желаете ли Вы открыть ссылку в браузере?",, list("Да","Нет"))!="Да") | ||
return | ||
DIRECT_OUTPUT(usr, link("https://discord.gg/WRJ8bns7X7")) //прямая ссылка в канал верификации | ||
else | ||
if(owner != REF(usr)) | ||
return | ||
|
||
if(!usr.client || usr.client.interviewee) | ||
return | ||
|
||
. = ..() | ||
|
||
if(!enabled) | ||
return | ||
flick("[base_icon_state]_pressed", src) | ||
update_appearance(UPDATE_ICON) | ||
return TRUE | ||
|
||
/atom/movable/screen/lobby/button/bottom/settings | ||
requires_discord = FALSE | ||
|
||
/atom/movable/screen/lobby/button/bottom/changelog_button | ||
requires_discord = FALSE | ||
|
||
/atom/movable/screen/lobby/button/collapse | ||
requires_discord = FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "code\config_force.dm" | ||
#include "code\discord.dm" | ||
#include "code\master_new_player.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Module ID: discord_verification | ||
|
||
### Description: | ||
|
||
Принудительная привязка Discord аккаунта к Byond аккунту для игры на сервере. | ||
|
||
### TG Proc/File Changes: | ||
|
||
- interface/skin.dmf | ||
- code/modules/discord/accountlink.dm | ||
- добавлен FORCE_VERIFICATION в config/config.txt | ||
|
||
|
||
|
||
### Modular Overrides: | ||
|
||
- code/_onclick/hud/new_player.dm | ||
|
||
|
||
### Defines: | ||
|
||
- N/A | ||
|
||
|
||
### TGUI Files: | ||
|
||
- N/A | ||
|
||
|
||
### Credits: | ||
|
||
- Huz2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters