mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 08:25:21 +01:00
MonsterInvestigation (boss icon in map)
This commit is contained in:
@@ -16,6 +16,7 @@ import org.luaj.vm2.LuaValue;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static emu.grasscutter.Configuration.SCRIPT;
|
||||
@@ -165,4 +166,12 @@ public class SceneGroup {
|
||||
Grasscutter.getLogger().info("group {} in scene {} is loaded successfully.", id, sceneId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Optional<SceneBossChest> searchBossChestInGroup() {
|
||||
return gadgets.values().stream()
|
||||
.filter(g -> g.boss_chest != null && g.boss_chest.monster_config_id > 0)
|
||||
.map(g -> g.boss_chest)
|
||||
.findFirst();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user