Skip to content

Commit 787a171

Browse files
authored
Merge pull request #5 from TsFreddie/master
v1.60a
2 parents 07e37c1 + 98ab044 commit 787a171

12 files changed

Lines changed: 2025 additions & 611 deletions

File tree

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

build-env/assets/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.60a
2+
- **CORE**: Core is now open-source.
3+
- **CORE**: Removed 16 profile count limit.
4+
15
## v1.50e
26
- **CORE**: Change country code from `AX` to `JP` in `facility.get`
37

package-lock.json

Lines changed: 738 additions & 498 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/asphyxia-core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ type Update<T> = Partial<T> & {
11551155
* you should refrain from referencing refid in your document to prevent getting residual garbage data.
11561156
*
11571157
* If you need to make rival/friend feature, we recommend you to get all profile data by passing null to `refid`.
1158-
* There will be 16 profiles maximum which is small enough to manage.
1158+
* This method should be sufficient for playing with friends.
11591159
*
11601160
* All query and doc should not have any fields start with `__` while `__refid` being the only exception.
11611161
* However, `__refid` field will still be ignored while other `__` starting fields will cause an error to be thrown.

src/Playground.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/eamuse/Core/CardManager.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { get } from 'lodash';
33
import { ROOT_CONTAINER } from '../index';
44
import {
55
FindCard,
6-
GetProfileCount,
76
FindProfile,
87
CreateProfile,
98
BindProfile,
@@ -35,12 +34,6 @@ cardmng.add('cardmng.inquire', async (info, data, send) => {
3534
const card = await FindCard(cid);
3635

3736
if (!card) {
38-
const profileCount = await GetProfileCount();
39-
if (profileCount < 0 || profileCount >= 16) {
40-
// Refuse to create new account
41-
return send.status(110);
42-
}
43-
4437
// Create new account
4538
return send.status(112);
4639
}

src/eamuse/EamusePlugin.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ import { Logger } from '../utils/Logger';
66
import { PLUGIN_PATH, APIFindOne, APIFind } from '../utils/EamuseIO';
77
import path from 'path';
88
import { readdirSync, readFileSync } from 'fs';
9-
import {
10-
FindCard,
11-
CreateProfile,
12-
CreateCard,
13-
BindProfile,
14-
GetProfileCount,
15-
} from '../utils/EamuseIO';
9+
import { FindCard, CreateProfile, CreateCard, BindProfile } from '../utils/EamuseIO';
1610

1711
import { compile } from 'pug';
1812
import { CONFIG } from '../utils/ArgConfig';
1913
import { nfc2card } from '../utils/CardCipher';
2014

2115
async function cardSanitizer(gameCode: string, str: string, refMap: any): Promise<string> {
22-
const regex = /(^|[^A-Za-z0-9])((?:01[A-Fa-f0-9]{14})|(?:E004[A-Fa-f0-9]{12}))($|[^A-Za-z0-9=\-_,+\/])/g;
23-
const regexI = /(^|[^A-Za-z0-9])((?:01[A-Fa-f0-9]{14})|(?:E004[A-Fa-f0-9]{12}))($|[^A-Za-z0-9=\-_,+\/])/;
16+
const regex =
17+
/(^|[^A-Za-z0-9])((?:01[A-Fa-f0-9]{14})|(?:E004[A-Fa-f0-9]{12}))($|[^A-Za-z0-9=\-_,+\/])/g;
18+
const regexI =
19+
/(^|[^A-Za-z0-9])((?:01[A-Fa-f0-9]{14})|(?:E004[A-Fa-f0-9]{12}))($|[^A-Za-z0-9=\-_,+\/])/;
2420
if (typeof str !== 'string') {
2521
return str;
2622
}
@@ -37,8 +33,6 @@ async function cardSanitizer(gameCode: string, str: string, refMap: any): Promis
3733
const did = nfc2card(cid);
3834
const card = await FindCard(cid);
3935
if (!card) {
40-
const profileCount = await GetProfileCount();
41-
if (profileCount < 0 || profileCount >= 16) return null;
4236
const newProfile = await CreateProfile('unset', gameCode);
4337
if (!newProfile) return null;
4438
const newCard = await CreateCard(cid, newProfile.__refid);

0 commit comments

Comments
 (0)