-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
24 changed files
with
126 additions
and
20 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...st.DiscordSignLogger/Rust.DiscordSignLogger/Configuration/PluginSupport/PluginSettings.cs
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,15 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Rust.SignLogger.Configuration.PluginSupport | ||
{ | ||
public class PluginSettings | ||
{ | ||
[JsonProperty("Sign Artist Settings")] | ||
public SignArtistSettings SignArtist { get; set; } | ||
|
||
public PluginSettings(PluginSettings settings) | ||
{ | ||
SignArtist = new SignArtistSettings(settings?.SignArtist); | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...iscordSignLogger/Rust.DiscordSignLogger/Configuration/PluginSupport/SignArtistSettings.cs
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,38 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Rust.SignLogger.Configuration.PluginSupport | ||
{ | ||
public class SignArtistSettings | ||
{ | ||
[JsonProperty("Log /sil")] | ||
public bool LogSil { get; set; } | ||
|
||
[JsonProperty("Log /sili")] | ||
public bool LogSili { get; set; } | ||
|
||
[JsonProperty("Log /silt")] | ||
public bool LogSilt { get; set; } | ||
|
||
public SignArtistSettings(SignArtistSettings settings) | ||
{ | ||
LogSil = settings?.LogSil ?? true; | ||
LogSili = settings?.LogSili ?? true; | ||
LogSilt = settings?.LogSilt ?? true; | ||
} | ||
|
||
public bool ShouldLog(string url) | ||
{ | ||
if (url.StartsWith("http://assets.imgix.net")) | ||
{ | ||
return LogSilt; | ||
} | ||
|
||
if (ItemManager.itemDictionaryByName.ContainsKey(url)) | ||
{ | ||
return LogSili; | ||
} | ||
|
||
return LogSil; | ||
} | ||
} | ||
} |
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
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