-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): Standarize Config files
* feat(config): Standarize Config files * Fix(linting): Use Config variable * camalCase * camalCase V2
- Loading branch information
Showing
22 changed files
with
340 additions
and
269 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
local maxPlayers = GlobalState.MaxPlayers | ||
local discord = require 'config.client'.Discord | ||
|
||
AddStateBagChangeHandler('PlayerCount', nil, function(bagName, _, value) | ||
if bagName ~= 'global' or not value then return end | ||
local players = 'Players %s/' .. Config.MaxPlayers | ||
SetRichPresence((players):format(value)) | ||
if bagName == 'global' and value then | ||
local players = 'Players %s/' .. maxPlayers | ||
SetRichPresence((players):format(value)) | ||
end | ||
end) | ||
|
||
SetDiscordAppId(Config.Discord.AppId) | ||
SetDiscordRichPresenceAsset(Config.Discord.LargeIcon.icon) | ||
SetDiscordRichPresenceAssetText(Config.Discord.LargeIcon.text) | ||
SetDiscordRichPresenceAssetSmall(Config.Discord.SmallIcon.icon) | ||
SetDiscordRichPresenceAssetSmallText(Config.Discord.SmallIcon.text) | ||
SetDiscordRichPresenceAction(0, Config.Discord.FirstButton.text, Config.Discord.FirstButton.link) | ||
SetDiscordRichPresenceAction(1, Config.Discord.SecondButton.text, Config.Discord.SecondButton.link) | ||
SetDiscordAppId(discord.AppId) | ||
SetDiscordRichPresenceAsset(discord.LargeIcon.icon) | ||
SetDiscordRichPresenceAssetText(discord.LargeIcon.text) | ||
SetDiscordRichPresenceAssetSmall(discord.SmallIcon.icon) | ||
SetDiscordRichPresenceAssetSmallText(discord.SmallIcon.text) | ||
SetDiscordRichPresenceAction(0, discord.FirstButton.text, discord.FirstButton.link) | ||
SetDiscordRichPresenceAction(1, discord.SecondButton.text, discord.SecondButton.link) |
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
Oops, something went wrong.