|
48 | 48 | import static com.lootfilters.lang.Token.Type.LITERAL_INT; |
49 | 49 | import static com.lootfilters.lang.Token.Type.LITERAL_STRING; |
50 | 50 | import static com.lootfilters.lang.Token.Type.META; |
| 51 | +import static com.lootfilters.lang.Token.Type.NIL; |
51 | 52 | import static com.lootfilters.lang.Token.Type.OP_AND; |
52 | 53 | import static com.lootfilters.lang.Token.Type.OP_NOT; |
53 | 54 | import static com.lootfilters.lang.Token.Type.OP_OR; |
@@ -179,9 +180,9 @@ private void parseRule(boolean isTerminal, int sourceLine) { |
179 | 180 | case "color": |
180 | 181 | builder.textColor(assign[1].expectColor()); break; |
181 | 182 | case "backgroundColor": |
182 | | - builder.backgroundColor(assign[1].expectColor()); break; |
| 183 | + builder.backgroundColor(assign[1].expectColor(true)); break; |
183 | 184 | case "borderColor": |
184 | | - builder.borderColor(assign[1].expectColor()); break; |
| 185 | + builder.borderColor(assign[1].expectColor(true)); break; |
185 | 186 | case "hidden": |
186 | 187 | builder.hidden(assign[1].expectBoolean()); break; |
187 | 188 | case "showLootbeam": |
@@ -363,6 +364,13 @@ private Token[] parseAssignment() { // assignments do not support nested express |
363 | 364 | private void parseIcon(DisplayConfig.Builder builder) { |
364 | 365 | tokens.takeExpect(IDENTIFIER); |
365 | 366 | tokens.takeExpect(ASSIGN); |
| 367 | + if (tokens.peek().is(NIL)) { |
| 368 | + tokens.takeExpect(NIL); |
| 369 | + tokens.takeExpect(STMT_END); |
| 370 | + builder.icon(null); |
| 371 | + return; |
| 372 | + } |
| 373 | + |
366 | 374 | var type = tokens.takeExpect(IDENTIFIER); |
367 | 375 | var args = tokens.takeArgList(); |
368 | 376 | if (type.getValue().equals("Sprite")) { |
|
0 commit comments