Skip to content

Commit

Permalink
Merge pull request #474 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
Release v3.6.1
  • Loading branch information
AlvISsReimu authored Sep 12, 2021
2 parents 27d01df + bfe2483 commit 7053e23
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 7 deletions.
22 changes: 22 additions & 0 deletions ios/App/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

#endif

var blurStyle = UIBlurEffect.Style.dark

if #available(iOS 13.0, *) {
blurStyle = UIBlurEffect.Style.systemMaterialDark
}

let blurEffect = UIBlurEffect(style: blurStyle)

let blurEffectView = UIVisualEffectView(effect: blurEffect)
blurEffectView.translatesAutoresizingMaskIntoConstraints = false
rootView?.addSubview(blurEffectView)

guard let leadingAnchor = rootView?.leadingAnchor,
let widthAnchor = rootView?.widthAnchor,
let topAnchor = rootView?.topAnchor,
let bottomAnchor = rootView?.safeAreaLayoutGuide.topAnchor
else {
return true
}

blurEffectView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
blurEffectView.widthAnchor.constraint(equalTo: widthAnchor).isActive = true
blurEffectView.topAnchor.constraint(equalTo: topAnchor).isActive = true
blurEffectView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true


return true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "penguin-stats-frontend",
"version": "3.6.0",
"version": "3.6.1",
"private": true,
"author": "Penguin Statistics Contributors <contributors@penguin-stats.io> (https://github.com/orgs/penguin-statistics/people)",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = 'v3.6.0'
const version = 'v3.6.1'
const project = 'frontend-v2'

module.exports = {
Expand Down
12 changes: 12 additions & 0 deletions src/utils/arrayUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import uniq from 'lodash/uniq'
import groupBy from 'lodash/groupBy'
import flatten from 'lodash/flatten'
import filter from 'lodash/filter'

export function findDuplicates(array) {
return uniq(
flatten(
filter(
groupBy(array),
n => n.length > 1)))
}
26 changes: 21 additions & 5 deletions src/utils/recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import charHash from '@/models/recognition/charHash'
import store from '@/store'
import JSZip from 'jszip'
import uniq from 'lodash/uniq'

import Console from "@/utils/Console";
import strings from "@/utils/strings";
import ReportValidator from "@/utils/reportValidator";
import get from '@/utils/getters'
import existUtils from "@/utils/existUtils";
import mirror from "@/utils/mirror";
import {findDuplicates} from "@/utils/arrayUtils";

const recognizerVersion = 'v3.2.2-1'

Expand Down Expand Up @@ -69,28 +71,42 @@ class Recognizer {
// free_buffer: Module.cwrap('free_buffer', 'void', ['number'])
}

const stages = {}
const transformedStages = {}

const stages = store.getters['data/content']({ id: 'stages' })

const duplicatedStageIds = findDuplicates(stages.map(el => el.code))
console.log('duplicates', duplicatedStageIds)

store.getters['data/content']({ id: 'stages' })
stages
.forEach((stage) => {
// skip stages with duplicated code and is non-existent in the current server
if (
~duplicatedStageIds.indexOf(stage.code) &&
!existUtils.existence(stage, true)
) {
console.log('skipping', stage.code, stage.stageId)
return
}

let drops = (stage.dropInfos || [])
.map(drop => drop.itemId)
.filter(drop => !!drop && drop !== 'furni')

if (stage.recognitionOnly) drops = [...drops, ...stage.recognitionOnly]

stages[stage.code] = {
transformedStages[stage.code] = {
stageId: stage.stageId,
drops: uniq(drops),
existence: existUtils.existence(stage, true)
}
})


Console.debug('Recognizer', 'init: preload json: preloading with', stages, charHash)
Console.debug('Recognizer', 'init: preload json: preloading with', transformedStages, charHash)

this.wasm.load_json(
JSON.stringify(stages),
JSON.stringify(transformedStages),
JSON.stringify(charHash)
)

Expand Down
7 changes: 7 additions & 0 deletions src/views/About/Changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ export default {
return {
index: null,
logs: [
{
version: 'v3.6.1',
date: '2021-09-12T15:00:00+0800',
changes: `## 修复
1. 由于重复的关卡名称而导致的部分关卡于截图识别的判断错误问题
`
},
{
version: 'v3.5.6',
date: '2021-06-24T18:00:00+0800',
Expand Down

0 comments on commit 7053e23

Please sign in to comment.