Skip to content

Commit

Permalink
grant instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Jul 10, 2024
1 parent 4719aca commit 548ca6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public static JavaCity fromBytes(byte[] data) {
public String instructions(int cityId, JavaCity from, double[] total) {
HashMap<Integer, JavaCity> map = new HashMap<>();
map.put(cityId, from);
return instructions(map, total, false);
return instructions(map, total, false, false);
}

public String instructions(Map<Integer, JavaCity> fromMap, double[] total, boolean isBulk, boolean dontSellInfra) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public Grant generateGrant(String arg, GuildDB guildDb, DBNation me, double amt,
if (!noInfra) grant.addNote("#infra=" + city.getInfra());
if (!noLand) grant.addNote("#land=" + city.getLand());
double[] buffer = new double[ResourceType.values.length];
grant.setInstructions(city.instructions(from, buffer));
grant.setInstructions(city.instructions(from, buffer, true, true));
resources = ResourceType.resourcesToMap(buffer);
} else {
grant = new Grant(me, DepositType.GRANT.withValue().ignore(ignore));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static String build(@Me IMessageIO io, GuildDB db, DBNation me, int citie

double[] totalArr = new double[ResourceType.values.length];
Map<Integer, JavaCity> from = me.getCityMap(true);
String instructions = to.instructions(from, totalArr);
String instructions = to.instructions(from, totalArr, true, true);
String emoji = "Grant";
String command = Settings.commandPrefix(true) + "grant {usermention} " + to.toJson();
io.create().embed("Build", instructions).commandButton(command, emoji).send();
Expand Down

0 comments on commit 548ca6f

Please sign in to comment.