This commit is contained in:
Anuken
2025-05-14 10:29:05 -04:00
parent f1390f3933
commit c5f3d584f0
3 changed files with 9 additions and 2 deletions

View File

@@ -244,6 +244,10 @@ public abstract class LStatement{
}
public String typeName(){
return getClass().getSimpleName().replace("Statement", "");
}
public String name(){
return Strings.insertSpaces(getClass().getSimpleName().replace("Statement", ""));
}

View File

@@ -1634,6 +1634,8 @@ public class LStatements{
case mapArea -> {
table.add(" = ");
row(table);
fields(table, "x", p1, s -> p1 = s);
fields(table, "y", p2, s -> p2 = s);
row(table);
@@ -1653,7 +1655,7 @@ public class LStatements{
case ban, unban -> {
table.add(" block/unit ");
field(table, value, s -> value = s);
fields(table, value, s -> value = s);
}
default -> {
table.add(" = ");

View File

@@ -295,7 +295,8 @@ public class LogicDialog extends BaseDialog{
for(Prov<LStatement> prov : LogicIO.allStatements){
LStatement example = prov.get();
if(example instanceof InvalidStatement || example.hidden() || (example.privileged() && !privileged) || (example.nonPrivileged() && privileged) || (!text.isEmpty() && !example.name().toLowerCase(Locale.ROOT).contains(text))) continue;
if(example instanceof InvalidStatement || example.hidden() || (example.privileged() && !privileged) || (example.nonPrivileged() && privileged) ||
(!text.isEmpty() && !example.name().toLowerCase(Locale.ROOT).contains(text) && !example.typeName().toLowerCase(Locale.ROOT).contains(text))) continue;
if(matched[0] == null){
matched[0] = prov;