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
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
113 changes: 63 additions & 50 deletions Config.cs
Original file line number Diff line number Diff line change
@@ -1,69 +1,82 @@
// -----------------------------------------------------------------------
// <copyright file="Config.cs" company="Skyfr0676 and Redforce04">
// Copyright (c) Skyfr0676 and Redforce04. All rights reserved.
// Licensed under the Undetermined license.
// </copyright>
// -----------------------------------------------------------------------

namespace SSMenuSystem;

using System.ComponentModel;
using SSMenuSystem.Features;

#if EXILED
using Exiled.API.Interfaces;
#endif
using Features;

namespace SSMenuSystem
{
/// <inheritdoc cref="IConfig"/>
public class Config
/// <inheritdoc cref="IConfig"/>
// ReSharper disable UnusedAutoPropertyAccessor.Global
public class Config
#if EXILED
: IConfig
: IConfig
#endif
{
/// <inheritdoc/>
public bool IsEnabled { get; set; } = true;
{
/// <summary>
/// Gets or sets a value indicating whether the plugin should be enabled.
/// </summary>
public bool IsEnabled { get; set; } = true;

/// <inheritdoc/>
public bool Debug { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the plugin should display debugging logs.
/// </summary>
public bool Debug { get; set; }

/// <summary>
/// Gets or sets a value indicating whether pins is allowed or not (pin is a thing that has been displayed on all menus).
/// </summary>
[Description("Whether pins is allowed or not (pin is a thing that has been displayed on all menus).")]
public bool AllowPinnedContent { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether pins is allowed or not (pin is a thing that has been displayed on all menus).
/// </summary>
[Description("Whether pins is allowed or not (pin is a thing that has been displayed on all menus).")]
public bool AllowPinnedContent { get; set; } = true;

/// <summary>
/// Gets or sets a value indicating whether clients (= non-moderators) whould see errors or not.
/// </summary>
[Description("Whether clients (= non-moderators) whould see errors or not.")]
public bool ShowErrorToClient { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether clients (= non-moderators) should see errors or not.
/// </summary>
[Description("Whether clients (= non-moderators) should see errors or not.")]
public bool ShowErrorToClient { get; set; } = true;

/// <summary>
/// Gets or sets a value indicating whether clients (= non-moderators) whould see total errors (= some plugins-content name) or not. HIGLY UNRECOMMENDED TO SET TRUE.
/// </summary>
[Description("Whether clients (= non-moderators) whould see total errors (= some plugins-content name) or not. HIGLY UNRECOMMENDED TO SET TRUE.")]
public bool ShowFullErrorToClient { get; set; } = false;
/// <summary>
/// Gets or sets a value indicating whether clients (= non-moderators) should see total errors (= some plugins-content name) or not. It is advised to leave this as false.
/// </summary>
[Description("Whether clients (= non-moderators) should see total errors (= some plugins-content name) or not. It is advised to leave this as false.")]
public bool ShowFullErrorToClient { get; set; } = false;

/// <summary>
/// Gets or sets a value indicating whether moderators (= has RA access) whould see total errors (= some plugins-content name).
/// </summary>
[Description("Whether moderators (= has RA access) whould see total errors (= some plugins-content name).")]
public bool ShowFullErrorToModerators { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether moderators (= has RA access) should see total errors (= some plugins-content name).
/// </summary>
[Description("Whether moderators (= has RA access) should see total errors (= some plugins-content name).")]
public bool ShowFullErrorToModerators { get; set; } = true;

/// <summary>
/// If there is only one menu registered and this set to false, this menu would be automatiquely displayed.
/// </summary>
[Description("If there is only one menu registered and this set to false, this menu would be automatiquely displayed.")]
public bool ForceMainMenuEvenIfOnlyOne { get; set; }
/// <summary>
/// Gets or sets a value indicating whether singularly registered menus should be automatically shown.
/// </summary>
[Description("Indicates whether singularly registered menus should be automatically shown.")]
public bool ForceMainMenuEvenIfOnlyOne { get; set; }

/// <summary>
/// Gets or sets a value indicating whether examples is enabled. Warning: if set to true, some content of examples would be Game breaking (speed ability, scan ability, etc...)
/// </summary>
[Description("Whether examples is enabled. Warning: if set to true, some content of examples would be Game breaking (speed ability, scan ability, etc...).")]
public bool EnableExamples { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether examples is enabled. Warning: if set to true, some content of examples would be Game breaking (speed ability, scan ability, etc...)
/// </summary>
[Description("Whether examples is enabled. Warning: if set to true, some content of examples would be Game breaking (speed ability, scan ability, etc...).")]
public bool EnableExamples { get; set; } = true;

/// <summary>
/// The comptability system config.
/// </summary>
public ComptabilityConfig ComptabilitySystem { get; set; } = new();
/// <summary>
/// Gets or sets the compatibility system config.
/// </summary>
public CompatibilityConfig CompatibilitySystem { get; set; } = new ();

#if !EXILED
/// <summary>
/// Plugin translations.
/// </summary>
public Translation Translation { get; set; } = new();
/// <summary>
/// Gets or sets the plugin's translations.
/// </summary>
[Description("Translations for the plugin.")]
public Translation Translation { get; set; } = new ();
#endif
}
}
66 changes: 36 additions & 30 deletions Configs/GroupHeader.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
namespace SSMenuSystem.Configs
// -----------------------------------------------------------------------
// <copyright file="GroupHeader.cs" company="Skyfr0676 and Redforce04">
// Copyright (c) Skyfr0676 and Redforce04. All rights reserved.
// Licensed under the Undetermined license.
// </copyright>
// -----------------------------------------------------------------------

namespace SSMenuSystem.Configs;

/// <summary>
/// Button labels config.
/// </summary>
public class GroupHeader
{
/// <summary>
/// Button labels config.
/// Initializes a new instance of the <see cref="GroupHeader"/> class.
/// </summary>
public class GroupHeader
/// <param name="label">the label text.</param>
/// <param name="hint">the button text.</param>
public GroupHeader(string label, string? hint)
{
/// <summary>
/// The label of button (displayed at the left).
/// </summary>
public string Label { get; set; }
this.Label = label;
this.Hint = hint ?? "MISSING_HINT";
}

/// <summary>
/// The Button content (displayed on the button).
/// </summary>
public string Hint { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="GroupHeader"/> class.
/// </summary>
public GroupHeader()
{
this.Label = "MISSING_LABEL";
this.Hint = "MISSING_HINT";
}

/// <summary>
/// Initialize a new instance of <see cref="LabelButton"/>
/// </summary>
/// <param name="label">the label text.</param>
/// <param name="hint">the button text.</param>
public GroupHeader(string label, string hint)
{
Label = label;
Hint = hint;
}
/// <summary>
/// Gets or sets the label of button (displayed at the left).
/// </summary>
public string Label { get; set; }

/// <summary>
/// Default constructor of <see cref="LabelButton"/>.
/// </summary>
public GroupHeader()
{
Label = "MISSING_LABEL";
Hint = "MISSING_HINT";
}
}
/// <summary>
/// Gets or sets the Button content (displayed on the button).
/// </summary>
public string Hint { get; set; }
}
66 changes: 36 additions & 30 deletions Configs/LabelButton.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
namespace SSMenuSystem.Configs
// -----------------------------------------------------------------------
// <copyright file="LabelButton.cs" company="Skyfr0676 and Redforce04">
// Copyright (c) Skyfr0676 and Redforce04. All rights reserved.
// Licensed under the Undetermined license.
// </copyright>
// -----------------------------------------------------------------------

namespace SSMenuSystem.Configs;

/// <summary>
/// Button labels config.
/// </summary>
public class LabelButton
{
/// <summary>
/// Button labels config.
/// Initializes a new instance of the <see cref="LabelButton"/> class.
/// </summary>
public class LabelButton
/// <param name="label">the label text.</param>
/// <param name="buttonText">the button text.</param>
public LabelButton(string label, string buttonText)
{
/// <summary>
/// The label of button (displayed at the left).
/// </summary>
public string Label { get; set; }
this.Label = label;
this.ButtonText = buttonText;
}

/// <summary>
/// The Button content (displayed on the button).
/// </summary>
public string ButtonText { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="LabelButton"/> class.
/// </summary>
public LabelButton()
{
this.Label = "MISSING_LABEL";
this.ButtonText = "MISSING_VALUE";
}

/// <summary>
/// Initialize a new instance of <see cref="LabelButton"/>
/// </summary>
/// <param name="label">the label text.</param>
/// <param name="buttonText">the button text.</param>
public LabelButton(string label, string buttonText)
{
Label = label;
ButtonText = buttonText;
}
/// <summary>
/// Gets or sets the label of button (displayed at the left).
/// </summary>
public string Label { get; set; }

/// <summary>
/// Default constructor of <see cref="LabelButton"/>.
/// </summary>
public LabelButton()
{
Label = "MISSING_LABEL";
ButtonText = "MISSING_VALUE";
}
}
/// <summary>
/// Gets or sets the Button content (displayed on the button).
/// </summary>
public string ButtonText { get; set; }
}
7 changes: 0 additions & 7 deletions Directory.Build.props

This file was deleted.

Loading