=Bug Fixes
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
@@ -73,14 +73,18 @@ public class CommandBlurry extends Command
|
|||||||
{
|
{
|
||||||
BufferedImage blurred = ImageUtils.copyImage(image);
|
BufferedImage blurred = ImageUtils.copyImage(image);
|
||||||
// Iterate over each column left to right and touch up each pixel
|
// Iterate over each column left to right and touch up each pixel
|
||||||
for(int x = 0; x < image.getWidth(); ++x)
|
for(int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
for(int y = 0; y < image.getHeight(); ++y)
|
for(int x = 0; x < image.getWidth(); ++x)
|
||||||
{
|
{
|
||||||
blurred.setRGB(x, y, getColorAvg(image, x, y).getRGB());
|
for(int y = 0; y < image.getHeight(); ++y)
|
||||||
|
{
|
||||||
|
blurred.setRGB(x, y, getColorAvg(image, x, y).getRGB());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
image = blurred;
|
||||||
}
|
}
|
||||||
image = ImageUtils.copyImage(blurred);
|
|
||||||
|
|
||||||
File outputfile = new File(name);
|
File outputfile = new File(name);
|
||||||
ImageIO.write(blurred, "png", outputfile);
|
ImageIO.write(blurred, "png", outputfile);
|
||||||
@@ -93,12 +97,16 @@ public class CommandBlurry extends Command
|
|||||||
float g = 0;
|
float g = 0;
|
||||||
float b = 0;
|
float b = 0;
|
||||||
|
|
||||||
|
|
||||||
for(int xCor = -2; xCor <= 2; xCor++)
|
for(int xCor = -2; xCor <= 2; xCor++)
|
||||||
{
|
{
|
||||||
for(int yCor = -2; yCor <= 2; yCor++)
|
for(int yCor = -2; yCor <= 2; yCor++)
|
||||||
{
|
{
|
||||||
current = new Color(image.getRGB(clamp(x + xCor, 0, image.getWidth() - 1), clamp(y + yCor, 0, image.getHeight() - 1)));
|
int curX = clamp(x + xCor, 0, image.getWidth() - 1);
|
||||||
|
int curY = clamp(y + yCor, 0, image.getHeight() - 1);
|
||||||
|
|
||||||
|
|
||||||
|
current = new Color(image.getRGB(curX, curY));
|
||||||
|
|
||||||
r += getGaus(current.getRed(), xCor, yCor);
|
r += getGaus(current.getRed(), xCor, yCor);
|
||||||
g += getGaus(current.getGreen(), xCor, yCor);
|
g += getGaus(current.getGreen(), xCor, yCor);
|
||||||
b += getGaus(current.getBlue(), xCor, yCor);
|
b += getGaus(current.getBlue(), xCor, yCor);
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ public class CommandRoll extends Command
|
|||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
rolls = roll(first, second);
|
rolls = roll(first, second);
|
||||||
System.out.println(first);
|
|
||||||
for(int i= 0; i < first; i++)
|
for(int i= 0; i < first; i++)
|
||||||
{
|
{
|
||||||
value += rolls[i];
|
value += rolls[i];
|
||||||
@@ -177,7 +176,7 @@ public class CommandRoll extends Command
|
|||||||
int [] rolls = new int [sides];
|
int [] rolls = new int [sides];
|
||||||
|
|
||||||
if(dice < 1)
|
if(dice < 1)
|
||||||
return new int[0];
|
return new int[0];
|
||||||
for(int i = 0; dice > i; i ++)
|
for(int i = 0; dice > i; i ++)
|
||||||
{
|
{
|
||||||
roll = (int)(Math.random() * sides) + 1;
|
roll = (int)(Math.random() * sides) + 1;
|
||||||
|
|||||||
@@ -16,22 +16,29 @@ public class SubCommandAdd extends SubCommand
|
|||||||
@Override
|
@Override
|
||||||
public SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input)
|
public SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input)
|
||||||
{
|
{
|
||||||
String role = input.args.split(" ")[0];
|
String [] roles = input.args.split(",");
|
||||||
if(guild.roleList.contains(role))
|
String role;
|
||||||
|
String formatted = "";
|
||||||
|
for(int i = 0; i < roles.length; i++)
|
||||||
{
|
{
|
||||||
if(guild.control.addRole(user.discordID, role))
|
role = roles[i].trim();
|
||||||
|
if(guild.roleList.contains(role))
|
||||||
{
|
{
|
||||||
return new SubCommandFormattable("ADDED RIN YOU NEED TO FIX THIS");
|
if(guild.control.addRole(user.discordID, role))
|
||||||
|
{
|
||||||
|
formatted += "Addded " + role + "!";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
formatted += "Failed to add " + role + "!";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new SubCommandFormattable("FAILED RIN YOU NEED TO FIX THIS TOO");
|
formatted += "You're not allowed to add " + role + "!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
return new SubCommandFormattable(formatted);
|
||||||
{
|
|
||||||
return new SubCommandFormattable("NOT ALLOWED FIX THIS ONE TOO SNEP FACE");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -19,18 +19,25 @@ public class SubCommandNotAllowed extends SubCommand
|
|||||||
{
|
{
|
||||||
String lowerInput = input.args.toLowerCase();
|
String lowerInput = input.args.toLowerCase();
|
||||||
String [] roles = lowerInput.split(",");
|
String [] roles = lowerInput.split(",");
|
||||||
|
String formatted = "";
|
||||||
|
|
||||||
|
if(roles.length < 1)
|
||||||
|
{
|
||||||
|
return new SubCommandFormattable(String.format(LocStrings.stub("GuildRoleNotAllowedNoArgs")));
|
||||||
|
}
|
||||||
|
|
||||||
for(String role:roles)
|
for(String role:roles)
|
||||||
{
|
{
|
||||||
if(guild.roleList.contains(role.trim()))
|
if(guild.roleList.contains(role.trim()))
|
||||||
{
|
{
|
||||||
guild.roleList.remove(role);
|
guild.roleList.remove(role);
|
||||||
return new SubCommandFormattable(LocStrings.stub("GuildRoleNotAllowedSuccess"));
|
formatted += String.format(LocStrings.stub("GuildRoleNotAllowedSuccess"), role);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new SubCommandFormattable(String.format(LocStrings.stub("GuildRoleNotAllowedFailure"), role));
|
formatted += String.format(LocStrings.stub("GuildRoleNotAllowedFailure"), role);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new SubCommandFormattable(String.format(LocStrings.stub("GuildRoleNotAllowedNoArgs")));
|
return new SubCommandFormattable(formatted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user