Make ice dude show up (#2200)

* Make ice dude show up

* replace contains with equals

Might as well fix this while I'm here.
"leave" and "enter" have the same number of letters, so it works.

* empty strings suck

* Update SceneTrigger.java

---------

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
This commit is contained in:
Nazrin 2023-06-09 10:28:28 -07:00 committed by GitHub
parent b412a24657
commit e6d32f5599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -810,7 +810,8 @@ public class SceneScriptManager {
.stream()
.filter(
t ->
t.getCondition().contains(String.valueOf(params.param1))
!t.getCondition().isEmpty() &&
t.getCondition().substring(29).equals(String.valueOf(params.param1))
&& (t.getSource().isEmpty()
|| t.getSource().equals(params.getEventSource())))
.collect(Collectors.toSet());

View File

@ -27,7 +27,7 @@ public final class SceneTrigger {
@Override
public int hashCode() {
return name.hashCode();
return (currentGroup.id + name).hashCode();
}
@Override