commit
7058a9d61f
2 changed files with 24 additions and 12 deletions
|
|
@ -20,6 +20,8 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
|
||||||
namespace TShockAPI
|
namespace TShockAPI
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -52,17 +54,17 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The group that this group inherits permissions from.
|
/// The group that this group inherits permissions from.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Group Parent { get; set; }
|
public virtual Group Parent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The chat prefix for this group.
|
/// The chat prefix for this group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Prefix { get; set; }
|
public virtual string Prefix { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The chat suffix for this group.
|
/// The chat suffix for this group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Suffix { get; set; }
|
public virtual string Suffix { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the parent, not particularly sure why this is here.
|
/// The name of the parent, not particularly sure why this is here.
|
||||||
|
|
@ -164,6 +166,20 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte B = 255;
|
public byte B = 255;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Simplifies work with the <see cref="R"/>, <see cref="G"/>, <see cref="B"/> properties.
|
||||||
|
/// </summary>
|
||||||
|
public virtual Color Color
|
||||||
|
{
|
||||||
|
get => new Color(R, G, B);
|
||||||
|
set
|
||||||
|
{
|
||||||
|
R = value.R;
|
||||||
|
G = value.G;
|
||||||
|
B = value.B;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default group attributed to unregistered users.
|
/// The default group attributed to unregistered users.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -242,7 +258,7 @@ namespace TShockAPI
|
||||||
/// Adds a permission to the list of negated permissions.
|
/// Adds a permission to the list of negated permissions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="permission">The permission to negate.</param>
|
/// <param name="permission">The permission to negate.</param>
|
||||||
public void NegatePermission(string permission)
|
public virtual void NegatePermission(string permission)
|
||||||
{
|
{
|
||||||
// Avoid duplicates
|
// Avoid duplicates
|
||||||
if (!negatedpermissions.Contains(permission))
|
if (!negatedpermissions.Contains(permission))
|
||||||
|
|
@ -256,7 +272,7 @@ namespace TShockAPI
|
||||||
/// Adds a permission to the list of permissions.
|
/// Adds a permission to the list of permissions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="permission">The permission to add.</param>
|
/// <param name="permission">The permission to add.</param>
|
||||||
public void AddPermission(string permission)
|
public virtual void AddPermission(string permission)
|
||||||
{
|
{
|
||||||
if (permission.StartsWith("!"))
|
if (permission.StartsWith("!"))
|
||||||
{
|
{
|
||||||
|
|
@ -276,7 +292,7 @@ namespace TShockAPI
|
||||||
/// will parse "!permission" and add it to the negated permissions.
|
/// will parse "!permission" and add it to the negated permissions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="permission">The new list of permissions to associate with the group.</param>
|
/// <param name="permission">The new list of permissions to associate with the group.</param>
|
||||||
public void SetPermission(List<string> permission)
|
public virtual void SetPermission(List<string> permission)
|
||||||
{
|
{
|
||||||
permissions.Clear();
|
permissions.Clear();
|
||||||
negatedpermissions.Clear();
|
negatedpermissions.Clear();
|
||||||
|
|
@ -288,7 +304,7 @@ namespace TShockAPI
|
||||||
/// where "!permission" will remove a negated permission.
|
/// where "!permission" will remove a negated permission.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="permission"></param>
|
/// <param name="permission"></param>
|
||||||
public void RemovePermission(string permission)
|
public virtual void RemovePermission(string permission)
|
||||||
{
|
{
|
||||||
if (permission.StartsWith("!"))
|
if (permission.StartsWith("!"))
|
||||||
{
|
{
|
||||||
|
|
@ -302,7 +318,7 @@ namespace TShockAPI
|
||||||
/// Assigns all fields of this instance to another.
|
/// Assigns all fields of this instance to another.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="otherGroup">The other instance.</param>
|
/// <param name="otherGroup">The other instance.</param>
|
||||||
public void AssignTo(Group otherGroup)
|
public virtual void AssignTo(Group otherGroup)
|
||||||
{
|
{
|
||||||
otherGroup.Name = Name;
|
otherGroup.Name = Name;
|
||||||
otherGroup.Parent = Parent;
|
otherGroup.Parent = Parent;
|
||||||
|
|
|
||||||
|
|
@ -105,10 +105,6 @@ Use past tense when adding new entries; sign your name off when you add or chang
|
||||||
* Added a property `TSPlayer.Hostile`, which gets pvp player mode. (@AgaSpace)
|
* Added a property `TSPlayer.Hostile`, which gets pvp player mode. (@AgaSpace)
|
||||||
* Fixed bug where when the `UseSqlLogs` config property is true, an empty log file would still get created. (@ZakFahey)
|
* Fixed bug where when the `UseSqlLogs` config property is true, an empty log file would still get created. (@ZakFahey)
|
||||||
* Fixed typo in `/gbuff`. (@sgkoishi, #2955)
|
* Fixed typo in `/gbuff`. (@sgkoishi, #2955)
|
||||||
* Rewrote the `.dockerignore` file into a denylist. (@timschumi)
|
|
||||||
* Added CI for Docker images. (@timschumi)
|
|
||||||
* Fixed Cursed Flares kicking players for invalid buff. (@Arthri)
|
|
||||||
|
|
||||||
|
|
||||||
## TShock 5.2
|
## TShock 5.2
|
||||||
* An additional option `pvpwithnoteam` is added at `PvPMode` to enable PVP with no team. (@CelestialAnarchy, #2617, @ATFGK)
|
* An additional option `pvpwithnoteam` is added at `PvPMode` to enable PVP with no team. (@CelestialAnarchy, #2617, @ATFGK)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue