mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-20 01:29:54 +02:00
Implement achievements properly
This commit is contained in:
@@ -3,6 +3,7 @@ package emu.nebula.game.gacha;
|
||||
import emu.nebula.data.GameData;
|
||||
import emu.nebula.game.GameContext;
|
||||
import emu.nebula.game.GameContextModule;
|
||||
import emu.nebula.game.achievement.AchievementCondition;
|
||||
import emu.nebula.game.inventory.ItemAcquireMap;
|
||||
import emu.nebula.game.inventory.ItemParamMap;
|
||||
import emu.nebula.game.inventory.ItemType;
|
||||
@@ -164,6 +165,9 @@ public class GachaModule extends GameContextModule {
|
||||
var log = new GachaHistoryLog(data.getGachaType(), results);
|
||||
player.getGachaManager().addGachaHistory(log);
|
||||
|
||||
// Trigger achievements
|
||||
player.triggerAchievement(AchievementCondition.GachaTotal, amount);
|
||||
|
||||
// Complete
|
||||
return new GachaResult(info, change, results);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user