diff --git a/public/project/items.js b/public/project/items.js index 17912b6..c1a0433 100644 --- a/public/project/items.js +++ b/public/project/items.js @@ -1362,6 +1362,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "cls": "constants", "name": "成就", "canUseItemEffect": "true", - "useItemEffect": "core.plugin.achievementOpened.value = true;" + "useItemEffect": "core.plugin.achievementOpened.value = true;", + "text": "可以查看成就" } } \ No newline at end of file diff --git a/src/data/achievement.json b/src/data/achievement.json index 7652be4..09b9015 100644 --- a/src/data/achievement.json +++ b/src/data/achievement.json @@ -75,15 +75,6 @@ "hide": "该探索成就需要你自己探索如何达成", "progress": "", "point": 50 - }, - { - "name": "没货了!", - "text": [ - "尝试连续购买已卖空的物品三次" - ], - "hide": "该探索成就需要你自己探索如何达成", - "progress": "", - "point": 20 } ] } \ No newline at end of file diff --git a/src/plugin/ui/achievement.ts b/src/plugin/ui/achievement.ts index ae4ef8c..4a60369 100644 --- a/src/plugin/ui/achievement.ts +++ b/src/plugin/ui/achievement.ts @@ -38,7 +38,7 @@ export const totalPoint = Object.values(list) * @param index 成就索引 */ export function completeAchievement(type: AchievementType, index: number) { - if (flags.debug) return; + if (flags.debug || hasCompletedAchievement(type, index)) return; changeLocalStorage( 'achievement', data => { diff --git a/src/ui/completeAchievement.vue b/src/ui/completeAchievement.vue index 6b9fbc8..7637776 100644 --- a/src/ui/completeAchievement.vue +++ b/src/ui/completeAchievement.vue @@ -73,6 +73,7 @@ onMounted(async () => { position: fixed; background-color: #000d; animation: ani 5s ease 0s 1 forwards running; + z-index: 10000; } #complete { diff --git a/src/ui/shop.vue b/src/ui/shop.vue index eff4f6b..c17b0be 100644 --- a/src/ui/shop.vue +++ b/src/ui/shop.vue @@ -78,7 +78,14 @@ >
买价 {{ item.money }} @@ -168,6 +175,10 @@ import { isMobile } from '../plugin/use'; import BoxAnimate from '../components/boxAnimate.vue'; import { KeyCode } from '../plugin/keyCodes'; import { sleep } from 'mutate-animate'; +import { + completeAchievement, + hasCompletedAchievement +} from '../plugin/ui/achievement'; const id = core.plugin.openedShopId; const shop = core.status.shops[core.plugin.openedShopId] as ItemShopEvent; @@ -190,6 +201,8 @@ const count = ref(0); const nowMoney = ref(core.status.hero.money); const update = ref(false); +let achiN = 0; + let bought = false; watch(count, n => { @@ -232,7 +245,10 @@ watch(remain, n => { }); function confirm() { - if (count.value === 0) return; + if (count.value === 0) { + return; + } + achiN = 0; const money = core.status.hero.money; bought = true; core.status.route.push(`openShop:${id}`);