Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Matthew Cech
2019-05-08 20:20:15 -07:00
3 changed files with 13 additions and 2 deletions
+1
View File
@@ -19,6 +19,7 @@ CatchInfo=
[CommandBeansShow] [CommandBeansShow]
BeansShowDisplay=You have %s beans! BeansShowDisplay=You have %s beans!
BeansShowMentioned=I looked it up and %sbeans!
BeansShowInfo=Displays how many beans you have BeansShowInfo=Displays how many beans you have
[CommandGuildRoleList] [CommandGuildRoleList]
+10
View File
@@ -14,6 +14,16 @@ public class CommandBeansShow extends Command
@Override @Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res) public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{ {
if(input.mentions == null)
res.Call(String.format(LocStrings.Stub("BeansShowDisplay"), user.GetBeans())); res.Call(String.format(LocStrings.Stub("BeansShowDisplay"), user.GetBeans()));
else
{
String mentionedBeans = "";
for(KittyUser mentioned:input.mentions)
{
mentionedBeans += mentioned.name + " has " + mentioned.GetBeans() + " ";
}
res.Call(String.format(LocStrings.Stub("BeansShowMentioned"), mentionedBeans));
}
} }
} }
+1 -1
View File
@@ -166,7 +166,7 @@ public class CommandRoll extends Command
private boolean hasPrecendence(char op1, char op2) private boolean hasPrecendence(char op1, char op2)
{ {
if ((op1 == '*' || op1 == '/') && (op2 == '+' || op2 == '-')) if ((op2 == '*' || op2 == '/') && (op1 == '+' || op1 == '-'))
return false; return false;
else else
if ((op2 == 'd') && (op1 == '+' || op1 == '-' || op1 == '*' || op1 == '/')) if ((op2 == 'd') && (op1 == '+' || op1 == '-' || op1 == '*' || op1 == '/'))