did a debug session and fixed some errors
This commit is contained in:
parent
273615f738
commit
f5723ee834
3 changed files with 9 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ namespace TShockAPI
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasPermission(string permission)
|
public virtual bool HasPermission(string permission)
|
||||||
{
|
{
|
||||||
if (negatedPermissions.Contains(permission))
|
if (negatedPermissions.Contains(permission))
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +62,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
new public bool HasPermission(string permission)
|
new public virtual bool HasPermission(string permission)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
static TShock()
|
static TShock()
|
||||||
{
|
{
|
||||||
|
Tools.LoadGroups();
|
||||||
#region Blacklisted tiles
|
#region Blacklisted tiles
|
||||||
|
|
||||||
BlacklistTiles = new bool[0x80];
|
BlacklistTiles = new bool[0x80];
|
||||||
|
|
|
||||||
|
|
@ -319,18 +319,22 @@ namespace TShockAPI
|
||||||
tr.Close();
|
tr.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void LoadGroups()
|
public static void LoadGroups()
|
||||||
{
|
{
|
||||||
groups = new List<Group>();
|
groups = new List<Group>();
|
||||||
groups.Add(new SuperAdminGroup("superadmin"));
|
groups.Add(new SuperAdminGroup("superadmin"));
|
||||||
|
|
||||||
StreamReader sr = new StreamReader(FileTools.SaveDir + "groups.txt");
|
StreamReader sr = new StreamReader(FileTools.SaveDir + "groups.txt");
|
||||||
string data = sr.ReadToEnd();
|
string data = sr.ReadToEnd();
|
||||||
data = data.Replace('\r', new char());
|
data = data.Replace("\r", "");
|
||||||
string[] lines = data.Split('\n');
|
string[] lines = data.Split('\n');
|
||||||
|
|
||||||
for (int i = 0; i < lines.Length; i++)
|
for (int i = 0; i < lines.Length; i++)
|
||||||
{
|
{
|
||||||
|
if (lines[i].StartsWith("#"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
string[] args = lines[i].Split(' ');
|
string[] args = lines[i].Split(' ');
|
||||||
string name = args[0];
|
string name = args[0];
|
||||||
string parent = args[1];
|
string parent = args[1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue