mirror of
https://github.com/motajs/template.git
synced 2026-05-02 12:23:13 +08:00
This commit is contained in:
parent
dfe4be562e
commit
1a569804d8
@ -1,5 +1,7 @@
|
|||||||
import { state } from '@user/data-state';
|
import { state } from '@user/data-state';
|
||||||
import { ClientCore } from './client';
|
import { ClientCore } from './client';
|
||||||
|
|
||||||
|
// TODO: 逐渐弱化 ClientCore 的单例概念,每个接口都通过参数传入 IClientCore 对象
|
||||||
|
|
||||||
/** 客户端实例 */
|
/** 客户端实例 */
|
||||||
export const client = new ClientCore(state);
|
export const client = new ClientCore(state);
|
||||||
|
|||||||
@ -96,7 +96,8 @@ const MainScene = defineComponent(() => {
|
|||||||
//#region 状态更新
|
//#region 状态更新
|
||||||
const updateStatus = () => {
|
const updateStatus = () => {
|
||||||
if (!core.status || !core.status.hero || !core.status.floorId) return;
|
if (!core.status || !core.status.hero || !core.status.floorId) return;
|
||||||
hideStatus.value = core.getFlag('hideStatusBar', false);
|
const flags = client.data.flags;
|
||||||
|
hideStatus.value = flags.getFieldValueDefaults('hideStatusBar', false);
|
||||||
|
|
||||||
const hero = core.status.hero;
|
const hero = core.status.hero;
|
||||||
leftStatus.atk = getHeroStatusOn('atk');
|
leftStatus.atk = getHeroStatusOn('atk');
|
||||||
@ -116,9 +117,9 @@ const MainScene = defineComponent(() => {
|
|||||||
leftStatus.pickaxe = core.itemCount('pickaxe');
|
leftStatus.pickaxe = core.itemCount('pickaxe');
|
||||||
leftStatus.bomb = core.itemCount('bomb');
|
leftStatus.bomb = core.itemCount('bomb');
|
||||||
leftStatus.centerFly = core.itemCount('centerFly');
|
leftStatus.centerFly = core.itemCount('centerFly');
|
||||||
leftStatus.poison = core.getFlag('poison', true);
|
leftStatus.poison = flags.getFieldValueDefaults('poison', true);
|
||||||
leftStatus.weak = core.getFlag('weak', true);
|
leftStatus.weak = flags.getFieldValueDefaults('weak', true);
|
||||||
leftStatus.curse = core.getFlag('curse', true);
|
leftStatus.curse = flags.getFieldValueDefaults('curse', true);
|
||||||
leftStatus.floor = core.status.floorId;
|
leftStatus.floor = core.status.floorId;
|
||||||
leftStatus.lv = core.getLvName(hero.lv);
|
leftStatus.lv = core.getLvName(hero.lv);
|
||||||
|
|
||||||
@ -129,7 +130,7 @@ const MainScene = defineComponent(() => {
|
|||||||
replayStatus.played = totalList.length - toReplay.length;
|
replayStatus.played = totalList.length - toReplay.length;
|
||||||
replayStatus.total = totalList.length;
|
replayStatus.total = totalList.length;
|
||||||
|
|
||||||
rightStatus.exampleHard = flags.hard;
|
rightStatus.exampleHard = flags.getFieldValueDefaults('hard', 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateDataFallback = () => {
|
const updateDataFallback = () => {
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import { compressToBase64 } from 'lz-string';
|
|||||||
import { ViewMapUI } from './viewmap';
|
import { ViewMapUI } from './viewmap';
|
||||||
import { CENTER_LOC, FULL_LOC, MAIN_HEIGHT, POP_BOX_WIDTH } from '../../shared';
|
import { CENTER_LOC, FULL_LOC, MAIN_HEIGHT, POP_BOX_WIDTH } from '../../shared';
|
||||||
import { useKey } from '../use';
|
import { useKey } from '../use';
|
||||||
|
import { client } from '../../core';
|
||||||
|
|
||||||
export interface MainSettingsProps
|
export interface MainSettingsProps
|
||||||
extends Partial<ChoicesProps>, UIComponentProps {
|
extends Partial<ChoicesProps>, UIComponentProps {
|
||||||
@ -162,7 +163,8 @@ export const ReplaySettings = defineComponent<MainSettingsProps>(props => {
|
|||||||
props.controller.closeAll();
|
props.controller.closeAll();
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
const route = core.status.route.slice();
|
const route = core.status.route.slice();
|
||||||
const seed = core.getFlag<number>('__seed__');
|
const flags = client.data.flags;
|
||||||
|
const seed = flags.getFieldValue<number>('__seed__');
|
||||||
core.startGame(core.status.hard, seed, route);
|
core.startGame(core.status.hard, seed, route);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -216,13 +218,15 @@ export const ReplaySettings = defineComponent<MainSettingsProps>(props => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ReplayChoice.Download: {
|
case ReplayChoice.Download: {
|
||||||
|
const flags = client.data.flags;
|
||||||
|
const seed = flags.getFieldValue<number>('__seed__');
|
||||||
core.download(
|
core.download(
|
||||||
core.firstData.name + '_' + core.formatDate2() + '.h5route',
|
core.firstData.name + '_' + core.formatDate2() + '.h5route',
|
||||||
compressToBase64(
|
compressToBase64(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
name: core.firstData.name,
|
name: core.firstData.name,
|
||||||
hard: core.status.hard,
|
hard: core.status.hard,
|
||||||
seed: core.getFlag('__seed__'),
|
seed,
|
||||||
route: core.encodeRoute(core.status.route)
|
route: core.encodeRoute(core.status.route)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@motajs/common": "workspace:*",
|
"@motajs/common": "workspace:*",
|
||||||
"@motajs/types": "workspace:*",
|
"@motajs/types": "workspace:*",
|
||||||
"@motajs/loader": "workspace:*",
|
"@motajs/loader": "workspace:*"
|
||||||
"@user/types": "workspace:*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { ITileLocator, logger } from '@motajs/common';
|
|||||||
import {
|
import {
|
||||||
CriticalableHeroStatus,
|
CriticalableHeroStatus,
|
||||||
IDamageCalculator,
|
IDamageCalculator,
|
||||||
|
IDamageContext,
|
||||||
IDamageSystem,
|
IDamageSystem,
|
||||||
IEnemyContext,
|
IEnemyContext,
|
||||||
IEnemyCritical,
|
IEnemyCritical,
|
||||||
@ -20,29 +21,22 @@ interface ICriticalSearchResult {
|
|||||||
readonly info: IEnemyDamageInfo;
|
readonly info: IEnemyDamageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DamageSystem<TAttr, THero> implements IDamageSystem<TAttr, THero> {
|
export class DamageContext<TAttr, THero> implements IDamageContext<
|
||||||
|
TAttr,
|
||||||
|
THero
|
||||||
|
> {
|
||||||
/** 当前正在使用的计算器 */
|
/** 当前正在使用的计算器 */
|
||||||
private calculator: IDamageCalculator<TAttr, THero> | null = null;
|
protected calculator: IDamageCalculator<TAttr, THero> | null;
|
||||||
/** 当前勇士属性 */
|
/** 当前勇士属性 */
|
||||||
private heroStatus: IReadonlyHeroAttribute<THero> | null = null;
|
protected heroStatus: IReadonlyHeroAttribute<THero> | null;
|
||||||
/** 怪物伤害缓存 */
|
|
||||||
private readonly cache: Map<IEnemyView<TAttr>, IEnemyDamageInfo> =
|
|
||||||
new Map();
|
|
||||||
|
|
||||||
constructor(readonly context: IEnemyContext<TAttr, THero>) {}
|
constructor(
|
||||||
|
readonly context: IEnemyContext<TAttr, THero>,
|
||||||
useCalculator(calculator: IDamageCalculator<TAttr, THero>): void {
|
calculator: IDamageCalculator<TAttr, THero> | null = null,
|
||||||
|
heroStatus: IReadonlyHeroAttribute<THero> | null = null
|
||||||
|
) {
|
||||||
this.calculator = calculator;
|
this.calculator = calculator;
|
||||||
this.markAllDirty();
|
this.heroStatus = heroStatus;
|
||||||
}
|
|
||||||
|
|
||||||
getCalculator(): IDamageCalculator<TAttr, THero> | null {
|
|
||||||
return this.calculator;
|
|
||||||
}
|
|
||||||
|
|
||||||
bindHeroStatus(hero: IReadonlyHeroAttribute<THero>): void {
|
|
||||||
this.heroStatus = hero;
|
|
||||||
this.markAllDirty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,17 +66,10 @@ export class DamageSystem<TAttr, THero> implements IDamageSystem<TAttr, THero> {
|
|||||||
const locator = this.context.getEnemyLocatorByView(enemy);
|
const locator = this.context.getEnemyLocatorByView(enemy);
|
||||||
if (!hero || !locator) return null;
|
if (!hero || !locator) return null;
|
||||||
|
|
||||||
const cached = this.cache.get(enemy);
|
|
||||||
if (cached) {
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
const computed = enemy.getComputedEnemy();
|
const computed = enemy.getComputedEnemy();
|
||||||
const handler = this.createReadonlyHandler(computed, locator, hero);
|
const handler = this.createReadonlyHandler(computed, locator, hero);
|
||||||
const info = this.calculator.calculate(handler);
|
|
||||||
this.cache.set(enemy, info);
|
|
||||||
|
|
||||||
return info;
|
return this.calculator.calculate(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDamageInfoByComputed(
|
getDamageInfoByComputed(
|
||||||
@ -98,34 +85,14 @@ export class DamageSystem<TAttr, THero> implements IDamageSystem<TAttr, THero> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hero = this.heroStatus;
|
const hero = this.heroStatus;
|
||||||
if (!hero) return null;
|
|
||||||
const view = this.context.getViewByComputed(enemy);
|
const view = this.context.getViewByComputed(enemy);
|
||||||
if (!view) return null;
|
if (!hero || !view) return null;
|
||||||
const locator = this.context.getEnemyLocatorByView(view);
|
const locator = this.context.getEnemyLocatorByView(view);
|
||||||
if (!locator) return null;
|
if (!locator) return null;
|
||||||
|
|
||||||
const cached = this.cache.get(view);
|
|
||||||
if (cached) {
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
const handler = this.createReadonlyHandler(enemy, locator, hero);
|
const handler = this.createReadonlyHandler(enemy, locator, hero);
|
||||||
const info = this.calculator.calculate(handler);
|
|
||||||
this.cache.set(view, info);
|
|
||||||
|
|
||||||
return info;
|
return this.calculator.calculate(handler);
|
||||||
}
|
|
||||||
|
|
||||||
markDirty(enemy: IEnemyView<TAttr>): void {
|
|
||||||
this.cache.delete(enemy);
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteEnemy(enemy: IEnemyView<TAttr>): void {
|
|
||||||
this.cache.delete(enemy);
|
|
||||||
}
|
|
||||||
|
|
||||||
markAllDirty(): void {
|
|
||||||
this.cache.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*calculateCritical(
|
*calculateCritical(
|
||||||
@ -238,3 +205,78 @@ export class DamageSystem<TAttr, THero> implements IDamageSystem<TAttr, THero> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class DamageSystem<TAttr, THero>
|
||||||
|
extends DamageContext<TAttr, THero>
|
||||||
|
implements IDamageSystem<TAttr, THero>
|
||||||
|
{
|
||||||
|
/** 怪物伤害缓存 */
|
||||||
|
private readonly cache: Map<IEnemyView<TAttr>, IEnemyDamageInfo> =
|
||||||
|
new Map();
|
||||||
|
|
||||||
|
constructor(context: IEnemyContext<TAttr, THero>) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
useCalculator(calculator: IDamageCalculator<TAttr, THero>): void {
|
||||||
|
this.calculator = calculator;
|
||||||
|
this.markAllDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
getCalculator(): IDamageCalculator<TAttr, THero> | null {
|
||||||
|
return this.calculator;
|
||||||
|
}
|
||||||
|
|
||||||
|
bindHeroStatus(hero: IReadonlyHeroAttribute<THero> | null): void {
|
||||||
|
this.heroStatus = hero;
|
||||||
|
this.markAllDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
getDamageInfo(enemy: IEnemyView<TAttr>): IEnemyDamageInfo | null {
|
||||||
|
const cached = this.cache.get(enemy);
|
||||||
|
if (cached) {
|
||||||
|
return cached;
|
||||||
|
}
|
||||||
|
|
||||||
|
const info = super.getDamageInfo(enemy);
|
||||||
|
if (!info) return info;
|
||||||
|
this.cache.set(enemy, info);
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDamageInfoByComputed(
|
||||||
|
enemy: IReadonlyEnemy<TAttr>
|
||||||
|
): IEnemyDamageInfo | null {
|
||||||
|
const view = this.context.getViewByComputed(enemy);
|
||||||
|
if (view) {
|
||||||
|
const cached = this.cache.get(view);
|
||||||
|
if (cached) {
|
||||||
|
return cached;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const info = super.getDamageInfoByComputed(enemy);
|
||||||
|
if (!view || !info) return info;
|
||||||
|
|
||||||
|
this.cache.set(view, info);
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
markDirty(enemy: IEnemyView<TAttr>): void {
|
||||||
|
this.cache.delete(enemy);
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteEnemy(enemy: IEnemyView<TAttr>): void {
|
||||||
|
this.cache.delete(enemy);
|
||||||
|
}
|
||||||
|
|
||||||
|
markAllDirty(): void {
|
||||||
|
this.cache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
with(hero: IHeroAttribute<THero>): IDamageContext<TAttr, THero> {
|
||||||
|
return new DamageContext(this.context, this.calculator, hero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export class EnemyManager<TAttr> implements IEnemyManager<TAttr> {
|
|||||||
this.attributeRegistry.set(name, defaultValue);
|
this.attributeRegistry.set(name, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
fromLegacyEnemy(enemy: Enemy): IEnemy<TAttr> {
|
fromLegacyEnemy(code: number, enemy: Enemy): IEnemy<TAttr> {
|
||||||
// 如果该旧样板怪物已经通过 addPrefabFromLegacy 注册为模板,直接克隆模板
|
// 如果该旧样板怪物已经通过 addPrefabFromLegacy 注册为模板,直接克隆模板
|
||||||
const existingCode = this.legacyIdToCode.get(enemy.id);
|
const existingCode = this.legacyIdToCode.get(enemy.id);
|
||||||
if (existingCode) {
|
if (existingCode) {
|
||||||
@ -52,7 +52,7 @@ export class EnemyManager<TAttr> implements IEnemyManager<TAttr> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.convertLegacyEnemy(0, enemy);
|
return this.convertLegacyEnemy(code, enemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -109,6 +109,14 @@ export class EnemyManager<TAttr> implements IEnemyManager<TAttr> {
|
|||||||
return prefab.clone();
|
return prefab.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private internalGetPrefab(code: number | string) {
|
||||||
|
if (typeof code === 'number') {
|
||||||
|
return this.prefabByCode.get(code) ?? null;
|
||||||
|
} else {
|
||||||
|
return this.prefabById.get(code) ?? null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addPrefab(enemy: IEnemy<TAttr>): void {
|
addPrefab(enemy: IEnemy<TAttr>): void {
|
||||||
if (
|
if (
|
||||||
this.prefabByCode.has(enemy.code) ||
|
this.prefabByCode.has(enemy.code) ||
|
||||||
@ -140,10 +148,7 @@ export class EnemyManager<TAttr> implements IEnemyManager<TAttr> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deletePrefab(code: number | string): void {
|
deletePrefab(code: number | string): void {
|
||||||
const prefab =
|
const prefab = this.internalGetPrefab(code);
|
||||||
typeof code === 'number'
|
|
||||||
? this.prefabByCode.get(code)
|
|
||||||
: this.prefabById.get(code);
|
|
||||||
if (!prefab) return;
|
if (!prefab) return;
|
||||||
this.prefabByCode.delete(prefab.code);
|
this.prefabByCode.delete(prefab.code);
|
||||||
this.prefabById.delete(prefab.id);
|
this.prefabById.delete(prefab.id);
|
||||||
@ -156,4 +161,11 @@ export class EnemyManager<TAttr> implements IEnemyManager<TAttr> {
|
|||||||
this.prefabByCode.set(enemy.code, enemy);
|
this.prefabByCode.set(enemy.code, enemy);
|
||||||
this.prefabById.set(enemy.id, enemy);
|
this.prefabById.set(enemy.id, enemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reusePrefab(source: number | string, code: number, id: string): void {
|
||||||
|
const prefab = this.internalGetPrefab(source);
|
||||||
|
if (!prefab) return;
|
||||||
|
this.prefabByCode.set(code, prefab);
|
||||||
|
this.prefabById.set(id, prefab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { ISpecial, SpecialCreation } from './types';
|
import { ISpecial, SpecialCreation } from './types';
|
||||||
|
|
||||||
export interface ICommonSerializableSpecialConfig<T> {
|
// TODO: 颜色参数
|
||||||
|
|
||||||
|
export interface ICommonSpecialConfig<T> {
|
||||||
/** 获取特殊属性的名称 */
|
/** 获取特殊属性的名称 */
|
||||||
getSpecialName: (special: ISpecial<T>) => string;
|
getSpecialName: (special: ISpecial<T>) => string;
|
||||||
/** 获取特殊属性的描述 */
|
/** 获取特殊属性的描述 */
|
||||||
@ -13,7 +15,7 @@ export class CommonSerializableSpecial<T> implements ISpecial<T> {
|
|||||||
constructor(
|
constructor(
|
||||||
readonly code: number,
|
readonly code: number,
|
||||||
public value: T,
|
public value: T,
|
||||||
readonly config: ICommonSerializableSpecialConfig<T>
|
readonly config: ICommonSpecialConfig<T>
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
setValue(value: T): void {
|
setValue(value: T): void {
|
||||||
@ -50,7 +52,7 @@ export class NonePropertySpecial implements ISpecial<void> {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly code: number,
|
readonly code: number,
|
||||||
readonly config: ICommonSerializableSpecialConfig<void>
|
readonly config: ICommonSpecialConfig<void>
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
setValue(_value: void): void {
|
setValue(_value: void): void {
|
||||||
@ -81,7 +83,7 @@ export class NonePropertySpecial implements ISpecial<void> {
|
|||||||
export function defineCommonSerializableSpecial<T, TAttr = any>(
|
export function defineCommonSerializableSpecial<T, TAttr = any>(
|
||||||
code: number,
|
code: number,
|
||||||
value: T,
|
value: T,
|
||||||
config: ICommonSerializableSpecialConfig<T>
|
config: ICommonSpecialConfig<T>
|
||||||
): SpecialCreation<T, TAttr> {
|
): SpecialCreation<T, TAttr> {
|
||||||
return () =>
|
return () =>
|
||||||
new CommonSerializableSpecial(code, structuredClone(value), config);
|
new CommonSerializableSpecial(code, structuredClone(value), config);
|
||||||
@ -89,7 +91,7 @@ export function defineCommonSerializableSpecial<T, TAttr = any>(
|
|||||||
|
|
||||||
export function defineNonePropertySpecial<TAttr = any>(
|
export function defineNonePropertySpecial<TAttr = any>(
|
||||||
code: number,
|
code: number,
|
||||||
config: ICommonSerializableSpecialConfig<void>
|
config: ICommonSpecialConfig<void>
|
||||||
): SpecialCreation<void, TAttr> {
|
): SpecialCreation<void, TAttr> {
|
||||||
return () => new NonePropertySpecial(code, config);
|
return () => new NonePropertySpecial(code, config);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { IRange, ITileLocator } from '@motajs/common';
|
import { IRange, ITileLocator } from '@motajs/common';
|
||||||
import { IReadonlyHeroAttribute } from '../hero';
|
import { IHeroAttribute, IReadonlyHeroAttribute } from '../hero';
|
||||||
|
|
||||||
//#region 怪物基础
|
//#region 怪物基础
|
||||||
|
|
||||||
@ -158,9 +158,10 @@ export interface IEnemyManager<TAttr> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据旧样板怪物对象生成一个新的怪物对象
|
* 根据旧样板怪物对象生成一个新的怪物对象
|
||||||
|
* @param code 怪物数字
|
||||||
* @param enemy 旧样板怪物对象
|
* @param enemy 旧样板怪物对象
|
||||||
*/
|
*/
|
||||||
fromLegacyEnemy(enemy: Enemy): IEnemy<TAttr>;
|
fromLegacyEnemy(code: number, enemy: Enemy): IEnemy<TAttr>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建怪物对象,如果对应数字的怪物不存在则会返回 `null`
|
* 创建怪物对象,如果对应数字的怪物不存在则会返回 `null`
|
||||||
@ -212,6 +213,14 @@ export interface IEnemyManager<TAttr> {
|
|||||||
* @param enemy 新的怪物模板
|
* @param enemy 新的怪物模板
|
||||||
*/
|
*/
|
||||||
changePrefab(code: number | string, enemy: IEnemy<TAttr>): void;
|
changePrefab(code: number | string, enemy: IEnemy<TAttr>): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 让指定的怪物数字和怪物 id 复用指定的模板
|
||||||
|
* @param source 怪物模板源
|
||||||
|
* @param code 复用怪物数字
|
||||||
|
* @param id 复用怪物 id
|
||||||
|
*/
|
||||||
|
reusePrefab(source: number | string, code: number, id: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
@ -623,7 +632,38 @@ export interface IDamageCalculator<TAttr, THero> {
|
|||||||
): number;
|
): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDamageSystem<TAttr, THero> {
|
export interface IDamageContext<TAttr, THero> {
|
||||||
|
/**
|
||||||
|
* 获取战斗伤害信息
|
||||||
|
* @param enemy 怪物视图
|
||||||
|
*/
|
||||||
|
getDamageInfo(enemy: IEnemyView<TAttr>): IEnemyDamageInfo | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据怪物对象获取战斗伤害信息
|
||||||
|
* @param enemy 怪物对象
|
||||||
|
*/
|
||||||
|
getDamageInfoByComputed(
|
||||||
|
enemy: IReadonlyEnemy<TAttr>
|
||||||
|
): IEnemyDamageInfo | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算怪物在指定勇士属性下的临界
|
||||||
|
* @param enemy 怪物视图
|
||||||
|
* @param attribute 计算临界的目标勇士属性,比如计算攻击临界、自定义属性的临界等等
|
||||||
|
* @param precision 临界计算精度,表示会进行多少次二分计算,一般填写 `12-16` 之间的数即可,默认是 12
|
||||||
|
*/
|
||||||
|
calculateCritical(
|
||||||
|
enemy: IEnemyView<TAttr>,
|
||||||
|
attribute: CriticalableHeroStatus<THero>,
|
||||||
|
precision?: number
|
||||||
|
): Generator<IEnemyCritical, void, void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDamageSystem<TAttr, THero> extends IDamageContext<
|
||||||
|
TAttr,
|
||||||
|
THero
|
||||||
|
> {
|
||||||
/** 伤害系统所属的上下文 */
|
/** 伤害系统所属的上下文 */
|
||||||
readonly context: IEnemyContext<TAttr, THero>;
|
readonly context: IEnemyContext<TAttr, THero>;
|
||||||
|
|
||||||
@ -644,20 +684,6 @@ export interface IDamageSystem<TAttr, THero> {
|
|||||||
*/
|
*/
|
||||||
bindHeroStatus(hero: IReadonlyHeroAttribute<THero> | null): void;
|
bindHeroStatus(hero: IReadonlyHeroAttribute<THero> | null): void;
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取战斗伤害信息
|
|
||||||
* @param enemy 怪物视图
|
|
||||||
*/
|
|
||||||
getDamageInfo(enemy: IEnemyView<TAttr>): IEnemyDamageInfo | null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据怪物对象获取战斗伤害信息
|
|
||||||
* @param enemy 怪物对象
|
|
||||||
*/
|
|
||||||
getDamageInfoByComputed(
|
|
||||||
enemy: IReadonlyEnemy<TAttr>
|
|
||||||
): IEnemyDamageInfo | null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将指定的怪物标记为脏
|
* 将指定的怪物标记为脏
|
||||||
* @param enemy 怪物视图
|
* @param enemy 怪物视图
|
||||||
@ -676,16 +702,10 @@ export interface IDamageSystem<TAttr, THero> {
|
|||||||
markAllDirty(): void;
|
markAllDirty(): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算怪物在指定勇士属性下的临界
|
* 修改勇士属性,然后返回修改后勇士属性所组成的计算对象,不影响当前伤害系统的状态
|
||||||
* @param enemy 怪物视图
|
* @param modify 勇士修改函数
|
||||||
* @param attribute 计算临界的目标勇士属性,比如计算攻击临界、自定义属性的临界等等
|
|
||||||
* @param precision 临界计算精度,表示会进行多少次二分计算,一般填写 `12-16` 之间的数即可,默认是 12
|
|
||||||
*/
|
*/
|
||||||
calculateCritical(
|
with(hero: IHeroAttribute<THero>): IDamageContext<TAttr, THero>;
|
||||||
enemy: IEnemyView<TAttr>,
|
|
||||||
attribute: CriticalableHeroStatus<THero>,
|
|
||||||
precision?: number
|
|
||||||
): Generator<IEnemyCritical, void, void>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
import { DamageEnemy, ensureFloorDamage, getEnemy } from '@user/data-state';
|
import {
|
||||||
|
DamageEnemy,
|
||||||
|
ensureFloorDamage,
|
||||||
|
getEnemy,
|
||||||
|
state
|
||||||
|
} from '@user/data-state';
|
||||||
import { hook } from '@user/data-base';
|
import { hook } from '@user/data-base';
|
||||||
import { Patch, PatchClass } from '@motajs/legacy-common';
|
import { Patch, PatchClass } from '@motajs/legacy-common';
|
||||||
import { isNil } from 'lodash-es';
|
import { isNil } from 'lodash-es';
|
||||||
@ -193,7 +198,8 @@ export function patchBattle() {
|
|||||||
|
|
||||||
// 仇恨
|
// 仇恨
|
||||||
if (info.special.has(17)) {
|
if (info.special.has(17)) {
|
||||||
core.setFlag('hatred', core.getFlag('hatred', 0) / 2);
|
const hatred = state.flags.getFieldValueDefaults('hatred', 0);
|
||||||
|
core.setFlag('hatred', hatred / 2);
|
||||||
} else {
|
} else {
|
||||||
core.addFlag('hatred', core.values.hatred);
|
core.addFlag('hatred', core.values.hatred);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export function patchFlags(state: ICoreState) {
|
|||||||
const patch = new Patch(PatchClass.Control);
|
const patch = new Patch(PatchClass.Control);
|
||||||
const flags = state.flags;
|
const flags = state.flags;
|
||||||
patch.add('setFlag', (name, value) => {
|
patch.add('setFlag', (name, value) => {
|
||||||
logger.warn(56, 'core.setFlag', 'IFlagSystem');
|
logger.warn(56, 'core.setFlag', 'state.flags.setFieldValue');
|
||||||
if (value === null || value === undefined) {
|
if (value === null || value === undefined) {
|
||||||
flags.deleteField(name);
|
flags.deleteField(name);
|
||||||
} else {
|
} else {
|
||||||
@ -17,7 +17,7 @@ export function patchFlags(state: ICoreState) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
patch.add('getFlag', <T>(name: string, defaultValue?: T) => {
|
patch.add('getFlag', <T>(name: string, defaultValue?: T) => {
|
||||||
logger.warn(56, 'core.getFlag', 'IFlagSystem');
|
logger.warn(56, 'core.getFlag', 'state.flags.getFieldValueDefaults');
|
||||||
if (defaultValue === undefined) {
|
if (defaultValue === undefined) {
|
||||||
return flags.getFieldValue<T>(name);
|
return flags.getFieldValue<T>(name);
|
||||||
} else {
|
} else {
|
||||||
@ -25,14 +25,57 @@ export function patchFlags(state: ICoreState) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
patch.add('addFlag', (name, value) => {
|
patch.add('addFlag', (name, value) => {
|
||||||
logger.warn(56, 'core.addFlag', 'IFlagSystem');
|
logger.warn(56, 'core.addFlag', 'state.flags.addFieldValue');
|
||||||
if (typeof value !== 'number') return;
|
if (typeof value !== 'number') return;
|
||||||
flags.addFieldValue(name, value);
|
flags.addFieldValue(name, value);
|
||||||
});
|
});
|
||||||
patch.add('hasFlag', name => {
|
patch.add('hasFlag', name => {
|
||||||
|
logger.warn(56, 'core.hasFlag', 'state.flags.occupied');
|
||||||
return flags.occupied(name);
|
return flags.occupied(name);
|
||||||
});
|
});
|
||||||
patch.add('removeFlag', name => {
|
patch.add('removeFlag', name => {
|
||||||
|
logger.warn(56, 'core.removeFlag', 'state.flags.deleteField');
|
||||||
flags.deleteField(name);
|
flags.deleteField(name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const switchName = (
|
||||||
|
x?: number,
|
||||||
|
y?: number,
|
||||||
|
floorId?: string,
|
||||||
|
name?: string
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
(floorId ?? core.status.floorId ?? ':f') +
|
||||||
|
'@' +
|
||||||
|
(x ?? 'x') +
|
||||||
|
'@' +
|
||||||
|
(y ?? 'y') +
|
||||||
|
'@' +
|
||||||
|
name
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
patch.add('getSwitch', (x, y, floorId, name, defaultValue) => {
|
||||||
|
logger.warn(56, 'core.getSwitch', 'state.flags.getFieldValue');
|
||||||
|
return flags.getFieldValueDefaults(
|
||||||
|
switchName(x, y, floorId, name),
|
||||||
|
defaultValue
|
||||||
|
);
|
||||||
|
});
|
||||||
|
patch.add('setSwitch', (x, y, floorId, name, value) => {
|
||||||
|
logger.warn(56, 'core.setSwitch', 'state.flags.setFieldValue');
|
||||||
|
flags.setFieldValue(switchName(x, y, floorId, name), value);
|
||||||
|
});
|
||||||
|
patch.add('addSwitch', (x, y, floorId, name, value) => {
|
||||||
|
logger.warn(56, 'core.addSwitch', 'state.flags.addFieldValue');
|
||||||
|
flags.addFieldValue(switchName(x, y, floorId, name), value ?? 0);
|
||||||
|
});
|
||||||
|
patch.add('hasSwitch', (x, y, floorId, name) => {
|
||||||
|
logger.warn(56, 'core.hasSwitch', 'state.flags.occupied');
|
||||||
|
return flags.occupied(switchName(x, y, floorId, name));
|
||||||
|
});
|
||||||
|
patch.add('removeSwitch', (x, y, floorId, name) => {
|
||||||
|
logger.warn(56, 'core.removeSwitch', 'state.flags.deleteField');
|
||||||
|
flags.deleteField(switchName(x, y, floorId, name));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,14 @@ export function patchHero(state: ICoreState) {
|
|||||||
const attr = state.hero.getModifiableAttribute();
|
const attr = state.hero.getModifiableAttribute();
|
||||||
const proxy = new Proxy(hero, {
|
const proxy = new Proxy(hero, {
|
||||||
set(target, p, newValue) {
|
set(target, p, newValue) {
|
||||||
|
logger.warn(56, 'core.status.hero', 'state.hero');
|
||||||
target[p] = newValue;
|
target[p] = newValue;
|
||||||
// @ts-expect-error 旧样板无法处理此类型
|
// @ts-expect-error 旧样板无法处理此类型
|
||||||
attr.setBaseAttribute(p, newValue);
|
attr.setBaseAttribute(p, newValue);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
get(_, p) {
|
get(_, p) {
|
||||||
|
logger.warn(56, 'core.status.hero', 'state.hero');
|
||||||
// @ts-expect-error 旧样板无法处理此类型
|
// @ts-expect-error 旧样板无法处理此类型
|
||||||
return attr.getBaseAttribute(p);
|
return attr.getBaseAttribute(p);
|
||||||
}
|
}
|
||||||
@ -23,11 +25,11 @@ export function patchHero(state: ICoreState) {
|
|||||||
// 不允许再使用旧样板的 flags 接口
|
// 不允许再使用旧样板的 flags 接口
|
||||||
const flagsProxy = new Proxy(core.status.hero.flags, {
|
const flagsProxy = new Proxy(core.status.hero.flags, {
|
||||||
set() {
|
set() {
|
||||||
logger.error(54);
|
logger.error(54, 'flags', 'state.flags');
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
get() {
|
get() {
|
||||||
logger.error(54);
|
logger.error(54, 'flags', 'state.flags');
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { ICoreState, IStateSaveData } from './types';
|
import { ICoreState, IStateSaveData } from './types';
|
||||||
import { ILayerState, LayerState } from './map';
|
import { ILayerState, LayerState } from './map';
|
||||||
import { IRoleFaceBinder, RoleFaceBinder } from './common';
|
import { FaceDirection, IRoleFaceBinder, RoleFaceBinder } from './common';
|
||||||
import {
|
import {
|
||||||
DamageSystem,
|
DamageSystem,
|
||||||
EnemyContext,
|
EnemyContext,
|
||||||
@ -15,7 +15,8 @@ import {
|
|||||||
IFlagSystem,
|
IFlagSystem,
|
||||||
FlagSystem,
|
FlagSystem,
|
||||||
IMotaDataLoader,
|
IMotaDataLoader,
|
||||||
MotaDataLoader
|
MotaDataLoader,
|
||||||
|
loading
|
||||||
} from '@user/data-base';
|
} from '@user/data-base';
|
||||||
import { IEnemyAttr } from './enemy/types';
|
import { IEnemyAttr } from './enemy/types';
|
||||||
import {
|
import {
|
||||||
@ -31,6 +32,7 @@ import {
|
|||||||
import { HERO_DEFAULT_ATTRIBUTE, TILE_HEIGHT, TILE_WIDTH } from './shared';
|
import { HERO_DEFAULT_ATTRIBUTE, TILE_HEIGHT, TILE_WIDTH } from './shared';
|
||||||
import { IHeroAttr } from './hero';
|
import { IHeroAttr } from './hero';
|
||||||
import { ILoadProgressTotal, LoadProgressTotal } from '@motajs/loader';
|
import { ILoadProgressTotal, LoadProgressTotal } from '@motajs/loader';
|
||||||
|
import { isNil } from 'lodash-es';
|
||||||
|
|
||||||
export class CoreState implements ICoreState {
|
export class CoreState implements ICoreState {
|
||||||
readonly roleFace: IRoleFaceBinder;
|
readonly roleFace: IRoleFaceBinder;
|
||||||
@ -100,9 +102,45 @@ export class CoreState implements ICoreState {
|
|||||||
|
|
||||||
this.flags = new FlagSystem();
|
this.flags = new FlagSystem();
|
||||||
|
|
||||||
|
// 加载先使用兼容层实现
|
||||||
|
loading.once('loaded', () => {
|
||||||
|
this.initEnemyManager(enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80);
|
||||||
|
});
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化怪物管理器对象
|
||||||
|
* @param data 旧样板怪物存储对象
|
||||||
|
*/
|
||||||
|
private initEnemyManager(data: Record<EnemyIds, Enemy>) {
|
||||||
|
// TODO: 修改怪物模板并存入存档,即 core.setEnemy
|
||||||
|
const manager = this.enemyManager;
|
||||||
|
for (const [id, enemy] of Object.entries(structuredClone(data))) {
|
||||||
|
const num = this.idNumberMap.get(id);
|
||||||
|
if (isNil(num)) continue;
|
||||||
|
if (enemy.faceIds) {
|
||||||
|
// 有 faceId 的要把其他的也映射到当前怪物
|
||||||
|
const { left, up, right, down } = enemy.faceIds;
|
||||||
|
const leftCode = this.idNumberMap.get(left)!;
|
||||||
|
const upCode = this.idNumberMap.get(up)!;
|
||||||
|
const rightCode = this.idNumberMap.get(right)!;
|
||||||
|
const downCode = this.idNumberMap.get(down)!;
|
||||||
|
manager.addPrefabFromLegacy(downCode, enemy);
|
||||||
|
this.roleFace.malloc(downCode, FaceDirection.Down);
|
||||||
|
this.roleFace.bind(leftCode, downCode, FaceDirection.Left);
|
||||||
|
this.roleFace.bind(upCode, downCode, FaceDirection.Up);
|
||||||
|
this.roleFace.bind(rightCode, downCode, FaceDirection.Down);
|
||||||
|
manager.reusePrefab(num, leftCode, left);
|
||||||
|
manager.reusePrefab(num, upCode, up);
|
||||||
|
manager.reusePrefab(num, rightCode, right);
|
||||||
|
} else {
|
||||||
|
manager.addPrefabFromLegacy(num, enemy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
saveState(): IStateSaveData {
|
saveState(): IStateSaveData {
|
||||||
return structuredClone({
|
return structuredClone({
|
||||||
followers: this.hero.mover.followers
|
followers: this.hero.mover.followers
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import {
|
|||||||
import { IEnemyAttr } from './types';
|
import { IEnemyAttr } from './types';
|
||||||
import { IVampireValue } from './special';
|
import { IVampireValue } from './special';
|
||||||
import { IHeroAttr } from '../hero';
|
import { IHeroAttr } from '../hero';
|
||||||
|
import { state } from '../ins';
|
||||||
|
|
||||||
export class MainDamageCalculator implements IDamageCalculator<
|
export class MainDamageCalculator implements IDamageCalculator<
|
||||||
IEnemyAttr,
|
IEnemyAttr,
|
||||||
@ -143,7 +144,7 @@ export class MainDamageCalculator implements IDamageCalculator<
|
|||||||
|
|
||||||
// 仇恨,无法被魔防减伤
|
// 仇恨,无法被魔防减伤
|
||||||
if (enemy.hasSpecial(17)) {
|
if (enemy.hasSpecial(17)) {
|
||||||
damage += core.getFlag('hatred', 0);
|
damage += state.flags.getFieldValueDefaults('hatred', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { loading } from '@user/data-base';
|
import { loading } from '@user/data-base';
|
||||||
import { CoreState } from './core';
|
|
||||||
import { isNil } from 'lodash-es';
|
import { isNil } from 'lodash-es';
|
||||||
import { FaceDirection } from './common';
|
import { FaceDirection } from './common';
|
||||||
import { ICoreState } from './types';
|
import { ICoreState } from './types';
|
||||||
import { TILE_HEIGHT, TILE_WIDTH } from './shared';
|
import { TILE_HEIGHT, TILE_WIDTH } from './shared';
|
||||||
|
import { state } from './ins';
|
||||||
|
|
||||||
function createCoreState(state: ICoreState) {
|
function createCoreState(state: ICoreState) {
|
||||||
//#region 地图部分
|
//#region 地图部分
|
||||||
@ -62,13 +62,6 @@ export function create() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据端核心状态,目前处于过渡阶段,仅服务于渲染,不负责任何逻辑计算,会在后续把核心逻辑逐渐移动至此对象。
|
|
||||||
* 此对象是数据端状态,本身不负责任何渲染操作,仅会向渲染端发送数据让渲染端渲染,不要把渲染操作直接放到此对象上,
|
|
||||||
* 否则可能导致录像验证失败。
|
|
||||||
*/
|
|
||||||
export const state = new CoreState();
|
|
||||||
|
|
||||||
export * from './common';
|
export * from './common';
|
||||||
export * from './enemy';
|
export * from './enemy';
|
||||||
export * from './hero';
|
export * from './hero';
|
||||||
@ -76,5 +69,6 @@ export * from './legacy';
|
|||||||
export * from './map';
|
export * from './map';
|
||||||
|
|
||||||
export * from './core';
|
export * from './core';
|
||||||
|
export * from './ins';
|
||||||
export * from './shared';
|
export * from './shared';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
|
|||||||
10
packages-user/data-state/src/ins.ts
Normal file
10
packages-user/data-state/src/ins.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { CoreState } from './core';
|
||||||
|
|
||||||
|
// TODO: 逐渐弱化 CoreState 的单例概念,每个接口都通过参数传入 ICoreState 对象
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据端核心状态,目前处于过渡阶段,仅服务于渲染,不负责任何逻辑计算,会在后续把核心逻辑逐渐移动至此对象。
|
||||||
|
* 此对象是数据端状态,本身不负责任何渲染操作,仅会向渲染端发送数据让渲染端渲染,不要把渲染操作直接放到此对象上,
|
||||||
|
* 否则可能导致录像验证失败。
|
||||||
|
*/
|
||||||
|
export const state = new CoreState();
|
||||||
@ -9,7 +9,6 @@
|
|||||||
"@motajs/system": "workspace:*",
|
"@motajs/system": "workspace:*",
|
||||||
"@motajs/legacy-common": "workspace:*",
|
"@motajs/legacy-common": "workspace:*",
|
||||||
"@motajs/legacy-client": "workspace:*",
|
"@motajs/legacy-client": "workspace:*",
|
||||||
"@motajs/legacy-data": "workspace:*",
|
|
||||||
"@motajs/legacy-ui": "workspace:*",
|
"@motajs/legacy-ui": "workspace:*",
|
||||||
"@motajs/legacy-system": "workspace:*",
|
"@motajs/legacy-system": "workspace:*",
|
||||||
"@user/client-base": "workspace:*",
|
"@user/client-base": "workspace:*",
|
||||||
|
|||||||
@ -53,11 +53,11 @@ interface PortResponse {
|
|||||||
core.extractBlocks(data);
|
core.extractBlocks(data);
|
||||||
if (data === core.status.floorId) {
|
if (data === core.status.floorId) {
|
||||||
core.status.thisMap = core.status.maps[data];
|
core.status.thisMap = core.status.maps[data];
|
||||||
let weather = core.getFlag('__weather__', null);
|
// let weather = core.getFlag('__weather__', null);
|
||||||
if (!weather && core.status.thisMap.weather)
|
// if (!weather && core.status.thisMap.weather)
|
||||||
weather = core.status.thisMap.weather;
|
// weather = core.status.thisMap.weather;
|
||||||
if (weather) core.setWeather(weather[0], weather[1]);
|
// if (weather) core.setWeather(weather[0], weather[1]);
|
||||||
else core.setWeather();
|
// else core.setWeather();
|
||||||
}
|
}
|
||||||
core.status.maps[data].enemy?.extract();
|
core.status.maps[data].enemy?.extract();
|
||||||
core.status.maps[data].enemy?.calRealAttribute();
|
core.status.maps[data].enemy?.calRealAttribute();
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { hook } from '@user/data-base';
|
import { hook } from '@user/data-base';
|
||||||
|
import { isNil } from 'lodash-es';
|
||||||
|
|
||||||
const potionItems: AllIdsOf<'items'>[] = [
|
const potionItems: AllIdsOf<'items'>[] = [
|
||||||
'redPotion',
|
'redPotion',
|
||||||
@ -17,7 +18,7 @@ export function createHook() {
|
|||||||
|
|
||||||
const todo: any[] = [];
|
const todo: any[] = [];
|
||||||
// 检查该点的获得道具后事件。
|
// 检查该点的获得道具后事件。
|
||||||
if (core.status.floorId == null) return;
|
if (isNil(core.status.floorId)) return;
|
||||||
const event =
|
const event =
|
||||||
core.floors[core.status.floorId].afterGetItem[`${x},${y}`];
|
core.floors[core.status.floorId].afterGetItem[`${x},${y}`];
|
||||||
if (
|
if (
|
||||||
@ -28,34 +29,23 @@ export function createHook() {
|
|||||||
) {
|
) {
|
||||||
core.unshift(todo, event as any[]);
|
core.unshift(todo, event as any[]);
|
||||||
}
|
}
|
||||||
if (core.hasFlag('spring')) {
|
|
||||||
if (!core.hasFlag('springCount')) core.setFlag('springCount', 0);
|
|
||||||
if (potionItems.includes(itemId)) {
|
|
||||||
core.addFlag('springCount', 1);
|
|
||||||
}
|
|
||||||
if (core.getFlag<number>('springCount', 0) === 50) {
|
|
||||||
core.setFlag('springCount', 0);
|
|
||||||
core.status.hero.hpmax += core.getNakedStatus('hpmax') * 0.1;
|
|
||||||
}
|
|
||||||
core.updateStatusBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||||
});
|
});
|
||||||
|
|
||||||
hook.on('afterOpenDoor', (doorId, x, y) => {
|
hook.on('afterOpenDoor', (_doorId, x, y) => {
|
||||||
// 开一个门后触发的事件
|
// 开一个门后触发的事件s
|
||||||
|
|
||||||
const todo: any[] = [];
|
const todo: any[] = [];
|
||||||
// 检查该点的获得开门后事件。
|
// 检查该点的获得开门后事件。
|
||||||
if (core.status.floorId == null) return;
|
if (isNil(core.status.floorId)) return;
|
||||||
const event =
|
const event =
|
||||||
core.floors[core.status.floorId].afterOpenDoor[`${x},${y}`];
|
core.floors[core.status.floorId].afterOpenDoor[`${x},${y}`];
|
||||||
if (event) core.unshift(todo, event as any[]);
|
if (event) core.unshift(todo, event as any[]);
|
||||||
|
|
||||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||||
|
|
||||||
if (core.status.event.id == null) core.continueAutomaticRoute();
|
if (isNil(core.status.event.id)) core.continueAutomaticRoute();
|
||||||
else core.clearContinueAutomaticRoute();
|
else core.clearContinueAutomaticRoute();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
|
import { state } from '@user/data-state';
|
||||||
|
|
||||||
type Shop = CommonShopEvent | CommonEventShopEvent | ItemShopEvent;
|
type Shop = CommonShopEvent | CommonEventShopEvent | ItemShopEvent;
|
||||||
|
|
||||||
export function openShop(shopId: string, noRoute: boolean) {
|
export function openShop(shopId: string, noRoute: boolean) {
|
||||||
@ -40,7 +42,7 @@ export function openShop(shopId: string, noRoute: boolean) {
|
|||||||
/// 是否访问过某个快捷商店
|
/// 是否访问过某个快捷商店
|
||||||
export function isShopVisited(id: string) {
|
export function isShopVisited(id: string) {
|
||||||
flags.__shops__ ??= {};
|
flags.__shops__ ??= {};
|
||||||
const shops = core.getFlag<any>('__shops__');
|
const shops = state.flags.getFieldValue('__shops__');
|
||||||
if (!shops[id]) shops[id] = {};
|
if (!shops[id]) shops[id] = {};
|
||||||
return shops[id].visited;
|
return shops[id].visited;
|
||||||
}
|
}
|
||||||
@ -65,7 +67,7 @@ export function canOpenShop(id: string) {
|
|||||||
/// 启用或禁用某个快捷商店
|
/// 启用或禁用某个快捷商店
|
||||||
export function setShopVisited(id: string, visited: boolean) {
|
export function setShopVisited(id: string, visited: boolean) {
|
||||||
if (!core.hasFlag('__shops__')) core.setFlag('__shops__', {});
|
if (!core.hasFlag('__shops__')) core.setFlag('__shops__', {});
|
||||||
const shops = core.getFlag<any>('__shops__');
|
const shops = state.flags.getFieldValue('__shops__');
|
||||||
if (!shops[id]) shops[id] = {};
|
if (!shops[id]) shops[id] = {};
|
||||||
if (visited) shops[id].visited = true;
|
if (visited) shops[id].visited = true;
|
||||||
else delete shops[id].visited;
|
else delete shops[id].visited;
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
"51": "Animatable object cannot be animated by plans with the same start time.",
|
"51": "Animatable object cannot be animated by plans with the same start time.",
|
||||||
"52": "To get divider payload, an excitation binding is expected.",
|
"52": "To get divider payload, an excitation binding is expected.",
|
||||||
"53": "Expected serializable value set as enemy's default attribute.",
|
"53": "Expected serializable value set as enemy's default attribute.",
|
||||||
"54": "Legacy flags API has been removed, consider using new APIs.",
|
"54": "Legacy '$1' API has been removed, consider using new APIs: '$2'.",
|
||||||
"1201": "Floor-damage extension needs 'floor-binder' extension as dependency."
|
"1201": "Floor-damage extension needs 'floor-binder' extension as dependency."
|
||||||
},
|
},
|
||||||
"warn": {
|
"warn": {
|
||||||
|
|||||||
409
pnpm-lock.yaml
409
pnpm-lock.yaml
@ -10,7 +10,7 @@ importers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@ant-design/icons-vue':
|
'@ant-design/icons-vue':
|
||||||
specifier: ^6.1.0
|
specifier: ^6.1.0
|
||||||
version: 6.1.0(vue@3.5.29(typescript@6.0.1-rc))
|
version: 6.1.0(vue@3.5.29(typescript@6.0.3))
|
||||||
'@wasm-audio-decoders/ogg-vorbis':
|
'@wasm-audio-decoders/ogg-vorbis':
|
||||||
specifier: ^0.1.20
|
specifier: ^0.1.20
|
||||||
version: 0.1.20
|
version: 0.1.20
|
||||||
@ -19,7 +19,7 @@ importers:
|
|||||||
version: 0.0.0-alpha.0
|
version: 0.0.0-alpha.0
|
||||||
ant-design-vue:
|
ant-design-vue:
|
||||||
specifier: ^3.2.20
|
specifier: ^3.2.20
|
||||||
version: 3.2.20(vue@3.5.29(typescript@6.0.1-rc))
|
version: 3.2.20(vue@3.5.29(typescript@6.0.3))
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.13.6
|
specifier: ^1.13.6
|
||||||
version: 1.13.6
|
version: 1.13.6
|
||||||
@ -29,6 +29,9 @@ importers:
|
|||||||
codec-parser:
|
codec-parser:
|
||||||
specifier: ^2.5.0
|
specifier: ^2.5.0
|
||||||
version: 2.5.0
|
version: 2.5.0
|
||||||
|
dexie:
|
||||||
|
specifier: ^4.4.2
|
||||||
|
version: 4.4.2
|
||||||
eventemitter3:
|
eventemitter3:
|
||||||
specifier: ^5.0.4
|
specifier: ^5.0.4
|
||||||
version: 5.0.4
|
version: 5.0.4
|
||||||
@ -58,7 +61,7 @@ importers:
|
|||||||
version: 0.7.11
|
version: 0.7.11
|
||||||
vue:
|
vue:
|
||||||
specifier: ^3.5.29
|
specifier: ^3.5.29
|
||||||
version: 3.5.29(typescript@6.0.1-rc)
|
version: 3.5.29(typescript@6.0.3)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/cli':
|
'@babel/cli':
|
||||||
specifier: ^7.28.6
|
specifier: ^7.28.6
|
||||||
@ -92,7 +95,7 @@ importers:
|
|||||||
version: 0.4.4(rollup@4.59.0)
|
version: 0.4.4(rollup@4.59.0)
|
||||||
'@rollup/plugin-typescript':
|
'@rollup/plugin-typescript':
|
||||||
specifier: ^11.1.6
|
specifier: ^11.1.6
|
||||||
version: 11.1.6(rollup@4.59.0)(tslib@2.8.1)(typescript@6.0.1-rc)
|
version: 11.1.6(rollup@4.59.0)(tslib@2.8.1)(typescript@6.0.3)
|
||||||
'@types/archiver':
|
'@types/archiver':
|
||||||
specifier: ^6.0.4
|
specifier: ^6.0.4
|
||||||
version: 6.0.4
|
version: 6.0.4
|
||||||
@ -122,10 +125,10 @@ importers:
|
|||||||
version: 7.2.1(terser@5.46.0)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))
|
version: 7.2.1(terser@5.46.0)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))
|
||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: ^6.0.4
|
specifier: ^6.0.4
|
||||||
version: 6.0.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.1-rc))
|
version: 6.0.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.3))
|
||||||
'@vitejs/plugin-vue-jsx':
|
'@vitejs/plugin-vue-jsx':
|
||||||
specifier: ^5.1.4
|
specifier: ^5.1.4
|
||||||
version: 5.1.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.1-rc))
|
version: 5.1.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.3))
|
||||||
archiver:
|
archiver:
|
||||||
specifier: ^7.0.1
|
specifier: ^7.0.1
|
||||||
version: 7.0.1
|
version: 7.0.1
|
||||||
@ -170,7 +173,7 @@ importers:
|
|||||||
version: 4.5.1
|
version: 4.5.1
|
||||||
madge:
|
madge:
|
||||||
specifier: ^8.0.0
|
specifier: ^8.0.0
|
||||||
version: 8.0.0(typescript@6.0.1-rc)
|
version: 8.0.0(typescript@6.0.3)
|
||||||
markdown-it-mathjax3:
|
markdown-it-mathjax3:
|
||||||
specifier: ^4.3.2
|
specifier: ^4.3.2
|
||||||
version: 4.3.2(encoding@0.1.13)
|
version: 4.3.2(encoding@0.1.13)
|
||||||
@ -193,41 +196,47 @@ importers:
|
|||||||
specifier: ^4.21.0
|
specifier: ^4.21.0
|
||||||
version: 4.21.0
|
version: 4.21.0
|
||||||
typescript:
|
typescript:
|
||||||
specifier: 6.0.1-rc
|
specifier: 6.0.3
|
||||||
version: 6.0.1-rc
|
version: 6.0.3
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.57.0
|
specifier: ^8.58.2
|
||||||
version: 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
version: 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^7.3.1
|
specifier: ^7.3.1
|
||||||
version: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
version: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
||||||
vite-plugin-dts:
|
vite-plugin-dts:
|
||||||
specifier: ^4.5.4
|
specifier: ^4.5.4
|
||||||
version: 4.5.4(@types/node@22.19.15)(rollup@4.59.0)(typescript@6.0.1-rc)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))
|
version: 4.5.4(@types/node@22.19.15)(rollup@4.59.0)(typescript@6.0.3)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))
|
||||||
vitepress:
|
vitepress:
|
||||||
specifier: ^1.6.4
|
specifier: ^1.6.4
|
||||||
version: 1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.1-rc)
|
version: 1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.3)
|
||||||
vitepress-plugin-mermaid:
|
vitepress-plugin-mermaid:
|
||||||
specifier: ^2.0.17
|
specifier: ^2.0.17
|
||||||
version: 2.0.17(mermaid@11.12.3)(vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.1-rc))
|
version: 2.0.17(mermaid@11.12.3)(vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.3))
|
||||||
vitest:
|
vitest:
|
||||||
specifier: ^4.0.18
|
specifier: ^4.0.18
|
||||||
version: 4.0.18(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
version: 4.0.18(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^2.2.12
|
specifier: ^2.2.12
|
||||||
version: 2.2.12(typescript@6.0.1-rc)
|
version: 2.2.12(typescript@6.0.3)
|
||||||
ws:
|
ws:
|
||||||
specifier: ^8.19.0
|
specifier: ^8.19.0
|
||||||
version: 8.19.0
|
version: 8.19.0
|
||||||
|
|
||||||
packages-user/client-base:
|
packages-user/client-base:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@motajs/audio':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/audio
|
||||||
'@motajs/client-base':
|
'@motajs/client-base':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/client-base
|
version: link:../../packages/client-base
|
||||||
'@motajs/render':
|
'@motajs/render':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/render
|
version: link:../../packages/render
|
||||||
|
'@user/data-base':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../data-base
|
||||||
|
|
||||||
packages-user/client-modules:
|
packages-user/client-modules:
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -270,6 +279,12 @@ importers:
|
|||||||
|
|
||||||
packages-user/data-base:
|
packages-user/data-base:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@motajs/common':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/common
|
||||||
|
'@motajs/loader':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/loader
|
||||||
'@motajs/types':
|
'@motajs/types':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/types
|
version: link:../../packages/types
|
||||||
@ -327,9 +342,6 @@ importers:
|
|||||||
'@motajs/legacy-common':
|
'@motajs/legacy-common':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/legacy-common
|
version: link:../../packages/legacy-common
|
||||||
'@motajs/legacy-data':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../../packages/legacy-data
|
|
||||||
'@motajs/legacy-system':
|
'@motajs/legacy-system':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/legacy-system
|
version: link:../../packages/legacy-system
|
||||||
@ -401,6 +413,15 @@ importers:
|
|||||||
|
|
||||||
packages/animate: {}
|
packages/animate: {}
|
||||||
|
|
||||||
|
packages/audio:
|
||||||
|
dependencies:
|
||||||
|
'@motajs/common':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../common
|
||||||
|
'@motajs/loader':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../loader
|
||||||
|
|
||||||
packages/client:
|
packages/client:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@motajs/client-base':
|
'@motajs/client-base':
|
||||||
@ -459,6 +480,12 @@ importers:
|
|||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../system
|
version: link:../system
|
||||||
|
|
||||||
|
packages/loader:
|
||||||
|
dependencies:
|
||||||
|
'@motajs/common':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../common
|
||||||
|
|
||||||
packages/render: {}
|
packages/render: {}
|
||||||
|
|
||||||
packages/render-vue:
|
packages/render-vue:
|
||||||
@ -2336,63 +2363,63 @@ packages:
|
|||||||
'@types/ws@8.18.1':
|
'@types/ws@8.18.1':
|
||||||
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
|
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.57.0':
|
'@typescript-eslint/eslint-plugin@8.58.2':
|
||||||
resolution: {integrity: sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==}
|
resolution: {integrity: sha512-aC2qc5thQahutKjP+cl8cgN9DWe3ZUqVko30CMSZHnFEHyhOYoZSzkGtAI2mcwZ38xeImDucI4dnqsHiOYuuCw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@typescript-eslint/parser': ^8.57.0
|
'@typescript-eslint/parser': ^8.58.2
|
||||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.57.0':
|
'@typescript-eslint/parser@8.58.2':
|
||||||
resolution: {integrity: sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==}
|
resolution: {integrity: sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/project-service@8.57.0':
|
'@typescript-eslint/project-service@8.58.2':
|
||||||
resolution: {integrity: sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==}
|
resolution: {integrity: sha512-Cq6UfpZZk15+r87BkIh5rDpi38W4b+Sjnb8wQCPPDDweS/LRCFjCyViEbzHk5Ck3f2QDfgmlxqSa7S7clDtlfg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/scope-manager@8.57.0':
|
'@typescript-eslint/scope-manager@8.58.2':
|
||||||
resolution: {integrity: sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==}
|
resolution: {integrity: sha512-SgmyvDPexWETQek+qzZnrG6844IaO02UVyOLhI4wpo82dpZJY9+6YZCKAMFzXb7qhx37mFK1QcPQ18tud+vo6Q==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@typescript-eslint/tsconfig-utils@8.57.0':
|
'@typescript-eslint/tsconfig-utils@8.58.2':
|
||||||
resolution: {integrity: sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==}
|
resolution: {integrity: sha512-3SR+RukipDvkkKp/d0jP0dyzuls3DbGmwDpVEc5wqk5f38KFThakqAAO0XMirWAE+kT00oTauTbzMFGPoAzB0A==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.57.0':
|
'@typescript-eslint/type-utils@8.58.2':
|
||||||
resolution: {integrity: sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==}
|
resolution: {integrity: sha512-Z7EloNR/B389FvabdGeTo2XMs4W9TjtPiO9DAsmT0yom0bwlPyRjkJ1uCdW1DvrrrYP50AJZ9Xc3sByZA9+dcg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/types@8.57.0':
|
'@typescript-eslint/types@8.58.2':
|
||||||
resolution: {integrity: sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==}
|
resolution: {integrity: sha512-9TukXyATBQf/Jq9AMQXfvurk+G5R2MwfqQGDR2GzGz28HvY/lXNKGhkY+6IOubwcquikWk5cjlgPvD2uAA7htQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@typescript-eslint/typescript-estree@8.57.0':
|
'@typescript-eslint/typescript-estree@8.58.2':
|
||||||
resolution: {integrity: sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==}
|
resolution: {integrity: sha512-ELGuoofuhhoCvNbQjFFiobFcGgcDCEm0ThWdmO4Z0UzLqPXS3KFvnEZ+SHewwOYHjM09tkzOWXNTv9u6Gqtyuw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.57.0':
|
'@typescript-eslint/utils@8.58.2':
|
||||||
resolution: {integrity: sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==}
|
resolution: {integrity: sha512-QZfjHNEzPY8+l0+fIXMvuQ2sJlplB4zgDZvA+NmvZsZv3EQwOcc1DuIU1VJUTWZ/RKouBMhDyNaBMx4sWvrzRA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
'@typescript-eslint/visitor-keys@8.57.0':
|
'@typescript-eslint/visitor-keys@8.58.2':
|
||||||
resolution: {integrity: sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==}
|
resolution: {integrity: sha512-f1WO2Lx8a9t8DARmcWAUPJbu0G20bJlj8L4z72K00TMeJAoyLr/tHhI/pzYBLrR4dXWkcxO1cWYZEOX8DKHTqA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@ungap/structured-clone@1.3.0':
|
'@ungap/structured-clone@1.3.0':
|
||||||
@ -2914,6 +2941,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==}
|
resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==}
|
||||||
engines: {node: 18 || 20 || >=22}
|
engines: {node: 18 || 20 || >=22}
|
||||||
|
|
||||||
|
brace-expansion@5.0.5:
|
||||||
|
resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==}
|
||||||
|
engines: {node: 18 || 20 || >=22}
|
||||||
|
|
||||||
braces@3.0.3:
|
braces@3.0.3:
|
||||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@ -3494,6 +3525,9 @@ packages:
|
|||||||
devlop@1.1.0:
|
devlop@1.1.0:
|
||||||
resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
|
resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
|
||||||
|
|
||||||
|
dexie@4.4.2:
|
||||||
|
resolution: {integrity: sha512-zMtV8q79EFE5U8FKZvt0Y/77PCU/Hr/RDxv1EDeo228L+m/HTbeN2AjoQm674rhQCX8n3ljK87lajt7UQuZfvw==}
|
||||||
|
|
||||||
diff@8.0.3:
|
diff@8.0.3:
|
||||||
resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==}
|
resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==}
|
||||||
engines: {node: '>=0.3.1'}
|
engines: {node: '>=0.3.1'}
|
||||||
@ -4641,6 +4675,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==}
|
resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==}
|
||||||
engines: {node: 18 || 20 || >=22}
|
engines: {node: 18 || 20 || >=22}
|
||||||
|
|
||||||
|
minimatch@10.2.5:
|
||||||
|
resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==}
|
||||||
|
engines: {node: 18 || 20 || >=22}
|
||||||
|
|
||||||
minimatch@3.1.5:
|
minimatch@3.1.5:
|
||||||
resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==}
|
resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==}
|
||||||
|
|
||||||
@ -4963,6 +5001,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
|
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
|
picomatch@4.0.4:
|
||||||
|
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
|
||||||
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
pify@4.0.1:
|
pify@4.0.1:
|
||||||
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@ -5741,6 +5783,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
|
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
||||||
|
tinyglobby@0.2.16:
|
||||||
|
resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==}
|
||||||
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
||||||
tinyrainbow@3.0.3:
|
tinyrainbow@3.0.3:
|
||||||
resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==}
|
resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
@ -5767,8 +5813,8 @@ packages:
|
|||||||
trim-lines@3.0.1:
|
trim-lines@3.0.1:
|
||||||
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
|
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
|
||||||
|
|
||||||
ts-api-utils@2.4.0:
|
ts-api-utils@2.5.0:
|
||||||
resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==}
|
resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==}
|
||||||
engines: {node: '>=18.12'}
|
engines: {node: '>=18.12'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.8.4'
|
typescript: '>=4.8.4'
|
||||||
@ -5829,12 +5875,12 @@ packages:
|
|||||||
typedarray@0.0.6:
|
typedarray@0.0.6:
|
||||||
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
||||||
|
|
||||||
typescript-eslint@8.57.0:
|
typescript-eslint@8.58.2:
|
||||||
resolution: {integrity: sha512-W8GcigEMEeB07xEZol8oJ26rigm3+bfPHxHvwbYUlu1fUDsGuQ7Hiskx5xGW/xM4USc9Ephe3jtv7ZYPQntHeA==}
|
resolution: {integrity: sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||||
typescript: '>=4.8.4 <6.0.0'
|
typescript: '>=4.8.4 <6.1.0'
|
||||||
|
|
||||||
typescript@5.8.2:
|
typescript@5.8.2:
|
||||||
resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
|
resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
|
||||||
@ -5846,8 +5892,8 @@ packages:
|
|||||||
engines: {node: '>=14.17'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
typescript@6.0.1-rc:
|
typescript@6.0.3:
|
||||||
resolution: {integrity: sha512-7XlzYb+p/7YxX6qSOzwB4mxVFRdAgWWkj1PgAZ+jzldeuFV6Z77vwFbNxHsUXAL/bhlWY2jCT8shLwDJR8337g==}
|
resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
|
||||||
engines: {node: '>=14.17'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
@ -6377,11 +6423,11 @@ snapshots:
|
|||||||
|
|
||||||
'@ant-design/icons-svg@4.4.2': {}
|
'@ant-design/icons-svg@4.4.2': {}
|
||||||
|
|
||||||
'@ant-design/icons-vue@6.1.0(vue@3.5.29(typescript@6.0.1-rc))':
|
'@ant-design/icons-vue@6.1.0(vue@3.5.29(typescript@6.0.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ant-design/colors': 6.0.0
|
'@ant-design/colors': 6.0.0
|
||||||
'@ant-design/icons-svg': 4.4.2
|
'@ant-design/icons-svg': 4.4.2
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
|
|
||||||
'@antfu/install-pkg@1.1.0':
|
'@antfu/install-pkg@1.1.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -7762,11 +7808,11 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.59.0
|
rollup: 4.59.0
|
||||||
|
|
||||||
'@rollup/plugin-typescript@11.1.6(rollup@4.59.0)(tslib@2.8.1)(typescript@6.0.1-rc)':
|
'@rollup/plugin-typescript@11.1.6(rollup@4.59.0)(tslib@2.8.1)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.3.0(rollup@4.59.0)
|
'@rollup/pluginutils': 5.3.0(rollup@4.59.0)
|
||||||
resolve: 1.22.11
|
resolve: 1.22.11
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.59.0
|
rollup: 4.59.0
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
@ -8210,123 +8256,123 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.19.15
|
'@types/node': 22.19.15
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc))(eslint@9.39.4)(typescript@6.0.1-rc)':
|
'@typescript-eslint/eslint-plugin@8.58.2(@typescript-eslint/parser@8.58.2(eslint@9.39.4)(typescript@6.0.3))(eslint@9.39.4)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/regexpp': 4.12.2
|
'@eslint-community/regexpp': 4.12.2
|
||||||
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/parser': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
'@typescript-eslint/scope-manager': 8.57.0
|
'@typescript-eslint/scope-manager': 8.58.2
|
||||||
'@typescript-eslint/type-utils': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/type-utils': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/utils': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
'@typescript-eslint/visitor-keys': 8.57.0
|
'@typescript-eslint/visitor-keys': 8.58.2
|
||||||
eslint: 9.39.4
|
eslint: 9.39.4
|
||||||
ignore: 7.0.5
|
ignore: 7.0.5
|
||||||
natural-compare: 1.4.0
|
natural-compare: 1.4.0
|
||||||
ts-api-utils: 2.4.0(typescript@6.0.1-rc)
|
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)':
|
'@typescript-eslint/parser@8.58.2(eslint@9.39.4)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 8.57.0
|
'@typescript-eslint/scope-manager': 8.58.2
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/typescript-estree': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/visitor-keys': 8.57.0
|
'@typescript-eslint/visitor-keys': 8.58.2
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
eslint: 9.39.4
|
eslint: 9.39.4
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/project-service@8.57.0(typescript@5.9.3)':
|
'@typescript-eslint/project-service@8.58.2(typescript@5.9.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3)
|
'@typescript-eslint/tsconfig-utils': 8.58.2(typescript@5.9.3)
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/project-service@8.57.0(typescript@6.0.1-rc)':
|
'@typescript-eslint/project-service@8.58.2(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/scope-manager@8.57.0':
|
'@typescript-eslint/scope-manager@8.58.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/visitor-keys': 8.57.0
|
'@typescript-eslint/visitor-keys': 8.58.2
|
||||||
|
|
||||||
'@typescript-eslint/tsconfig-utils@8.57.0(typescript@5.9.3)':
|
'@typescript-eslint/tsconfig-utils@8.58.2(typescript@5.9.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
|
|
||||||
'@typescript-eslint/tsconfig-utils@8.57.0(typescript@6.0.1-rc)':
|
'@typescript-eslint/tsconfig-utils@8.58.2(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)':
|
'@typescript-eslint/type-utils@8.58.2(eslint@9.39.4)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/typescript-estree': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/utils': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
eslint: 9.39.4
|
eslint: 9.39.4
|
||||||
ts-api-utils: 2.4.0(typescript@6.0.1-rc)
|
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/types@8.57.0': {}
|
'@typescript-eslint/types@8.58.2': {}
|
||||||
|
|
||||||
'@typescript-eslint/typescript-estree@8.57.0(typescript@5.9.3)':
|
'@typescript-eslint/typescript-estree@8.58.2(typescript@5.9.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/project-service': 8.57.0(typescript@5.9.3)
|
'@typescript-eslint/project-service': 8.58.2(typescript@5.9.3)
|
||||||
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3)
|
'@typescript-eslint/tsconfig-utils': 8.58.2(typescript@5.9.3)
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/visitor-keys': 8.57.0
|
'@typescript-eslint/visitor-keys': 8.58.2
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
minimatch: 10.2.4
|
minimatch: 10.2.5
|
||||||
semver: 7.7.4
|
semver: 7.7.4
|
||||||
tinyglobby: 0.2.15
|
tinyglobby: 0.2.16
|
||||||
ts-api-utils: 2.4.0(typescript@5.9.3)
|
ts-api-utils: 2.5.0(typescript@5.9.3)
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/typescript-estree@8.57.0(typescript@6.0.1-rc)':
|
'@typescript-eslint/typescript-estree@8.58.2(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/project-service': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/project-service': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/visitor-keys': 8.57.0
|
'@typescript-eslint/visitor-keys': 8.58.2
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
minimatch: 10.2.4
|
minimatch: 10.2.5
|
||||||
semver: 7.7.4
|
semver: 7.7.4
|
||||||
tinyglobby: 0.2.15
|
tinyglobby: 0.2.16
|
||||||
ts-api-utils: 2.4.0(typescript@6.0.1-rc)
|
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)':
|
'@typescript-eslint/utils@8.58.2(eslint@9.39.4)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4)
|
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4)
|
||||||
'@typescript-eslint/scope-manager': 8.57.0
|
'@typescript-eslint/scope-manager': 8.58.2
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
'@typescript-eslint/typescript-estree': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3)
|
||||||
eslint: 9.39.4
|
eslint: 9.39.4
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/visitor-keys@8.57.0':
|
'@typescript-eslint/visitor-keys@8.58.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.57.0
|
'@typescript-eslint/types': 8.58.2
|
||||||
eslint-visitor-keys: 5.0.1
|
eslint-visitor-keys: 5.0.1
|
||||||
|
|
||||||
'@ungap/structured-clone@1.3.0': {}
|
'@ungap/structured-clone@1.3.0': {}
|
||||||
@ -8350,7 +8396,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.1-rc))':
|
'@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.29.0
|
'@babel/core': 7.29.0
|
||||||
'@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0)
|
'@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0)
|
||||||
@ -8358,20 +8404,20 @@ snapshots:
|
|||||||
'@rolldown/pluginutils': 1.0.0-rc.7
|
'@rolldown/pluginutils': 1.0.0-rc.7
|
||||||
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.0)
|
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.0)
|
||||||
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0))(vue@3.5.29(typescript@6.0.1-rc))':
|
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0))(vue@3.5.29(typescript@6.0.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)
|
vite: 5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
|
|
||||||
'@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.1-rc))':
|
'@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0))(vue@3.5.29(typescript@6.0.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.0-rc.2
|
'@rolldown/pluginutils': 1.0.0-rc.2
|
||||||
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
|
|
||||||
'@vitest/expect@4.0.18':
|
'@vitest/expect@4.0.18':
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -8518,7 +8564,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
rfdc: 1.4.1
|
rfdc: 1.4.1
|
||||||
|
|
||||||
'@vue/language-core@2.2.0(typescript@6.0.1-rc)':
|
'@vue/language-core@2.2.0(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.28
|
'@volar/language-core': 2.4.28
|
||||||
'@vue/compiler-dom': 3.5.29
|
'@vue/compiler-dom': 3.5.29
|
||||||
@ -8529,9 +8575,9 @@ snapshots:
|
|||||||
muggle-string: 0.4.1
|
muggle-string: 0.4.1
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
'@vue/language-core@2.2.12(typescript@6.0.1-rc)':
|
'@vue/language-core@2.2.12(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.15
|
'@volar/language-core': 2.4.15
|
||||||
'@vue/compiler-dom': 3.5.29
|
'@vue/compiler-dom': 3.5.29
|
||||||
@ -8542,7 +8588,7 @@ snapshots:
|
|||||||
muggle-string: 0.4.1
|
muggle-string: 0.4.1
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
'@vue/reactivity@3.5.29':
|
'@vue/reactivity@3.5.29':
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -8560,28 +8606,28 @@ snapshots:
|
|||||||
'@vue/shared': 3.5.29
|
'@vue/shared': 3.5.29
|
||||||
csstype: 3.2.3
|
csstype: 3.2.3
|
||||||
|
|
||||||
'@vue/server-renderer@3.5.29(vue@3.5.29(typescript@6.0.1-rc))':
|
'@vue/server-renderer@3.5.29(vue@3.5.29(typescript@6.0.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-ssr': 3.5.29
|
'@vue/compiler-ssr': 3.5.29
|
||||||
'@vue/shared': 3.5.29
|
'@vue/shared': 3.5.29
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
|
|
||||||
'@vue/shared@3.5.29': {}
|
'@vue/shared@3.5.29': {}
|
||||||
|
|
||||||
'@vueuse/core@12.8.2(typescript@6.0.1-rc)':
|
'@vueuse/core@12.8.2(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/web-bluetooth': 0.0.21
|
'@types/web-bluetooth': 0.0.21
|
||||||
'@vueuse/metadata': 12.8.2
|
'@vueuse/metadata': 12.8.2
|
||||||
'@vueuse/shared': 12.8.2(typescript@6.0.1-rc)
|
'@vueuse/shared': 12.8.2(typescript@6.0.3)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
'@vueuse/integrations@12.8.2(async-validator@4.2.5)(axios@1.13.6)(focus-trap@7.8.0)(typescript@6.0.1-rc)':
|
'@vueuse/integrations@12.8.2(async-validator@4.2.5)(axios@1.13.6)(focus-trap@7.8.0)(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vueuse/core': 12.8.2(typescript@6.0.1-rc)
|
'@vueuse/core': 12.8.2(typescript@6.0.3)
|
||||||
'@vueuse/shared': 12.8.2(typescript@6.0.1-rc)
|
'@vueuse/shared': 12.8.2(typescript@6.0.3)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
async-validator: 4.2.5
|
async-validator: 4.2.5
|
||||||
axios: 1.13.6
|
axios: 1.13.6
|
||||||
@ -8591,9 +8637,9 @@ snapshots:
|
|||||||
|
|
||||||
'@vueuse/metadata@12.8.2': {}
|
'@vueuse/metadata@12.8.2': {}
|
||||||
|
|
||||||
'@vueuse/shared@12.8.2(typescript@6.0.1-rc)':
|
'@vueuse/shared@12.8.2(typescript@6.0.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
@ -8698,10 +8744,10 @@ snapshots:
|
|||||||
|
|
||||||
ansi-styles@6.2.3: {}
|
ansi-styles@6.2.3: {}
|
||||||
|
|
||||||
ant-design-vue@3.2.20(vue@3.5.29(typescript@6.0.1-rc)):
|
ant-design-vue@3.2.20(vue@3.5.29(typescript@6.0.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ant-design/colors': 6.0.0
|
'@ant-design/colors': 6.0.0
|
||||||
'@ant-design/icons-vue': 6.1.0(vue@3.5.29(typescript@6.0.1-rc))
|
'@ant-design/icons-vue': 6.1.0(vue@3.5.29(typescript@6.0.3))
|
||||||
'@babel/runtime': 7.28.6
|
'@babel/runtime': 7.28.6
|
||||||
'@ctrl/tinycolor': 3.6.1
|
'@ctrl/tinycolor': 3.6.1
|
||||||
'@simonwep/pickr': 1.8.2
|
'@simonwep/pickr': 1.8.2
|
||||||
@ -8715,8 +8761,8 @@ snapshots:
|
|||||||
resize-observer-polyfill: 1.5.1
|
resize-observer-polyfill: 1.5.1
|
||||||
scroll-into-view-if-needed: 2.2.31
|
scroll-into-view-if-needed: 2.2.31
|
||||||
shallow-equal: 1.2.1
|
shallow-equal: 1.2.1
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
vue-types: 3.0.2(vue@3.5.29(typescript@6.0.1-rc))
|
vue-types: 3.0.2(vue@3.5.29(typescript@6.0.3))
|
||||||
warning: 4.0.3
|
warning: 4.0.3
|
||||||
|
|
||||||
any-promise@1.3.0: {}
|
any-promise@1.3.0: {}
|
||||||
@ -8981,6 +9027,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
balanced-match: 4.0.4
|
balanced-match: 4.0.4
|
||||||
|
|
||||||
|
brace-expansion@5.0.5:
|
||||||
|
dependencies:
|
||||||
|
balanced-match: 4.0.4
|
||||||
|
|
||||||
braces@3.0.3:
|
braces@3.0.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
fill-range: 7.1.1
|
fill-range: 7.1.1
|
||||||
@ -9587,7 +9637,7 @@ snapshots:
|
|||||||
|
|
||||||
detective-typescript@14.0.0(typescript@5.9.3):
|
detective-typescript@14.0.0(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3)
|
'@typescript-eslint/typescript-estree': 8.58.2(typescript@5.9.3)
|
||||||
ast-module-types: 6.0.1
|
ast-module-types: 6.0.1
|
||||||
node-source-walk: 7.0.1
|
node-source-walk: 7.0.1
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
@ -9611,6 +9661,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
dequal: 2.0.3
|
dequal: 2.0.3
|
||||||
|
|
||||||
|
dexie@4.4.2: {}
|
||||||
|
|
||||||
diff@8.0.3: {}
|
diff@8.0.3: {}
|
||||||
|
|
||||||
doctrine@2.1.0:
|
doctrine@2.1.0:
|
||||||
@ -10089,6 +10141,10 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
|
|
||||||
|
fdir@6.5.0(picomatch@4.0.4):
|
||||||
|
optionalDependencies:
|
||||||
|
picomatch: 4.0.4
|
||||||
|
|
||||||
file-entry-cache@8.0.0:
|
file-entry-cache@8.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
flat-cache: 4.0.1
|
flat-cache: 4.0.1
|
||||||
@ -10840,7 +10896,7 @@ snapshots:
|
|||||||
|
|
||||||
lz-string@1.5.0: {}
|
lz-string@1.5.0: {}
|
||||||
|
|
||||||
madge@8.0.0(typescript@6.0.1-rc):
|
madge@8.0.0(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
commander: 7.2.0
|
commander: 7.2.0
|
||||||
@ -10855,7 +10911,7 @@ snapshots:
|
|||||||
ts-graphviz: 2.1.6
|
ts-graphviz: 2.1.6
|
||||||
walkdir: 0.4.1
|
walkdir: 0.4.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@ -10996,6 +11052,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion: 5.0.4
|
brace-expansion: 5.0.4
|
||||||
|
|
||||||
|
minimatch@10.2.5:
|
||||||
|
dependencies:
|
||||||
|
brace-expansion: 5.0.5
|
||||||
|
|
||||||
minimatch@3.1.5:
|
minimatch@3.1.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion: 1.1.12
|
brace-expansion: 1.1.12
|
||||||
@ -11318,6 +11378,8 @@ snapshots:
|
|||||||
|
|
||||||
picomatch@4.0.3: {}
|
picomatch@4.0.3: {}
|
||||||
|
|
||||||
|
picomatch@4.0.4: {}
|
||||||
|
|
||||||
pify@4.0.1: {}
|
pify@4.0.1: {}
|
||||||
|
|
||||||
pkg-types@1.3.1:
|
pkg-types@1.3.1:
|
||||||
@ -12294,6 +12356,11 @@ snapshots:
|
|||||||
fdir: 6.5.0(picomatch@4.0.3)
|
fdir: 6.5.0(picomatch@4.0.3)
|
||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
|
|
||||||
|
tinyglobby@0.2.16:
|
||||||
|
dependencies:
|
||||||
|
fdir: 6.5.0(picomatch@4.0.4)
|
||||||
|
picomatch: 4.0.4
|
||||||
|
|
||||||
tinyrainbow@3.0.3: {}
|
tinyrainbow@3.0.3: {}
|
||||||
|
|
||||||
to-buffer@1.2.2:
|
to-buffer@1.2.2:
|
||||||
@ -12319,13 +12386,13 @@ snapshots:
|
|||||||
|
|
||||||
trim-lines@3.0.1: {}
|
trim-lines@3.0.1: {}
|
||||||
|
|
||||||
ts-api-utils@2.4.0(typescript@5.9.3):
|
ts-api-utils@2.5.0(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
|
|
||||||
ts-api-utils@2.4.0(typescript@6.0.1-rc):
|
ts-api-utils@2.5.0(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
ts-dedent@2.2.0: {}
|
ts-dedent@2.2.0: {}
|
||||||
|
|
||||||
@ -12409,14 +12476,14 @@ snapshots:
|
|||||||
|
|
||||||
typedarray@0.0.6: {}
|
typedarray@0.0.6: {}
|
||||||
|
|
||||||
typescript-eslint@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc):
|
typescript-eslint@8.58.2(eslint@9.39.4)(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/eslint-plugin': 8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@6.0.1-rc))(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/eslint-plugin': 8.58.2(@typescript-eslint/parser@8.58.2(eslint@9.39.4)(typescript@6.0.3))(eslint@9.39.4)(typescript@6.0.3)
|
||||||
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/parser': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
'@typescript-eslint/typescript-estree': 8.57.0(typescript@6.0.1-rc)
|
'@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3)
|
||||||
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@6.0.1-rc)
|
'@typescript-eslint/utils': 8.58.2(eslint@9.39.4)(typescript@6.0.3)
|
||||||
eslint: 9.39.4
|
eslint: 9.39.4
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@ -12424,7 +12491,7 @@ snapshots:
|
|||||||
|
|
||||||
typescript@5.9.3: {}
|
typescript@5.9.3: {}
|
||||||
|
|
||||||
typescript@6.0.1-rc: {}
|
typescript@6.0.3: {}
|
||||||
|
|
||||||
ufo@1.6.3: {}
|
ufo@1.6.3: {}
|
||||||
|
|
||||||
@ -12571,18 +12638,18 @@ snapshots:
|
|||||||
- bare-abort-controller
|
- bare-abort-controller
|
||||||
- react-native-b4a
|
- react-native-b4a
|
||||||
|
|
||||||
vite-plugin-dts@4.5.4(@types/node@22.19.15)(rollup@4.59.0)(typescript@6.0.1-rc)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)):
|
vite-plugin-dts@4.5.4(@types/node@22.19.15)(rollup@4.59.0)(typescript@6.0.3)(vite@7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@microsoft/api-extractor': 7.57.6(@types/node@22.19.15)
|
'@microsoft/api-extractor': 7.57.6(@types/node@22.19.15)
|
||||||
'@rollup/pluginutils': 5.3.0(rollup@4.59.0)
|
'@rollup/pluginutils': 5.3.0(rollup@4.59.0)
|
||||||
'@volar/typescript': 2.4.28
|
'@volar/typescript': 2.4.28
|
||||||
'@vue/language-core': 2.2.0(typescript@6.0.1-rc)
|
'@vue/language-core': 2.2.0(typescript@6.0.3)
|
||||||
compare-versions: 6.1.1
|
compare-versions: 6.1.1
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
kolorist: 1.8.0
|
kolorist: 1.8.0
|
||||||
local-pkg: 1.1.2
|
local-pkg: 1.1.2
|
||||||
magic-string: 0.30.21
|
magic-string: 0.30.21
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
vite: 7.3.1(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)(tsx@4.21.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@ -12616,14 +12683,14 @@ snapshots:
|
|||||||
terser: 5.46.0
|
terser: 5.46.0
|
||||||
tsx: 4.21.0
|
tsx: 4.21.0
|
||||||
|
|
||||||
vitepress-plugin-mermaid@2.0.17(mermaid@11.12.3)(vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.1-rc)):
|
vitepress-plugin-mermaid@2.0.17(mermaid@11.12.3)(vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
mermaid: 11.12.3
|
mermaid: 11.12.3
|
||||||
vitepress: 1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.1-rc)
|
vitepress: 1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@mermaid-js/mermaid-mindmap': 9.3.0
|
'@mermaid-js/mermaid-mindmap': 9.3.0
|
||||||
|
|
||||||
vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.1-rc):
|
vitepress@1.6.4(@algolia/client-search@5.49.1)(@types/node@22.19.15)(async-validator@4.2.5)(axios@1.13.6)(less@4.5.1)(markdown-it-mathjax3@4.3.2(encoding@0.1.13))(postcss@8.5.8)(search-insights@2.17.3)(terser@5.46.0)(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@docsearch/css': 3.8.2
|
'@docsearch/css': 3.8.2
|
||||||
'@docsearch/js': 3.8.2(@algolia/client-search@5.49.1)(search-insights@2.17.3)
|
'@docsearch/js': 3.8.2(@algolia/client-search@5.49.1)(search-insights@2.17.3)
|
||||||
@ -12632,17 +12699,17 @@ snapshots:
|
|||||||
'@shikijs/transformers': 2.5.0
|
'@shikijs/transformers': 2.5.0
|
||||||
'@shikijs/types': 2.5.0
|
'@shikijs/types': 2.5.0
|
||||||
'@types/markdown-it': 14.1.2
|
'@types/markdown-it': 14.1.2
|
||||||
'@vitejs/plugin-vue': 5.2.4(vite@5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0))(vue@3.5.29(typescript@6.0.1-rc))
|
'@vitejs/plugin-vue': 5.2.4(vite@5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0))(vue@3.5.29(typescript@6.0.3))
|
||||||
'@vue/devtools-api': 7.7.9
|
'@vue/devtools-api': 7.7.9
|
||||||
'@vue/shared': 3.5.29
|
'@vue/shared': 3.5.29
|
||||||
'@vueuse/core': 12.8.2(typescript@6.0.1-rc)
|
'@vueuse/core': 12.8.2(typescript@6.0.3)
|
||||||
'@vueuse/integrations': 12.8.2(async-validator@4.2.5)(axios@1.13.6)(focus-trap@7.8.0)(typescript@6.0.1-rc)
|
'@vueuse/integrations': 12.8.2(async-validator@4.2.5)(axios@1.13.6)(focus-trap@7.8.0)(typescript@6.0.3)
|
||||||
focus-trap: 7.8.0
|
focus-trap: 7.8.0
|
||||||
mark.js: 8.11.1
|
mark.js: 8.11.1
|
||||||
minisearch: 7.2.0
|
minisearch: 7.2.0
|
||||||
shiki: 2.5.0
|
shiki: 2.5.0
|
||||||
vite: 5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)
|
vite: 5.4.21(@types/node@22.19.15)(less@4.5.1)(terser@5.46.0)
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
markdown-it-mathjax3: 4.3.2(encoding@0.1.13)
|
markdown-it-mathjax3: 4.3.2(encoding@0.1.13)
|
||||||
postcss: 8.5.8
|
postcss: 8.5.8
|
||||||
@ -12740,26 +12807,26 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
vue-tsc@2.2.12(typescript@6.0.1-rc):
|
vue-tsc@2.2.12(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/typescript': 2.4.15
|
'@volar/typescript': 2.4.15
|
||||||
'@vue/language-core': 2.2.12(typescript@6.0.1-rc)
|
'@vue/language-core': 2.2.12(typescript@6.0.3)
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
vue-types@3.0.2(vue@3.5.29(typescript@6.0.1-rc)):
|
vue-types@3.0.2(vue@3.5.29(typescript@6.0.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
is-plain-object: 3.0.1
|
is-plain-object: 3.0.1
|
||||||
vue: 3.5.29(typescript@6.0.1-rc)
|
vue: 3.5.29(typescript@6.0.3)
|
||||||
|
|
||||||
vue@3.5.29(typescript@6.0.1-rc):
|
vue@3.5.29(typescript@6.0.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-dom': 3.5.29
|
'@vue/compiler-dom': 3.5.29
|
||||||
'@vue/compiler-sfc': 3.5.29
|
'@vue/compiler-sfc': 3.5.29
|
||||||
'@vue/runtime-dom': 3.5.29
|
'@vue/runtime-dom': 3.5.29
|
||||||
'@vue/server-renderer': 3.5.29(vue@3.5.29(typescript@6.0.1-rc))
|
'@vue/server-renderer': 3.5.29(vue@3.5.29(typescript@6.0.3))
|
||||||
'@vue/shared': 3.5.29
|
'@vue/shared': 3.5.29
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 6.0.1-rc
|
typescript: 6.0.3
|
||||||
|
|
||||||
walkdir@0.4.1: {}
|
walkdir@0.4.1: {}
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
以下规则必须时刻遵守,任何情况下都不允许违反。
|
以下规则必须时刻遵守,任何情况下都不允许违反。
|
||||||
|
|
||||||
1. 将我已经写好的代码视为绝对正确,除非我明确允许,否则不允许修改,哪怕因为接口变化或其他原因导致其中出现类型错误。如果你认为我的代码中存在逻辑错误,应当在对话中提出,而不是直接修改。
|
1. 将我已经写好的代码视为绝对正确,除非我**明确允许**,否则**不允许任何修改**,哪怕因为接口变化或其他原因导致其中出现类型错误。如果你认为我的代码中存在逻辑错误,应当在对话中提出,而不是直接修改。
|
||||||
2. 我做的任何代码修改都是有原因的,如果我在两次对话期间新增、删除或修改了部分代码,不要将其恢复。
|
2. 我做的任何代码修改都是有原因的,如果我在两次对话期间新增、删除或修改了部分代码,不要将其恢复。
|
||||||
3. 时刻以目的进行驱动,想明白我为什么要这么设计接口,这个接口设计的目的是什么,而不是简单地以实现接口为目标。
|
3. 时刻以目的进行驱动,想明白我为什么要这么设计接口,这个接口设计的目的是什么,而不是简单地以实现接口为目标。
|
||||||
4. 如果思考或实现时有任何问题,应该立刻提问,而不是按照自己的想法去写。
|
4. 如果思考或实现时有任何问题,应该立刻提问,而不是按照自己的想法去写。
|
||||||
|
5. 如果我的目标是重构某个接口,按照我说的方式进行重构,如果是彻底性的重构(接口完全没有重合),则按照正常的方式进行实现,旧代码仅做逻辑与思路上的参考;如果是结构性的重构(接口基本一致,但有一些细节上的差距),则应该将旧代码搬到新的接口上,然后进行一些微调,**不要**擅自新增任何参数、任何新的方法或接口,**不要**仅仅通过新增一个兼容层兼容旧代码来实现重构。
|
||||||
|
|
||||||
# 建议规则
|
# 建议规则
|
||||||
|
|
||||||
|
|||||||
@ -46,8 +46,6 @@ control.prototype._init = function () {
|
|||||||
this.registerReplayAction('key', this._replayAction_key);
|
this.registerReplayAction('key', this._replayAction_key);
|
||||||
this.registerReplayAction('ignoreInput', this._replayAction_ignoreInput);
|
this.registerReplayAction('ignoreInput', this._replayAction_ignoreInput);
|
||||||
this.registerReplayAction('no', this._replayAction_no);
|
this.registerReplayAction('no', this._replayAction_no);
|
||||||
// --- 注册系统的resize
|
|
||||||
this.registerResize('canvas', this._resize_canvas);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------ requestAnimationFrame 相关 ------ //
|
// ------ requestAnimationFrame 相关 ------ //
|
||||||
@ -210,32 +208,7 @@ control.prototype.__animateFrame_weather_image = function (timestamp, level) {};
|
|||||||
|
|
||||||
control.prototype._animationFrame_weather_sun = function (timestamp, level) {};
|
control.prototype._animationFrame_weather_sun = function (timestamp, level) {};
|
||||||
|
|
||||||
control.prototype._animateFrame_tip = function (timestamp) {
|
control.prototype._animateFrame_tip = function (timestamp) {};
|
||||||
if (core.animateFrame.tip == null) return;
|
|
||||||
var tip = core.animateFrame.tip;
|
|
||||||
if (timestamp - tip.time <= 30) return;
|
|
||||||
var delta = timestamp - tip.time;
|
|
||||||
tip.time = timestamp;
|
|
||||||
|
|
||||||
core.setFont('data', '16px Arial');
|
|
||||||
core.setTextAlign('data', 'left');
|
|
||||||
core.clearMap('data', 0, 0, core._PX_, 50);
|
|
||||||
core.ui._drawTip_drawOne(tip);
|
|
||||||
if (tip.stage == 1) {
|
|
||||||
tip.opacity += 0.05;
|
|
||||||
if (tip.opacity >= 0.6) {
|
|
||||||
tip.stage = 2;
|
|
||||||
tip.displayTime = 0;
|
|
||||||
}
|
|
||||||
} else if (tip.stage == 2) {
|
|
||||||
tip.displayTime += delta;
|
|
||||||
if (tip.displayTime >= 1000) tip.stage = 3;
|
|
||||||
} else tip.opacity -= 0.05;
|
|
||||||
|
|
||||||
if (tip.opacity <= 0) {
|
|
||||||
core.animateFrame.tip = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------ 标题界面的处理 ------ //
|
// ------ 标题界面的处理 ------ //
|
||||||
|
|
||||||
@ -312,13 +285,7 @@ control.prototype._initStatistics = function (totalTime) {
|
|||||||
|
|
||||||
////// 清除自动寻路路线 //////
|
////// 清除自动寻路路线 //////
|
||||||
control.prototype.clearAutomaticRouteNode = function (x, y) {
|
control.prototype.clearAutomaticRouteNode = function (x, y) {
|
||||||
// core.clearMap(
|
// Deprecated.
|
||||||
// 'route',
|
|
||||||
// x * 32 + 5 - core.status.automaticRoute.offsetX,
|
|
||||||
// y * 32 + 5 - core.status.automaticRoute.offsetY,
|
|
||||||
// 27,
|
|
||||||
// 27
|
|
||||||
// );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 停止自动寻路操作 //////
|
////// 停止自动寻路操作 //////
|
||||||
@ -612,67 +579,21 @@ control.prototype._moveAction_popAutomaticRoute = function () {
|
|||||||
|
|
||||||
////// 让勇士开始移动 //////
|
////// 让勇士开始移动 //////
|
||||||
control.prototype.moveHero = function (direction, callback) {
|
control.prototype.moveHero = function (direction, callback) {
|
||||||
// see src/plugin/game/popup.js
|
// Deprecated. See packages-user/legact-plugin-data/src/fallback.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._moveHero_moving = function () {
|
control.prototype._moveHero_moving = function () {
|
||||||
// ------ 我已经看不懂这个函数了,反正好用就行23333333
|
// Deprecated.
|
||||||
core.status.heroStop = false;
|
|
||||||
core.status.automaticRoute.moveDirectly = false;
|
|
||||||
|
|
||||||
var move = function () {
|
|
||||||
if (!core.status.heroStop) {
|
|
||||||
if (core.hasFlag('debug') && core.status.ctrlDown) {
|
|
||||||
if (core.status.heroMoving != 0) return;
|
|
||||||
// 检测是否穿出去
|
|
||||||
var nx = core.nextX(),
|
|
||||||
ny = core.nextY();
|
|
||||||
if (
|
|
||||||
nx < 0 ||
|
|
||||||
nx >= core.bigmap.width ||
|
|
||||||
ny < 0 ||
|
|
||||||
ny >= core.bigmap.height
|
|
||||||
)
|
|
||||||
return;
|
|
||||||
core.eventMoveHero(
|
|
||||||
[core.getHeroLoc('direction')],
|
|
||||||
core.values.moveSpeed,
|
|
||||||
move
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
core.moveAction();
|
|
||||||
setTimeout(move, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
move();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 当前是否正在移动 //////
|
////// 当前是否正在移动 //////
|
||||||
control.prototype.isMoving = function () {
|
control.prototype.isMoving = function () {
|
||||||
return !core.status.heroStop || core.status.heroMoving > 0;
|
// Deprecated. See packages-user/legact-plugin-data/src/fallback.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 停止勇士的一切行动,等待勇士行动结束后,再执行callback //////
|
////// 停止勇士的一切行动,等待勇士行动结束后,再执行callback //////
|
||||||
control.prototype.waitHeroToStop = function (callback) {
|
control.prototype.waitHeroToStop = function (callback) {
|
||||||
var lastDirection = core.status.automaticRoute.lastDirection;
|
// Deprecated. See packages-user/legact-plugin-data/src/fallback.ts
|
||||||
core.stopAutomaticRoute();
|
|
||||||
core.clearContinueAutomaticRoute();
|
|
||||||
if (callback) {
|
|
||||||
core.status.replay.animate = true;
|
|
||||||
core.lockControl();
|
|
||||||
core.status.automaticRoute.moveDirectly = false;
|
|
||||||
setTimeout(
|
|
||||||
function () {
|
|
||||||
core.status.replay.animate = false;
|
|
||||||
if (core.isset(lastDirection))
|
|
||||||
core.setHeroLoc('direction', lastDirection);
|
|
||||||
core.drawHero();
|
|
||||||
callback();
|
|
||||||
},
|
|
||||||
core.status.replay.speed == 24 ? 1 : 30
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 转向 //////
|
////// 转向 //////
|
||||||
@ -734,21 +655,11 @@ control.prototype.tryMoveDirectly = function (destX, destY) {
|
|||||||
|
|
||||||
////// 绘制勇士 //////
|
////// 绘制勇士 //////
|
||||||
control.prototype.drawHero = function (status, offset = 0, frame) {
|
control.prototype.drawHero = function (status, offset = 0, frame) {
|
||||||
return;
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._drawHero_updateViewport = function (x, y, offset) {
|
control.prototype._drawHero_updateViewport = function (x, y, offset) {
|
||||||
core.bigmap.offsetX = core.clamp(
|
// Deprecated.
|
||||||
(x - core._HALF_WIDTH_) * 32 + offset.x,
|
|
||||||
0,
|
|
||||||
Math.max(32 * core.bigmap.width - core._PX_, 0)
|
|
||||||
);
|
|
||||||
core.bigmap.offsetY = core.clamp(
|
|
||||||
(y - core._HALF_HEIGHT_) * 32 + offset.y,
|
|
||||||
0,
|
|
||||||
Math.max(32 * core.bigmap.height - core._PY_, 0)
|
|
||||||
);
|
|
||||||
core.control.updateViewport();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._drawHero_draw = function (
|
control.prototype._drawHero_draw = function (
|
||||||
@ -759,26 +670,7 @@ control.prototype._drawHero_draw = function (
|
|||||||
offset,
|
offset,
|
||||||
frame
|
frame
|
||||||
) {
|
) {
|
||||||
offset = offset || { x: 0, y: 0, offset: 0, px: 0, py: 0 };
|
// Deprecated.
|
||||||
var opacity = core.setAlpha('hero', core.getFlag('__heroOpacity__', 1));
|
|
||||||
this._drawHero_getDrawObjs(direction, x, y, status, offset).forEach(
|
|
||||||
function (block) {
|
|
||||||
core.drawImage(
|
|
||||||
'hero',
|
|
||||||
block.img,
|
|
||||||
((block.heroIcon[block.status] + (frame || 0)) % 4) *
|
|
||||||
block.width,
|
|
||||||
block.heroIcon.loc * block.height,
|
|
||||||
block.width,
|
|
||||||
block.height,
|
|
||||||
block.posx + (32 - block.width) / 2,
|
|
||||||
block.posy + 32 - block.height,
|
|
||||||
block.width,
|
|
||||||
block.height
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
core.setAlpha('hero', opacity);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._drawHero_getDrawObjs = function (
|
control.prototype._drawHero_getDrawObjs = function (
|
||||||
@ -788,48 +680,7 @@ control.prototype._drawHero_getDrawObjs = function (
|
|||||||
status,
|
status,
|
||||||
offset
|
offset
|
||||||
) {
|
) {
|
||||||
var heroIconArr = core.material.icons.hero,
|
// Deprecated.
|
||||||
drawObjs = [],
|
|
||||||
index = 0;
|
|
||||||
drawObjs.push({
|
|
||||||
img: core.material.images.hero,
|
|
||||||
width: core.material.icons.hero.width || 32,
|
|
||||||
height: core.material.icons.hero.height,
|
|
||||||
heroIcon: heroIconArr[direction],
|
|
||||||
posx: x * 32 - core.bigmap.offsetX + offset.x,
|
|
||||||
posy: y * 32 - core.bigmap.offsetY + offset.y,
|
|
||||||
status: status,
|
|
||||||
index: index++
|
|
||||||
});
|
|
||||||
if (typeof offset.offset == 'number') {
|
|
||||||
core.status.hero.followers.forEach(function (t) {
|
|
||||||
drawObjs.push({
|
|
||||||
img: core.material.images.images[t.name],
|
|
||||||
width: core.material.images.images[t.name].width / 4,
|
|
||||||
height: core.material.images.images[t.name].height / 4,
|
|
||||||
heroIcon: heroIconArr[t.direction],
|
|
||||||
posx:
|
|
||||||
32 * t.x -
|
|
||||||
core.bigmap.offsetX +
|
|
||||||
(t.stop
|
|
||||||
? 0
|
|
||||||
: core.utils.scan2[t.direction].x *
|
|
||||||
Math.abs(offset.offset)),
|
|
||||||
posy:
|
|
||||||
32 * t.y -
|
|
||||||
core.bigmap.offsetY +
|
|
||||||
(t.stop
|
|
||||||
? 0
|
|
||||||
: core.utils.scan2[t.direction].y *
|
|
||||||
Math.abs(offset.offset)),
|
|
||||||
status: t.stop ? 'stop' : status,
|
|
||||||
index: index++
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return drawObjs.sort(function (a, b) {
|
|
||||||
return a.posy == b.posy ? b.index - a.index : a.posy - b.posy;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype.setHeroOpacity = function (
|
control.prototype.setHeroOpacity = function (
|
||||||
@ -838,37 +689,7 @@ control.prototype.setHeroOpacity = function (
|
|||||||
time,
|
time,
|
||||||
callback
|
callback
|
||||||
) {
|
) {
|
||||||
time = time || 0;
|
// Deprecated.
|
||||||
if (time == 0) {
|
|
||||||
core.setFlag('__heroOpacity__', opacity);
|
|
||||||
core.drawHero();
|
|
||||||
if (callback) callback();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
time /= Math.max(core.status.replay.speed, 1);
|
|
||||||
|
|
||||||
var fromOpacity = core.getFlag('__heroOpacity__', 1);
|
|
||||||
var step = 0,
|
|
||||||
steps = Math.floor(time / 10);
|
|
||||||
if (steps <= 0) steps = 1;
|
|
||||||
var moveFunc = core.applyEasing(moveMode);
|
|
||||||
|
|
||||||
var animate = setInterval(function () {
|
|
||||||
step++;
|
|
||||||
core.setFlag(
|
|
||||||
'__heroOpacity__',
|
|
||||||
fromOpacity + (opacity - fromOpacity) * moveFunc(step / steps)
|
|
||||||
);
|
|
||||||
core.drawHero();
|
|
||||||
if (step == steps) {
|
|
||||||
delete core.animateFrame.asyncId[animate];
|
|
||||||
clearInterval(animate);
|
|
||||||
if (callback) callback();
|
|
||||||
}
|
|
||||||
}, 10);
|
|
||||||
|
|
||||||
core.animateFrame.lastAsyncId = animate;
|
|
||||||
core.animateFrame.asyncId[animate] = callback;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------ 画布、位置、阻激夹域,显伤 ------ //
|
// ------ 画布、位置、阻激夹域,显伤 ------ //
|
||||||
@ -876,7 +697,7 @@ control.prototype.setHeroOpacity = function (
|
|||||||
////// 设置画布偏移
|
////// 设置画布偏移
|
||||||
control.prototype.setGameCanvasTranslate = function (canvas, x, y) {
|
control.prototype.setGameCanvasTranslate = function (canvas, x, y) {
|
||||||
// Deprecated. Use RenderItem.transform instead.
|
// Deprecated. Use RenderItem.transform instead.
|
||||||
// For editor compatibility.
|
// Remaining for editor compatibility.
|
||||||
var c = core.dom.gameCanvas[canvas];
|
var c = core.dom.gameCanvas[canvas];
|
||||||
x = x * core.domStyle.scale;
|
x = x * core.domStyle.scale;
|
||||||
y = y * core.domStyle.scale;
|
y = y * core.domStyle.scale;
|
||||||
@ -901,6 +722,7 @@ control.prototype.addGameCanvasTranslate = function (x, y) {
|
|||||||
|
|
||||||
////// 更新视野范围 //////
|
////// 更新视野范围 //////
|
||||||
control.prototype.updateViewport = function () {
|
control.prototype.updateViewport = function () {
|
||||||
|
// Deprecated. Remaining for editor compatibility.
|
||||||
// 当前是否应该重绘?
|
// 当前是否应该重绘?
|
||||||
if (core.bigmap.v2) {
|
if (core.bigmap.v2) {
|
||||||
if (
|
if (
|
||||||
@ -950,59 +772,12 @@ control.prototype.updateViewport = function () {
|
|||||||
|
|
||||||
////// 设置视野范围 //////
|
////// 设置视野范围 //////
|
||||||
control.prototype.setViewport = function (px, py) {
|
control.prototype.setViewport = function (px, py) {
|
||||||
var originOffsetX = core.bigmap.offsetX,
|
// Deprecated.
|
||||||
originOffsetY = core.bigmap.offsetY;
|
|
||||||
core.bigmap.offsetX = core.clamp(px, 0, 32 * core.bigmap.width - core._PX_);
|
|
||||||
core.bigmap.offsetY = core.clamp(
|
|
||||||
py,
|
|
||||||
0,
|
|
||||||
32 * core.bigmap.height - core._PY_
|
|
||||||
);
|
|
||||||
this.updateViewport();
|
|
||||||
// ------ hero层也需要!
|
|
||||||
var px = parseFloat(core.canvas.hero._px) || 0;
|
|
||||||
var py = parseFloat(core.canvas.hero._py) || 0;
|
|
||||||
px += originOffsetX - core.bigmap.offsetX;
|
|
||||||
py += originOffsetY - core.bigmap.offsetY;
|
|
||||||
core.control.setGameCanvasTranslate('hero', px, py);
|
|
||||||
core.canvas.hero._px = px;
|
|
||||||
core.canvas.hero._py = py;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 移动视野范围 //////
|
////// 移动视野范围 //////
|
||||||
control.prototype.moveViewport = function (x, y, moveMode, time, callback) {
|
control.prototype.moveViewport = function (x, y, moveMode, time, callback) {
|
||||||
time = time || 0;
|
// Deprecated.
|
||||||
time /= Math.max(core.status.replay.speed, 1);
|
|
||||||
var per_time = 10,
|
|
||||||
step = 0,
|
|
||||||
steps = Math.floor(time / per_time);
|
|
||||||
if (steps <= 0) {
|
|
||||||
this.setViewport(32 * x, 32 * y);
|
|
||||||
if (callback) callback();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var px = core.clamp(32 * x, 0, 32 * core.bigmap.width - core._PX_);
|
|
||||||
var py = core.clamp(32 * y, 0, 32 * core.bigmap.height - core._PY_);
|
|
||||||
var cx = core.bigmap.offsetX;
|
|
||||||
var cy = core.bigmap.offsetY;
|
|
||||||
var moveFunc = core.applyEasing(moveMode);
|
|
||||||
|
|
||||||
var animate = window.setInterval(function () {
|
|
||||||
step++;
|
|
||||||
core.setViewport(
|
|
||||||
cx + moveFunc(step / steps) * (px - cx),
|
|
||||||
cy + moveFunc(step / steps) * (py - cy)
|
|
||||||
);
|
|
||||||
if (step == steps) {
|
|
||||||
delete core.animateFrame.asyncId[animate];
|
|
||||||
clearInterval(animate);
|
|
||||||
core.setViewport(px, py);
|
|
||||||
if (callback) callback();
|
|
||||||
}
|
|
||||||
}, per_time);
|
|
||||||
|
|
||||||
core.animateFrame.lastAsyncId = animate;
|
|
||||||
core.animateFrame.asyncId[animate] = callback;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得勇士面对位置的x坐标 //////
|
////// 获得勇士面对位置的x坐标 //////
|
||||||
@ -2549,52 +2324,27 @@ control.prototype.removeFlag = function (name) {
|
|||||||
|
|
||||||
////// 获得某个点的独立开关 //////
|
////// 获得某个点的独立开关 //////
|
||||||
control.prototype.getSwitch = function (x, y, floorId, name, defaultValue) {
|
control.prototype.getSwitch = function (x, y, floorId, name, defaultValue) {
|
||||||
var prefix = [
|
// Deprecated. See packages-user/data-fallback/src/flag.ts
|
||||||
floorId || core.status.floorId || ':f',
|
|
||||||
x != null ? x : 'x',
|
|
||||||
y != null ? y : 'y'
|
|
||||||
].join('@');
|
|
||||||
return this.getFlag(prefix + '@' + name, defaultValue);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 设置某个点的独立开关 //////
|
////// 设置某个点的独立开关 //////
|
||||||
control.prototype.setSwitch = function (x, y, floorId, name, value) {
|
control.prototype.setSwitch = function (x, y, floorId, name, value) {
|
||||||
var prefix = [
|
// Deprecated. See packages-user/data-fallback/src/flag.ts
|
||||||
floorId || core.status.floorId || ':f',
|
|
||||||
x != null ? x : 'x',
|
|
||||||
y != null ? y : 'y'
|
|
||||||
].join('@');
|
|
||||||
return this.setFlag(prefix + '@' + name, value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 增加某个点的独立开关 //////
|
////// 增加某个点的独立开关 //////
|
||||||
control.prototype.addSwitch = function (x, y, floorId, name, value) {
|
control.prototype.addSwitch = function (x, y, floorId, name, value) {
|
||||||
var prefix = [
|
// Deprecated. See packages-user/data-fallback/src/flag.ts
|
||||||
floorId || core.status.floorId || ':f',
|
|
||||||
x != null ? x : 'x',
|
|
||||||
y != null ? y : 'y'
|
|
||||||
].join('@');
|
|
||||||
return this.addFlag(prefix + '@' + name, value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 判定某个点的独立开关 //////
|
////// 判定某个点的独立开关 //////
|
||||||
control.prototype.hasSwitch = function (x, y, floorId, name) {
|
control.prototype.hasSwitch = function (x, y, floorId, name) {
|
||||||
var prefix = [
|
// Deprecated. See packages-user/data-fallback/src/flag.ts
|
||||||
floorId || core.status.floorId || ':f',
|
|
||||||
x != null ? x : 'x',
|
|
||||||
y != null ? y : 'y'
|
|
||||||
].join('@');
|
|
||||||
return this.hasFlag(prefix + '@' + name);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 删除某个点的独立开关 //////
|
////// 删除某个点的独立开关 //////
|
||||||
control.prototype.removeSwitch = function (x, y, floorId, name) {
|
control.prototype.removeSwitch = function (x, y, floorId, name) {
|
||||||
var prefix = [
|
// Deprecated. See packages-user/data-fallback/src/flag.ts
|
||||||
floorId || core.status.floorId || ':f',
|
|
||||||
x != null ? x : 'x',
|
|
||||||
y != null ? y : 'y'
|
|
||||||
].join('@');
|
|
||||||
return this.removeFlag(prefix + '@' + name);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 锁定状态栏,常常用于事件处理 //////
|
////// 锁定状态栏,常常用于事件处理 //////
|
||||||
@ -2708,36 +2458,7 @@ control.prototype._weather_sun = function (level) {};
|
|||||||
|
|
||||||
////// 更改画面色调 //////
|
////// 更改画面色调 //////
|
||||||
control.prototype.setCurtain = function (color, time, moveMode, callback) {
|
control.prototype.setCurtain = function (color, time, moveMode, callback) {
|
||||||
if (time == null) time = 750;
|
// Deprecated.
|
||||||
if (time <= 0) time = 0;
|
|
||||||
if (!core.status.curtainColor) core.status.curtainColor = [0, 0, 0, 0];
|
|
||||||
if (!color) color = [0, 0, 0, 0];
|
|
||||||
if (color[3] == null) color[3] = 1;
|
|
||||||
color[3] = core.clamp(color[3], 0, 1);
|
|
||||||
|
|
||||||
if (time == 0) {
|
|
||||||
// 直接变色
|
|
||||||
core.clearMap('curtain');
|
|
||||||
core.fillRect(
|
|
||||||
'curtain',
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
core._PX_,
|
|
||||||
core._PY_,
|
|
||||||
core.arrayToRGBA(color)
|
|
||||||
);
|
|
||||||
core.status.curtainColor = color;
|
|
||||||
if (callback) callback();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._setCurtain_animate(
|
|
||||||
core.status.curtainColor,
|
|
||||||
color,
|
|
||||||
time,
|
|
||||||
moveMode,
|
|
||||||
callback
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._setCurtain_animate = function (
|
control.prototype._setCurtain_animate = function (
|
||||||
@ -2747,44 +2468,7 @@ control.prototype._setCurtain_animate = function (
|
|||||||
moveMode,
|
moveMode,
|
||||||
callback
|
callback
|
||||||
) {
|
) {
|
||||||
time /= Math.max(core.status.replay.speed, 1);
|
// Deprecated.
|
||||||
var per_time = 10,
|
|
||||||
step = 0,
|
|
||||||
steps = Math.floor(time / per_time);
|
|
||||||
if (steps <= 0) steps = 1;
|
|
||||||
var curr = nowColor;
|
|
||||||
var moveFunc = core.applyEasing(moveMode);
|
|
||||||
|
|
||||||
var cb = function () {
|
|
||||||
core.status.curtainColor = curr;
|
|
||||||
if (callback) callback();
|
|
||||||
};
|
|
||||||
var animate = setInterval(function () {
|
|
||||||
step++;
|
|
||||||
curr = [
|
|
||||||
nowColor[0] + (color[0] - nowColor[0]) * moveFunc(step / steps),
|
|
||||||
nowColor[1] + (color[1] - nowColor[1]) * moveFunc(step / steps),
|
|
||||||
nowColor[2] + (color[2] - nowColor[2]) * moveFunc(step / steps),
|
|
||||||
nowColor[3] + (color[3] - nowColor[3]) * moveFunc(step / steps)
|
|
||||||
];
|
|
||||||
core.clearMap('curtain');
|
|
||||||
core.fillRect(
|
|
||||||
'curtain',
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
core._PX_,
|
|
||||||
core._PY_,
|
|
||||||
core.arrayToRGBA(curr)
|
|
||||||
);
|
|
||||||
if (step == steps) {
|
|
||||||
delete core.animateFrame.asyncId[animate];
|
|
||||||
clearInterval(animate);
|
|
||||||
cb();
|
|
||||||
}
|
|
||||||
}, per_time);
|
|
||||||
|
|
||||||
core.animateFrame.lastAsyncId = animate;
|
|
||||||
core.animateFrame.asyncId[animate] = cb;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 画面闪烁 //////
|
////// 画面闪烁 //////
|
||||||
@ -2795,24 +2479,7 @@ control.prototype.screenFlash = function (
|
|||||||
moveMode,
|
moveMode,
|
||||||
callback
|
callback
|
||||||
) {
|
) {
|
||||||
times = times || 1;
|
// Deprecated.
|
||||||
time = time / 3;
|
|
||||||
var nowColor = core.clone(core.status.curtainColor);
|
|
||||||
core.setCurtain(color, time, moveMode, function () {
|
|
||||||
core.setCurtain(nowColor, time * 2, moveMode, function () {
|
|
||||||
if (times > 1)
|
|
||||||
core.screenFlash(
|
|
||||||
color,
|
|
||||||
time * 3,
|
|
||||||
times - 1,
|
|
||||||
moveMode,
|
|
||||||
callback
|
|
||||||
);
|
|
||||||
else {
|
|
||||||
if (callback) callback();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 播放背景音乐 //////
|
////// 播放背景音乐 //////
|
||||||
@ -2905,71 +2572,21 @@ control.prototype.setToolbarButton = function (useButton) {
|
|||||||
// name为名称,可供注销使用
|
// name为名称,可供注销使用
|
||||||
// func可以是一个函数,或者是插件中的函数名;可以接受obj参数,详见resize函数。
|
// func可以是一个函数,或者是插件中的函数名;可以接受obj参数,详见resize函数。
|
||||||
control.prototype.registerResize = function (name, func) {
|
control.prototype.registerResize = function (name, func) {
|
||||||
this.unregisterResize(name);
|
// Deprecated.
|
||||||
this.resizes.push({ name: name, func: func });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 注销一个resize函数 //////
|
////// 注销一个resize函数 //////
|
||||||
control.prototype.unregisterResize = function (name) {
|
control.prototype.unregisterResize = function (name) {
|
||||||
this.resizes = this.resizes.filter(function (b) {
|
// Deprecated.
|
||||||
return b.name != name;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._doResize = function (obj) {
|
control.prototype._doResize = function (obj) {
|
||||||
for (var i in this.resizes) {
|
// Deprecated.
|
||||||
try {
|
|
||||||
if (this.resizes[i].func.call(this, obj)) return true;
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
console.error(
|
|
||||||
'ERROR in resizes[' +
|
|
||||||
this.resizes[i].name +
|
|
||||||
']:已自动注销该项。'
|
|
||||||
);
|
|
||||||
this.unregisterResize(this.resizes[i].name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 屏幕分辨率改变后重新自适应 //////
|
////// 屏幕分辨率改变后重新自适应 //////
|
||||||
control.prototype.resize = function () {
|
control.prototype.resize = function () {
|
||||||
if (main.mode === 'editor') return;
|
// Deprecated.
|
||||||
const width = window.innerWidth;
|
|
||||||
const height = window.innerHeight;
|
|
||||||
|
|
||||||
// if (window.innerWidth >= 600) {
|
|
||||||
// // 横屏
|
|
||||||
// core.domStyle.isVertical = false;
|
|
||||||
// core.domStyle.availableScale = [];
|
|
||||||
// const maxScale = Math.min(width / core._PX_, height / core._PY_);
|
|
||||||
// [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5].forEach(function (v) {
|
|
||||||
// if (v < maxScale) {
|
|
||||||
// core.domStyle.availableScale.push(v);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if (!core.domStyle.availableScale.includes(core.domStyle.scale)) {
|
|
||||||
// core.domStyle.scale = 1;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// // 竖屏
|
|
||||||
// core.domStyle.isVertical = true;
|
|
||||||
// core.domStyle.scale = window.innerWidth / core._PX_;
|
|
||||||
// core.domStyle.availableScale = [];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!core.domStyle.isVertical) {
|
|
||||||
// const height = window.innerHeight;
|
|
||||||
// const width = window.innerWidth;
|
|
||||||
// const maxScale = Math.min(height / core._PY_, width / core._PX_);
|
|
||||||
// const target = Number((Math.floor(maxScale * 4) / 4).toFixed(2));
|
|
||||||
// core.domStyle.scale = target - 0.25;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this._doResize({});
|
|
||||||
this.setToolbarButton();
|
|
||||||
core.updateStatusBar();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._resize_gameGroup = function (obj) {
|
control.prototype._resize_gameGroup = function (obj) {
|
||||||
@ -2981,9 +2598,9 @@ control.prototype._resize_canvas = function (obj) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._resize_toolBar = function (obj) {
|
control.prototype._resize_toolBar = function (obj) {
|
||||||
// Deprecated. Use CustomToolbar instead.
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._resize_tools = function (obj) {
|
control.prototype._resize_tools = function (obj) {
|
||||||
// Deprecated. Use CustomToolbar instead.
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|||||||
@ -353,7 +353,7 @@ core.prototype._init_flags = function () {
|
|||||||
|
|
||||||
core.maps._initFloors();
|
core.maps._initFloors();
|
||||||
// 初始化怪物、道具等
|
// 初始化怪物、道具等
|
||||||
core.material.enemys = core.enemys.getEnemys();
|
// core.material.enemys = core.enemys.getEnemys();
|
||||||
core.material.items = core.items.getItems();
|
core.material.items = core.items.getItems();
|
||||||
core.material.icons = core.icons.getIcons();
|
core.material.icons = core.icons.getIcons();
|
||||||
|
|
||||||
|
|||||||
@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function enemys() {
|
function enemys() {}
|
||||||
this._init();
|
|
||||||
}
|
|
||||||
|
|
||||||
////// 初始化 //////
|
////// 初始化 //////
|
||||||
enemys.prototype._init = function () {
|
enemys.prototype._init = function () {
|
||||||
|
// Deprecated. Remaining for editor compatibility.
|
||||||
this.enemys = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80;
|
this.enemys = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80;
|
||||||
for (var enemyId in this.enemys) {
|
for (var enemyId in this.enemys) {
|
||||||
this.enemys[enemyId].id = enemyId;
|
this.enemys[enemyId].id = enemyId;
|
||||||
@ -15,62 +14,28 @@ enemys.prototype._init = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype.getEnemys = function () {
|
enemys.prototype.getEnemys = function () {
|
||||||
|
// Deprecated. Remaining for editor compatibility.
|
||||||
var enemys = core.clone(this.enemys);
|
var enemys = core.clone(this.enemys);
|
||||||
var enemyInfo = core.getFlag('enemyInfo');
|
|
||||||
if (enemyInfo) {
|
|
||||||
for (var id in enemyInfo) {
|
|
||||||
for (var name in enemyInfo[id]) {
|
|
||||||
enemys[id][name] = core.clone(enemyInfo[id][name]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 将所有怪物的各项属性映射到朝下的
|
|
||||||
for (var id in enemys) {
|
|
||||||
if (enemys[id].faceIds) {
|
|
||||||
var downId = enemys[id].faceIds.down;
|
|
||||||
if (downId != null && downId != id && enemys[downId]) {
|
|
||||||
enemys[id] = { id: id };
|
|
||||||
for (var property in enemys[downId]) {
|
|
||||||
if (
|
|
||||||
property != 'id' &&
|
|
||||||
enemys[downId].hasOwnProperty(property)
|
|
||||||
) {
|
|
||||||
(function (id, downId, property) {
|
|
||||||
Object.defineProperty(enemys[id], property, {
|
|
||||||
get: function () {
|
|
||||||
return enemys[downId][property];
|
|
||||||
},
|
|
||||||
set: function (v) {
|
|
||||||
enemys[downId][property] = v;
|
|
||||||
},
|
|
||||||
enumerable: true
|
|
||||||
});
|
|
||||||
})(id, downId, property);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return enemys;
|
return enemys;
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 判断是否含有某特殊属性 //////
|
////// 判断是否含有某特殊属性 //////
|
||||||
enemys.prototype.hasSpecial = function (special, test) {
|
enemys.prototype.hasSpecial = function (special, test) {
|
||||||
// Deprecated. Use `Array.includes` instead.
|
// Deprecated. See packages-user/data-base/src/enemy/enemy.ts Enemy.hasSpecial
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype.getSpecials = function () {
|
enemys.prototype.getSpecials = function () {
|
||||||
// Deprecated. See src/plugin/game/enemy/special.ts
|
// Deprecated. See packages-user/data-state/src/enemy/special.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得所有特殊属性的名称 //////
|
////// 获得所有特殊属性的名称 //////
|
||||||
enemys.prototype.getSpecialText = function (enemy) {
|
enemys.prototype.getSpecialText = function (enemy) {
|
||||||
// Deprecated.
|
// Deprecated. See packages-user/data-state/src/enemy/special.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得所有特殊属性的颜色 //////
|
////// 获得所有特殊属性的颜色 //////
|
||||||
enemys.prototype.getSpecialColor = function (enemy) {
|
enemys.prototype.getSpecialColor = function (enemy) {
|
||||||
// Deprecated.
|
// Deprecated. See packages-user/data-state/src/enemy/special.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得所有特殊属性的额外标记 //////
|
////// 获得所有特殊属性的额外标记 //////
|
||||||
@ -80,7 +45,7 @@ enemys.prototype.getSpecialFlag = function (enemy) {
|
|||||||
|
|
||||||
////// 获得每个特殊属性的说明 //////
|
////// 获得每个特殊属性的说明 //////
|
||||||
enemys.prototype.getSpecialHint = function (enemy, special) {
|
enemys.prototype.getSpecialHint = function (enemy, special) {
|
||||||
// Deprecated.
|
// Deprecated. See packages-user/data-state/src/enemy/special.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._calSpecialContent = function (enemy, content) {
|
enemys.prototype._calSpecialContent = function (enemy, content) {
|
||||||
@ -103,20 +68,20 @@ enemys.prototype.getDamageString = function (enemy, x, y, floorId, hero) {
|
|||||||
|
|
||||||
////// 接下来N个临界值和临界减伤计算 //////
|
////// 接下来N个临界值和临界减伤计算 //////
|
||||||
enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId, hero) {
|
enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId, hero) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts DamageEnemy.calCritical.
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.calculateCritical
|
||||||
};
|
};
|
||||||
|
|
||||||
/// 未破防临界采用二分计算
|
/// 未破防临界采用二分计算
|
||||||
enemys.prototype._nextCriticals_overAtk = function (enemy) {
|
enemys.prototype._nextCriticals_overAtk = function (enemy) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts DamageEnemy.calCritical.
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.calculateCritical
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._nextCriticals_special = function (enemy) {
|
enemys.prototype._nextCriticals_special = function (enemy) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts DamageEnemy.calCritical.
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.calculateCritical
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._nextCriticals_useBinarySearch = function (enemy) {
|
enemys.prototype._nextCriticals_useBinarySearch = function (enemy) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts DamageEnemy.calCritical.
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.calculateCritical
|
||||||
};
|
};
|
||||||
|
|
||||||
////// N防减伤计算 //////
|
////// N防减伤计算 //////
|
||||||
@ -125,42 +90,42 @@ enemys.prototype.getDefDamage = function (enemy, k, x, y, floorId, hero) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype.getEnemyInfo = function (enemy, hero, x, y, floorId) {
|
enemys.prototype.getEnemyInfo = function (enemy, hero, x, y, floorId) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts
|
// Deprecated. See packages-user/data-base/src/enemy/context.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得战斗伤害信息(实际伤害计算函数) //////
|
////// 获得战斗伤害信息(实际伤害计算函数) //////
|
||||||
enemys.prototype.getDamageInfo = function (enemy, hero, x, y, floorId) {
|
enemys.prototype.getDamageInfo = function (enemy, hero, x, y, floorId) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.getDamageInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得在某个勇士属性下怪物伤害 //////
|
////// 获得在某个勇士属性下怪物伤害 //////
|
||||||
enemys.prototype.getDamage = function (enemy, x, y, floorId, hero) {
|
enemys.prototype.getDamage = function (enemy, x, y, floorId, hero) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.getDamageInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._getDamage = function (enemy, hero, x, y, floorId) {
|
enemys.prototype._getDamage = function (enemy, hero, x, y, floorId) {
|
||||||
// Deprecated. See src/game/enemy/damage.ts
|
// Deprecated. See packages-user/data-base/src/enemy/damage.ts DamageSystem.getDamageInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 获得当前楼层的怪物列表 //////
|
////// 获得当前楼层的怪物列表 //////
|
||||||
enemys.prototype.getCurrentEnemys = function (floorId) {
|
enemys.prototype.getCurrentEnemys = function (floorId) {
|
||||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
// Deprecated. See packages-user/data-base/src/enemy/context.ts EnemyContext.iterateEnemy
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._getCurrentEnemys_getEnemy = function (enemyId) {
|
enemys.prototype._getCurrentEnemys_getEnemy = function (enemyId) {
|
||||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._getCurrentEnemys_addEnemy = function (enemyId) {
|
enemys.prototype._getCurrentEnemys_addEnemy = function (enemyId) {
|
||||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._getCurrentEnemys_addEnemy_defDamage = function (enemy) {
|
enemys.prototype._getCurrentEnemys_addEnemy_defDamage = function (enemy) {
|
||||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype._getCurrentEnemys_sort = function (enemys) {
|
enemys.prototype._getCurrentEnemys_sort = function (enemys) {
|
||||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
// Deprecated.
|
||||||
};
|
};
|
||||||
|
|
||||||
enemys.prototype.hasEnemyLeft = function (enemyId, floorId) {
|
enemys.prototype.hasEnemyLeft = function (enemyId, floorId) {
|
||||||
|
|||||||
@ -105,6 +105,8 @@ events.prototype._startGame_afterStart = function (callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
events.prototype._startGame_upload = function () {
|
events.prototype._startGame_upload = function () {
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
// Upload
|
// Upload
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
formData.append('type', 'people');
|
formData.append('type', 'people');
|
||||||
@ -112,7 +114,7 @@ events.prototype._startGame_upload = function () {
|
|||||||
formData.append('version', core.firstData.version);
|
formData.append('version', core.firstData.version);
|
||||||
formData.append('platform', core.platform.string);
|
formData.append('platform', core.platform.string);
|
||||||
formData.append('hard', core.encodeBase64(core.status.hard));
|
formData.append('hard', core.encodeBase64(core.status.hard));
|
||||||
formData.append('hardCode', core.getFlag('hard', 0));
|
formData.append('hardCode', flags.getFieldValueDefaults('hard', 0));
|
||||||
formData.append('base64', 1);
|
formData.append('base64', 1);
|
||||||
|
|
||||||
core.utils.http('POST', '/games/upload.php', formData);
|
core.utils.http('POST', '/games/upload.php', formData);
|
||||||
@ -191,6 +193,8 @@ events.prototype._gameOver_confirmUpload = function (ending, norank) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
events.prototype._gameOver_doUpload = function (username, ending, norank) {
|
events.prototype._gameOver_doUpload = function (username, ending, norank) {
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
var hp = core.status.hero.hp;
|
var hp = core.status.hero.hp;
|
||||||
if (username == null) hp = 1;
|
if (username == null) hp = 1;
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
@ -212,7 +216,7 @@ events.prototype._gameOver_doUpload = function (username, ending, norank) {
|
|||||||
formData.append('experience', core.status.hero.exp);
|
formData.append('experience', core.status.hero.exp);
|
||||||
formData.append('steps', core.status.hero.steps);
|
formData.append('steps', core.status.hero.steps);
|
||||||
formData.append('norank', norank ? 1 : 0);
|
formData.append('norank', norank ? 1 : 0);
|
||||||
formData.append('seed', core.getFlag('__seed__'));
|
formData.append('seed', flags.getFieldValue('__seed__'));
|
||||||
formData.append(
|
formData.append(
|
||||||
'totalTime',
|
'totalTime',
|
||||||
Math.floor(core.status.hero.statistics.totalTime / 1000)
|
Math.floor(core.status.hero.statistics.totalTime / 1000)
|
||||||
@ -228,6 +232,8 @@ events.prototype._gameOver_doUpload = function (username, ending, norank) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
events.prototype._gameOver_confirmDownload = function (ending) {
|
events.prototype._gameOver_confirmDownload = function (ending) {
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.ui.drawConfirmBox(
|
core.ui.drawConfirmBox(
|
||||||
'你想下载录像吗?',
|
'你想下载录像吗?',
|
||||||
@ -236,7 +242,7 @@ events.prototype._gameOver_confirmDownload = function (ending) {
|
|||||||
name: core.firstData.name,
|
name: core.firstData.name,
|
||||||
version: core.firstData.version,
|
version: core.firstData.version,
|
||||||
hard: core.status.hard,
|
hard: core.status.hard,
|
||||||
seed: core.getFlag('__seed__'),
|
seed: flags.getFieldValue('__seed__'),
|
||||||
route: core.encodeRoute(core.status.route)
|
route: core.encodeRoute(core.status.route)
|
||||||
};
|
};
|
||||||
core.download(
|
core.download(
|
||||||
@ -666,6 +672,8 @@ events.prototype._sys_getItem = function (data, callback) {
|
|||||||
|
|
||||||
////// 获得某个物品 //////
|
////// 获得某个物品 //////
|
||||||
events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
|
events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
if (num == null) num = 1;
|
if (num == null) num = 1;
|
||||||
var itemCls = core.material.items[id].cls;
|
var itemCls = core.material.items[id].cls;
|
||||||
core.removeBlock(x, y);
|
core.removeBlock(x, y);
|
||||||
@ -677,8 +685,7 @@ events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
|
|||||||
core.drawTip(text, id);
|
core.drawTip(text, id);
|
||||||
|
|
||||||
// --- 首次获得道具的提示
|
// --- 首次获得道具的提示
|
||||||
if (!core.hasFlag('__itemHint__')) core.setFlag('__itemHint__', []);
|
var itemHint = flags.getFieldValueDefaults('__itemHint__', []);
|
||||||
var itemHint = core.getFlag('__itemHint__');
|
|
||||||
if (
|
if (
|
||||||
core.flags.itemFirstText &&
|
core.flags.itemFirstText &&
|
||||||
itemHint.indexOf(id) < 0 &&
|
itemHint.indexOf(id) < 0 &&
|
||||||
@ -944,14 +951,16 @@ events.prototype.afterChangeFloor = function (floorId) {
|
|||||||
|
|
||||||
////// 是否到达过某个楼层 //////
|
////// 是否到达过某个楼层 //////
|
||||||
events.prototype.hasVisitedFloor = function (floorId) {
|
events.prototype.hasVisitedFloor = function (floorId) {
|
||||||
if (!core.hasFlag('__visited__')) core.setFlag('__visited__', {});
|
const { state } = Mota.require('@user/data-state');
|
||||||
return core.getFlag('__visited__')[floorId] || false;
|
const flags = state.flags;
|
||||||
|
return flags.getFieldValueDefaults('__visited__', {})[floorId] ?? false;
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 到达某楼层 //////
|
////// 到达某楼层 //////
|
||||||
events.prototype.visitFloor = function (floorId) {
|
events.prototype.visitFloor = function (floorId) {
|
||||||
if (!core.hasFlag('__visited__')) core.setFlag('__visited__', {});
|
const { state } = Mota.require('@user/data-state');
|
||||||
core.getFlag('__visited__')[floorId] = true;
|
const flags = state.flags;
|
||||||
|
flags.getFieldValueDefaults('__visited__', {})[floorId] = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
events.prototype._sys_pushBox = function (data, callback) {
|
events.prototype._sys_pushBox = function (data, callback) {
|
||||||
@ -1334,26 +1343,30 @@ events.prototype.checkAutoEvents = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
events.prototype.autoEventExecuting = function (symbol, value) {
|
events.prototype.autoEventExecuting = function (symbol, value) {
|
||||||
var aei = core.getFlag('__aei__', []);
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var aei = flags.getFieldValueDefaults('__aei__', []);
|
||||||
if (value == null) return aei.indexOf(symbol) >= 0;
|
if (value == null) return aei.indexOf(symbol) >= 0;
|
||||||
else {
|
else {
|
||||||
aei = aei.filter(function (one) {
|
aei = aei.filter(function (one) {
|
||||||
return one != symbol;
|
return one != symbol;
|
||||||
});
|
});
|
||||||
if (value) aei.push(symbol);
|
if (value) aei.push(symbol);
|
||||||
core.setFlag('__aei__', aei);
|
flags.setFieldValue('__aei__', aei);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
events.prototype.autoEventExecuted = function (symbol, value) {
|
events.prototype.autoEventExecuted = function (symbol, value) {
|
||||||
var aed = core.getFlag('__aed__', []);
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var aed = flags.getFieldValueDefaults('__aed__', []);
|
||||||
if (value == null) return aed.indexOf(symbol) >= 0;
|
if (value == null) return aed.indexOf(symbol) >= 0;
|
||||||
else {
|
else {
|
||||||
aed = aed.filter(function (one) {
|
aed = aed.filter(function (one) {
|
||||||
return one != symbol;
|
return one != symbol;
|
||||||
});
|
});
|
||||||
if (value) aed.push(symbol);
|
if (value) aed.push(symbol);
|
||||||
core.setFlag('__aed__', aed);
|
flags.setFieldValue('__aed__', aed);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2710,19 +2723,20 @@ events.prototype._action_for = function (data, x, y, prefix) {
|
|||||||
core.setFlag(stepName, data.step);
|
core.setFlag(stepName, data.step);
|
||||||
var condition =
|
var condition =
|
||||||
'(function () {' +
|
'(function () {' +
|
||||||
"var to = core.calValue(core.getFlag('" +
|
'const { state } = Mota.require("@user/data-state"); const flags = state.flags;' +
|
||||||
|
"var to = core.calValue(flags.getFieldValue('" +
|
||||||
toName +
|
toName +
|
||||||
"'));" +
|
"'));" +
|
||||||
"var step = core.calValue(core.getFlag('" +
|
"var step = core.calValue(flags.getFieldValue('" +
|
||||||
stepName +
|
stepName +
|
||||||
"'));" +
|
"'));" +
|
||||||
"if (typeof step != 'number' || typeof to != 'number') return false;" +
|
"if (typeof step != 'number' || typeof to != 'number') return false;" +
|
||||||
'if (step == 0) return true;' +
|
'if (step == 0) return true;' +
|
||||||
"var currentValue = core.getFlag('@temp@" +
|
"var currentValue = flags.getFieldValue('@temp@" +
|
||||||
letter +
|
letter +
|
||||||
"');" +
|
"');" +
|
||||||
'currentValue += step;' +
|
'currentValue += step;' +
|
||||||
"core.setFlag('@temp@" +
|
"flags.setFieldValue('@temp@" +
|
||||||
letter +
|
letter +
|
||||||
"', currentValue);" +
|
"', currentValue);" +
|
||||||
'if (step > 0) { return currentValue <= to; }' +
|
'if (step > 0) { return currentValue <= to; }' +
|
||||||
@ -2751,14 +2765,17 @@ events.prototype._action_forEach = function (data, x, y, prefix) {
|
|||||||
return core.doAction();
|
return core.doAction();
|
||||||
}
|
}
|
||||||
var listName = '@temp@forEach@' + data.name.substring(5);
|
var listName = '@temp@forEach@' + data.name.substring(5);
|
||||||
core.setFlag(listName, core.clone(data.list));
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
flags.setFieldValue(listName, core.clone(data.list));
|
||||||
var condition =
|
var condition =
|
||||||
'(function () {' +
|
'(function () {' +
|
||||||
"var list = core.getFlag('" +
|
"const { state } = Mota.require('@user/data-state'); const flags = state.flags;" +
|
||||||
|
"var list = flags.getFieldValue('" +
|
||||||
listName +
|
listName +
|
||||||
"', []);" +
|
"', []);" +
|
||||||
'if (list.length == 0) return false;' +
|
'if (list.length == 0) return false;' +
|
||||||
"core.setFlag('@temp@'+'" +
|
"flags.setFieldValue('@temp@'+'" +
|
||||||
data.name.substring(5) +
|
data.name.substring(5) +
|
||||||
"', list.shift());" +
|
"', list.shift());" +
|
||||||
'return true;' +
|
'return true;' +
|
||||||
@ -2994,11 +3011,13 @@ events.prototype.__action_wait_afterGet = function (data) {
|
|||||||
var todo = [];
|
var todo = [];
|
||||||
var stop = false;
|
var stop = false;
|
||||||
var found = false;
|
var found = false;
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
data.data.forEach(function (one) {
|
data.data.forEach(function (one) {
|
||||||
if (one._disabled || stop) return;
|
if (one._disabled || stop) return;
|
||||||
if (one['case'] == 'keyboard' && core.getFlag('type') == 0) {
|
if (one['case'] == 'keyboard' && flags.getFieldValue('type') == 0) {
|
||||||
(one.keycode + '').split(',').forEach(function (keycode) {
|
(one.keycode + '').split(',').forEach(function (keycode) {
|
||||||
if (core.getFlag('keycode', 0) == keycode) {
|
if (flags.getFieldValueDefaults('keycode', 0) == keycode) {
|
||||||
found = true;
|
found = true;
|
||||||
core.push(todo, one.action);
|
core.push(todo, one.action);
|
||||||
if (one['break']) stop = true;
|
if (one['break']) stop = true;
|
||||||
@ -3009,14 +3028,14 @@ events.prototype.__action_wait_afterGet = function (data) {
|
|||||||
one['case'] == 'mouse' &&
|
one['case'] == 'mouse' &&
|
||||||
one.px instanceof Array &&
|
one.px instanceof Array &&
|
||||||
one.py instanceof Array &&
|
one.py instanceof Array &&
|
||||||
core.getFlag('type') == 1
|
flags.getFieldValue('type') == 1
|
||||||
) {
|
) {
|
||||||
var pxmin = core.calValue(one.px[0]);
|
var pxmin = core.calValue(one.px[0]);
|
||||||
var pxmax = core.calValue(one.px[1]);
|
var pxmax = core.calValue(one.px[1]);
|
||||||
var pymin = core.calValue(one.py[0]);
|
var pymin = core.calValue(one.py[0]);
|
||||||
var pymax = core.calValue(one.py[1]);
|
var pymax = core.calValue(one.py[1]);
|
||||||
var px = core.getFlag('px', 0),
|
var px = flags.getFieldValueDefaults('px', 0),
|
||||||
py = core.getFlag('py', 0);
|
py = flags.getFieldValueDefaults('py', 0);
|
||||||
if (px >= pxmin && px <= pxmax && py >= pymin && py <= pymax) {
|
if (px >= pxmin && px <= pxmax && py >= pymin && py <= pymax) {
|
||||||
found = true;
|
found = true;
|
||||||
core.push(todo, one.action);
|
core.push(todo, one.action);
|
||||||
@ -3034,7 +3053,7 @@ events.prototype.__action_wait_afterGet = function (data) {
|
|||||||
if (one['break']) stop = true;
|
if (one['break']) stop = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (one['case'] == 'timeout' && core.getFlag('type') == -1) {
|
if (one['case'] == 'timeout' && flags.getFieldValue('type') == -1) {
|
||||||
found = true;
|
found = true;
|
||||||
core.push(todo, one.action);
|
core.push(todo, one.action);
|
||||||
if (one['break']) stop = true;
|
if (one['break']) stop = true;
|
||||||
@ -3619,34 +3638,17 @@ events.prototype.setEnemy = function (
|
|||||||
prefix,
|
prefix,
|
||||||
norefresh
|
norefresh
|
||||||
) {
|
) {
|
||||||
if (!core.hasFlag('enemyInfo')) {
|
// Deprecated. Will be refactored in 2.D
|
||||||
core.setFlag('enemyInfo', {});
|
|
||||||
}
|
|
||||||
var enemyInfo = core.getFlag('enemyInfo');
|
|
||||||
if (!enemyInfo[id]) enemyInfo[id] = {};
|
|
||||||
if (typeof value === 'string' && name == 'name')
|
|
||||||
value = value.replace(/\r/g, '\\r');
|
|
||||||
value = this._updateValueByOperator(
|
|
||||||
core.calValue(value, prefix),
|
|
||||||
(core.material.enemys[id] || {})[name],
|
|
||||||
operator
|
|
||||||
);
|
|
||||||
enemyInfo[id][name] = value;
|
|
||||||
(core.material.enemys[id] || {})[name] = core.clone(value);
|
|
||||||
if (!norefresh) core.updateStatusBar();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 设置某个点上的怪物属性 //////
|
////// 设置某个点上的怪物属性 //////
|
||||||
events.prototype.setEnemyOnPoint = function (x, y) {
|
events.prototype.setEnemyOnPoint = function (x, y) {
|
||||||
// Deprecated.
|
// Deprecated. Will be refactored in 2.D
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 重置某个点上的怪物属性 //////
|
////// 重置某个点上的怪物属性 //////
|
||||||
events.prototype.resetEnemyOnPoint = function (x, y, floorId, norefresh) {
|
events.prototype.resetEnemyOnPoint = function (x, y, floorId, norefresh) {
|
||||||
delete ((flags.enemyOnPoint || {})[floorId || core.status.floorId] || {})[
|
// Deprecated. Will be refactored in 2.D
|
||||||
x + ',' + y
|
|
||||||
];
|
|
||||||
if (!norefresh) core.updateStatusBar();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 将某个点上已经设置的怪物属性移动到其他点 //////
|
////// 将某个点上已经设置的怪物属性移动到其他点 //////
|
||||||
@ -3658,13 +3660,7 @@ events.prototype.moveEnemyOnPoint = function (
|
|||||||
floorId,
|
floorId,
|
||||||
norefresh
|
norefresh
|
||||||
) {
|
) {
|
||||||
floorId = floorId || core.status.floorId;
|
// Deprecated. Will be refactored in 2.D
|
||||||
if (((flags.enemyOnPoint || {})[floorId] || {})[fromX + ',' + fromY]) {
|
|
||||||
flags.enemyOnPoint[floorId][toX + ',' + toY] =
|
|
||||||
flags.enemyOnPoint[floorId][fromX + ',' + fromY];
|
|
||||||
delete flags.enemyOnPoint[floorId][fromX + ',' + fromY];
|
|
||||||
if (!norefresh) core.updateStatusBar();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 设置楼层属性 //////
|
////// 设置楼层属性 //////
|
||||||
@ -3697,7 +3693,9 @@ events.prototype.setGlobalAttribute = function (name, value) {
|
|||||||
|
|
||||||
////// 设置全局开关 //////
|
////// 设置全局开关 //////
|
||||||
events.prototype.setGlobalFlag = function (name, value) {
|
events.prototype.setGlobalFlag = function (name, value) {
|
||||||
var flags = core.getFlag('globalFlags', {});
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var flags = flags.getFieldValueDefaults('globalFlags', {});
|
||||||
if (name.startsWith('s:')) {
|
if (name.startsWith('s:')) {
|
||||||
name = name.substring(2);
|
name = name.substring(2);
|
||||||
var statusBarItems = core.flags.statusBarItems.filter(function (v) {
|
var statusBarItems = core.flags.statusBarItems.filter(function (v) {
|
||||||
|
|||||||
@ -17,12 +17,6 @@ items.prototype._init = function () {
|
|||||||
////// 获得所有道具 //////
|
////// 获得所有道具 //////
|
||||||
items.prototype.getItems = function () {
|
items.prototype.getItems = function () {
|
||||||
var items = core.clone(this.items);
|
var items = core.clone(this.items);
|
||||||
var equipInfo = core.getFlag('equipInfo');
|
|
||||||
if (equipInfo) {
|
|
||||||
for (var id in equipInfo) {
|
|
||||||
items[id].equip = core.clone(equipInfo[id]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return items;
|
return items;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -370,7 +364,9 @@ items.prototype._realLoadEquip_playSound = function () {
|
|||||||
|
|
||||||
////// 保存装备 //////
|
////// 保存装备 //////
|
||||||
items.prototype.quickSaveEquip = function (index) {
|
items.prototype.quickSaveEquip = function (index) {
|
||||||
var saveEquips = core.getFlag('saveEquips', []);
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var saveEquips = flags.getFieldValueDefaults('saveEquips', []);
|
||||||
saveEquips[index] = core.clone(core.status.hero.equipment);
|
saveEquips[index] = core.clone(core.status.hero.equipment);
|
||||||
core.setFlag('saveEquips', saveEquips);
|
core.setFlag('saveEquips', saveEquips);
|
||||||
core.status.route.push('saveEquip:' + index);
|
core.status.route.push('saveEquip:' + index);
|
||||||
@ -379,7 +375,9 @@ items.prototype.quickSaveEquip = function (index) {
|
|||||||
|
|
||||||
////// 读取装备 //////
|
////// 读取装备 //////
|
||||||
items.prototype.quickLoadEquip = function (index) {
|
items.prototype.quickLoadEquip = function (index) {
|
||||||
var current = core.getFlag('saveEquips', [])[index];
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var current = flags.getFieldValueDefaults('saveEquips', [])[index];
|
||||||
if (!current) {
|
if (!current) {
|
||||||
core.playSound('操作失败');
|
core.playSound('操作失败');
|
||||||
core.drawTip(index + '号套装不存在');
|
core.drawTip(index + '号套装不存在');
|
||||||
|
|||||||
@ -27,14 +27,7 @@ maps.prototype._initFloors = function (floorId) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
maps.prototype._resetFloorImages = function () {
|
maps.prototype._resetFloorImages = function () {
|
||||||
for (var floorId in core.status.maps) {
|
// Deprecated. See packages-user/client-modules/src/render/map/renderer.ts setStaticBackground & setDynamicBackground
|
||||||
(core.status.maps[floorId].images || []).forEach(function (one) {
|
|
||||||
var flag = '__floorImg__' + floorId + '_' + one.x + '_' + one.y;
|
|
||||||
if (core.getFlag(flag) == null) {
|
|
||||||
if (one.disabled) core.setFlag(flag, true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
maps.prototype._setHDCanvasSize = function (ctx, width, height) {
|
maps.prototype._setHDCanvasSize = function (ctx, width, height) {
|
||||||
@ -722,51 +715,40 @@ maps.prototype._getBgFgMapArray = function (name, floorId, noCache) {
|
|||||||
var width = core.floors[floorId].width;
|
var width = core.floors[floorId].width;
|
||||||
var height = core.floors[floorId].height;
|
var height = core.floors[floorId].height;
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
if (!noCache && core.status[name + 'maps'][floorId])
|
if (!noCache && core.status[name + 'maps'][floorId])
|
||||||
// @ts-ignore
|
|
||||||
return core.status[name + 'maps'][floorId];
|
return core.status[name + 'maps'][floorId];
|
||||||
|
|
||||||
var arr =
|
var arr =
|
||||||
main.mode == 'editor' &&
|
main.mode == 'editor' &&
|
||||||
// @ts-ignore
|
|
||||||
!(window.editor && editor.uievent && editor.uievent.isOpen)
|
!(window.editor && editor.uievent && editor.uievent.isOpen)
|
||||||
? // @ts-ignore
|
? core.cloneArray(editor[name + 'map'])
|
||||||
core.cloneArray(editor[name + 'map'])
|
|
||||||
: null;
|
: null;
|
||||||
if (arr == null)
|
if (arr == null)
|
||||||
// @ts-ignore
|
|
||||||
arr = core.cloneArray(core.floors[floorId][name + 'map'] || []);
|
arr = core.cloneArray(core.floors[floorId][name + 'map'] || []);
|
||||||
|
|
||||||
for (var y = 0; y < height; ++y) {
|
for (var y = 0; y < height; ++y) {
|
||||||
if (arr[y] == null) arr[y] = Array(width).fill(0);
|
if (arr[y] == null) arr[y] = Array(width).fill(0);
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
const { state } = Mota.require('@user/data-state');
|
||||||
(core.getFlag('__' + name + 'v__', {})[floorId] || []).forEach(
|
const flags = state.flags;
|
||||||
// @ts-ignore
|
(
|
||||||
function (one) {
|
flags.getFieldValueDefaults('__' + name + 'v__', {})[floorId] || []
|
||||||
arr[one[1]][one[0]] = one[2] || 0;
|
).forEach(function (one) {
|
||||||
}
|
arr[one[1]][one[0]] = one[2] || 0;
|
||||||
);
|
});
|
||||||
// @ts-ignore
|
(
|
||||||
(core.getFlag('__' + name + 'd__', {})[floorId] || []).forEach(
|
flags.getFieldValueDefaults('__' + name + 'd__', {})[floorId] || []
|
||||||
// @ts-ignore
|
).forEach(function (one) {
|
||||||
function (one) {
|
arr[one[1]][one[0]] = 0;
|
||||||
arr[one[1]][one[0]] = 0;
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
if (main.mode == 'editor') {
|
if (main.mode == 'editor') {
|
||||||
for (var x = 0; x < width; x++) {
|
for (var x = 0; x < width; x++) {
|
||||||
for (var y = 0; y < height; y++) {
|
for (var y = 0; y < height; y++) {
|
||||||
// @ts-ignore
|
|
||||||
arr[y][x] = arr[y][x].idnum || arr[y][x] || 0;
|
arr[y][x] = arr[y][x].idnum || arr[y][x] || 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
if (core.status[name + 'maps']) core.status[name + 'maps'][floorId] = arr;
|
||||||
if (core.status[name + 'maps'])
|
|
||||||
// @ts-ignore
|
|
||||||
core.status[name + 'maps'][floorId] = arr;
|
|
||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3286,7 +3268,9 @@ maps.prototype._triggerBgFgMap = function (type, name, loc, floorId, callback) {
|
|||||||
if (!floorId) return;
|
if (!floorId) return;
|
||||||
|
|
||||||
if (loc.length == 0) return;
|
if (loc.length == 0) return;
|
||||||
var disabled = core.getFlag('__' + name + 'd__', {});
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var disabled = flags.getFieldValueDefaults('__' + name + 'd__', {});
|
||||||
disabled[floorId] = disabled[floorId] || [];
|
disabled[floorId] = disabled[floorId] || [];
|
||||||
loc.forEach(function (t) {
|
loc.forEach(function (t) {
|
||||||
if (type == 'hide') {
|
if (type == 'hide') {
|
||||||
@ -3642,8 +3626,9 @@ maps.prototype.setBgFgBlock = function (name, number, x, y, floorId) {
|
|||||||
if (!isNaN(num)) number = num;
|
if (!isNaN(num)) number = num;
|
||||||
else number = core.getNumberById(number);
|
else number = core.getNumberById(number);
|
||||||
}
|
}
|
||||||
|
const { state } = Mota.require('@user/data-state');
|
||||||
var values = core.getFlag('__' + name + 'v__', {});
|
const flags = state.flags;
|
||||||
|
var values = flags.getFieldValueDefaults('__' + name + 'v__', {});
|
||||||
values[floorId] = (values[floorId] || []).filter(function (one) {
|
values[floorId] = (values[floorId] || []).filter(function (one) {
|
||||||
return one[0] != x || one[1] != y;
|
return one[0] != x || one[1] != y;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1433,7 +1433,8 @@ ui.prototype._uievent_drawBackground = function (data) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ui.prototype._drawWindowSkin_getOpacity = function () {
|
ui.prototype._drawWindowSkin_getOpacity = function () {
|
||||||
return core.getFlag('__winskin_opacity__', 0.85);
|
// Deprecated. Use 0.85 for editor compatibility
|
||||||
|
return 0.85;
|
||||||
};
|
};
|
||||||
|
|
||||||
ui.prototype._drawBackground_drawWindowSkin = function (
|
ui.prototype._drawBackground_drawWindowSkin = function (
|
||||||
@ -1555,7 +1556,9 @@ ui.prototype._calTextBoxWidth = function (
|
|||||||
////// 处理 \i[xxx] 的问题
|
////// 处理 \i[xxx] 的问题
|
||||||
ui.prototype._getDrawableIconInfo = function (id) {
|
ui.prototype._getDrawableIconInfo = function (id) {
|
||||||
if (id && id.indexOf('flag:') === 0) {
|
if (id && id.indexOf('flag:') === 0) {
|
||||||
id = core.getFlag(id.substring(5), id);
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
id = flags.getFieldValueDefaults(id.substring(5), id);
|
||||||
}
|
}
|
||||||
id = core.getIdOfThis(id);
|
id = core.getIdOfThis(id);
|
||||||
var image = null,
|
var image = null,
|
||||||
|
|||||||
@ -98,7 +98,7 @@ utils.prototype.replaceValue = function (value) {
|
|||||||
if (value.includes('flag:') || value.includes('flag:'))
|
if (value.includes('flag:') || value.includes('flag:'))
|
||||||
value = value.replace(
|
value = value.replace(
|
||||||
/flag[::]([a-zA-Z0-9_\u4E00-\u9FCC\u3040-\u30FF\u2160-\u216B\u0391-\u03C9]+)/g,
|
/flag[::]([a-zA-Z0-9_\u4E00-\u9FCC\u3040-\u30FF\u2160-\u216B\u0391-\u03C9]+)/g,
|
||||||
"core.getFlag('$1', 0)"
|
"const { state } = Mota.require('@user/data-state'); const flags = state.flags; flags.getFieldValueDefaults('$1', 0)"
|
||||||
);
|
);
|
||||||
if (value.includes('global:') || value.includes('global:'))
|
if (value.includes('global:') || value.includes('global:'))
|
||||||
value = value.replace(
|
value = value.replace(
|
||||||
@ -130,7 +130,7 @@ utils.prototype.replaceValue = function (value) {
|
|||||||
if (value.includes('temp:'))
|
if (value.includes('temp:'))
|
||||||
value = value.replace(
|
value = value.replace(
|
||||||
/temp:([a-zA-Z0-9_]+)/g,
|
/temp:([a-zA-Z0-9_]+)/g,
|
||||||
"core.getFlag('@temp@$1', 0)"
|
"const { state } = Mota.require('@user/data-state'); const flags = state.flags; flags.getFieldValueDefaults('@temp@$1', 0)"
|
||||||
);
|
);
|
||||||
// if (value.indexOf('switch:') >= 0)
|
// if (value.indexOf('switch:') >= 0)
|
||||||
// value = value.replace(
|
// value = value.replace(
|
||||||
@ -410,7 +410,9 @@ utils.prototype.getGlobal = function (key, defaultValue) {
|
|||||||
// 录像兼容性:尝试从flag和localStorage获得
|
// 录像兼容性:尝试从flag和localStorage获得
|
||||||
// 注意这里不再二次记录 input2: 到录像
|
// 注意这里不再二次记录 input2: 到录像
|
||||||
core.status.replay.toReplay.unshift(action);
|
core.status.replay.toReplay.unshift(action);
|
||||||
value = core.getFlag(
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
value = flags.getFieldValueDefaults(
|
||||||
'__global__' + key,
|
'__global__' + key,
|
||||||
core.getLocalStorage(key, defaultValue)
|
core.getLocalStorage(key, defaultValue)
|
||||||
);
|
);
|
||||||
@ -994,9 +996,11 @@ utils.prototype.decodeBase64 = function (str) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
utils.prototype.rand = function (num) {
|
utils.prototype.rand = function (num) {
|
||||||
var rand = core.getFlag('__rand__');
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var rand = flags.getFieldValue('__rand__');
|
||||||
rand = this.__next_rand(rand);
|
rand = this.__next_rand(rand);
|
||||||
core.setFlag('__rand__', rand);
|
flags.setFieldValue('__rand__', rand);
|
||||||
var ans = rand / 2147483647;
|
var ans = rand / 2147483647;
|
||||||
if (num && num > 0) return Math.floor(ans * num);
|
if (num && num > 0) return Math.floor(ans * num);
|
||||||
return ans;
|
return ans;
|
||||||
|
|||||||
@ -36,13 +36,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.extractBlocks(floorId);
|
core.extractBlocks(floorId);
|
||||||
core.maps._resetFloorImages();
|
core.maps._resetFloorImages();
|
||||||
// 初始化怪物和道具
|
// 初始化怪物和道具
|
||||||
core.material.enemys = core.enemys.getEnemys();
|
// core.material.enemys = core.enemys.getEnemys();
|
||||||
core.material.items = core.items.getItems();
|
core.material.items = core.items.getItems();
|
||||||
// 初始化全局数值和全局开关
|
// 初始化全局数值和全局开关
|
||||||
core.values = core.clone(core.data.values);
|
core.values = core.clone(core.data.values);
|
||||||
for (var key in values || {}) core.values[key] = values[key];
|
for (var key in values || {}) core.values[key] = values[key];
|
||||||
core.flags = core.clone(core.data.flags);
|
core.flags = core.clone(core.data.flags);
|
||||||
var globalFlags = core.getFlag('globalFlags', {});
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
var globalFlags = flags.getFieldValue('globalFlags', {});
|
||||||
for (var key in globalFlags) core.flags[key] = globalFlags[key];
|
for (var key in globalFlags) core.flags[key] = globalFlags[key];
|
||||||
core._init_sys_flags();
|
core._init_sys_flags();
|
||||||
// 初始化界面,状态栏等
|
// 初始化界面,状态栏等
|
||||||
@ -116,13 +118,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
|
|
||||||
// ---------- 此时还没有进行切换,当前floorId还是原来的 ---------- //
|
// ---------- 此时还没有进行切换,当前floorId还是原来的 ---------- //
|
||||||
var currentId = core.status.floorId || null; // 获得当前的floorId,可能为null
|
var currentId = core.status.floorId || null; // 获得当前的floorId,可能为null
|
||||||
var fromLoad = core.hasFlag('__fromLoad__'); // 是否是读档造成的切换
|
const { state } = Mota.require('@user/data-state');
|
||||||
var isFlying = core.hasFlag('__isFlying__'); // 是否是楼传造成的切换
|
const flags = state.flags;
|
||||||
|
var fromLoad = flags.occupied('__fromLoad__'); // 是否是读档造成的切换
|
||||||
|
var isFlying = flags.occupied('__isFlying__'); // 是否是楼传造成的切换
|
||||||
if (!fromLoad) {
|
if (!fromLoad) {
|
||||||
if (!core.hasFlag('__leaveLoc__'))
|
if (!core.hasFlag('__leaveLoc__'))
|
||||||
core.setFlag('__leaveLoc__', {});
|
flags.setFieldValue('__leaveLoc__', {});
|
||||||
if (currentId != null)
|
if (currentId != null)
|
||||||
core.getFlag('__leaveLoc__')[currentId] = core.clone(
|
flags.getFieldValue('__leaveLoc__')[currentId] = core.clone(
|
||||||
core.status.hero.loc
|
core.status.hero.loc
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -188,11 +192,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
if (!core.hasFlag('__bgm__')) core.playBgm(bgm);
|
if (!core.hasFlag('__bgm__')) core.playBgm(bgm);
|
||||||
}
|
}
|
||||||
// 更改天气
|
// 更改天气
|
||||||
var weather = core.getFlag('__weather__', null);
|
// var weather = core.getFlag('__weather__', null);
|
||||||
if (!weather && core.status.maps[floorId].weather)
|
// if (!weather && core.status.maps[floorId].weather)
|
||||||
weather = core.status.maps[floorId].weather;
|
// weather = core.status.maps[floorId].weather;
|
||||||
if (weather) core.setWeather(weather[0], weather[1]);
|
// if (weather) core.setWeather(weather[0], weather[1]);
|
||||||
else core.setWeather();
|
// else core.setWeather();
|
||||||
|
|
||||||
core.updateDamage();
|
core.updateDamage();
|
||||||
|
|
||||||
@ -222,9 +226,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
// floorId是切换到的楼层
|
// floorId是切换到的楼层
|
||||||
|
|
||||||
// 如果是读档,则进行检查(是否需要恢复事件)
|
// 如果是读档,则进行检查(是否需要恢复事件)
|
||||||
if (core.hasFlag('__fromLoad__')) {
|
const { state } = Mota.require('@user/data-state');
|
||||||
core.events.recoverEvents(core.getFlag('__events__'));
|
const flags = state.flags;
|
||||||
core.removeFlag('__events__');
|
if (flags.occupied('__fromLoad__')) {
|
||||||
|
core.events.recoverEvents(flags.getFieldValue('__events__'));
|
||||||
|
flags.deleteField('__events__');
|
||||||
} else {
|
} else {
|
||||||
// 每次抵达楼层执行的事件
|
// 每次抵达楼层执行的事件
|
||||||
core.insertAction(core.floors[floorId].eachArrive);
|
core.insertAction(core.floors[floorId].eachArrive);
|
||||||
@ -261,7 +267,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
var stair = null,
|
var stair = null,
|
||||||
loc = null;
|
loc = null;
|
||||||
if (core.flags.flyRecordPosition) {
|
if (core.flags.flyRecordPosition) {
|
||||||
loc = core.getFlag('__leaveLoc__', {})[toId] || null;
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
loc =
|
||||||
|
flags.getFieldValueDefaults('__leaveLoc__', {})[toId] ||
|
||||||
|
null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 记录录像
|
// 记录录像
|
||||||
@ -312,11 +322,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.status.route = core.decodeRoute(data.route);
|
core.status.route = core.decodeRoute(data.route);
|
||||||
core.control._bindRoutePush();
|
core.control._bindRoutePush();
|
||||||
// 文字属性,全局属性
|
// 文字属性,全局属性
|
||||||
core.status.textAttribute = core.getFlag(
|
const { state } = Mota.require('@user/data-state');
|
||||||
|
const flags = state.flags;
|
||||||
|
core.status.textAttribute = flags.getFieldValueDefaults(
|
||||||
'textAttribute',
|
'textAttribute',
|
||||||
core.status.textAttribute
|
core.status.textAttribute
|
||||||
);
|
);
|
||||||
var toAttribute = core.getFlag(
|
var toAttribute = flags.getFieldValueDefaults(
|
||||||
'globalAttribute',
|
'globalAttribute',
|
||||||
core.status.globalAttribute
|
core.status.globalAttribute
|
||||||
);
|
);
|
||||||
@ -325,7 +337,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.resize();
|
core.resize();
|
||||||
}
|
}
|
||||||
// 重置音量
|
// 重置音量
|
||||||
core.events.setVolume(core.getFlag('__volume__', 1), 0);
|
core.events.setVolume(
|
||||||
|
flags.getFieldValueDefaults('__volume__', 1),
|
||||||
|
0
|
||||||
|
);
|
||||||
// 加载勇士图标
|
// 加载勇士图标
|
||||||
var icon = core.status.hero.image;
|
var icon = core.status.hero.image;
|
||||||
icon = core.getMappedName(icon);
|
icon = core.getMappedName(icon);
|
||||||
@ -336,16 +351,16 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.material.icons.hero.height =
|
core.material.icons.hero.height =
|
||||||
core.material.images.images[icon].height / 4;
|
core.material.images.images[icon].height / 4;
|
||||||
}
|
}
|
||||||
core.setFlag('__fromLoad__', true);
|
flags.setFieldValue('__fromLoad__', true);
|
||||||
|
|
||||||
// 切换到对应的楼层
|
// 切换到对应的楼层
|
||||||
core.changeFloor(data.floorId, null, data.hero.loc, 0, function () {
|
core.changeFloor(data.floorId, null, data.hero.loc, 0, function () {
|
||||||
if (core.hasFlag('__bgm__')) {
|
if (flags.occupied('__bgm__')) {
|
||||||
// 持续播放
|
// 持续播放
|
||||||
core.playBgm(core.getFlag('__bgm__'));
|
core.playBgm(flags.getFieldValue('__bgm__'));
|
||||||
}
|
}
|
||||||
|
|
||||||
core.removeFlag('__fromLoad__');
|
flags.deleteField('__fromLoad__');
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
4
src/types/declaration/control.d.ts
vendored
4
src/types/declaration/control.d.ts
vendored
@ -883,7 +883,7 @@ interface Control {
|
|||||||
floorId?: FloorIds,
|
floorId?: FloorIds,
|
||||||
name?: string,
|
name?: string,
|
||||||
defaultValue?: T
|
defaultValue?: T
|
||||||
): T;
|
): T | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 可使用,暂时没有替代接口\
|
* @deprecated 可使用,暂时没有替代接口\
|
||||||
@ -899,7 +899,7 @@ interface Control {
|
|||||||
y?: number,
|
y?: number,
|
||||||
floorId?: FloorIds,
|
floorId?: FloorIds,
|
||||||
name?: string,
|
name?: string,
|
||||||
value?: number | string
|
value?: number
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
25
task.md
Normal file
25
task.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 需要弃用
|
||||||
|
|
||||||
|
- `getMappedName`
|
||||||
|
- `getNextLvUpNeed`
|
||||||
|
- `getLvName`
|
||||||
|
- `getHeroLoc`
|
||||||
|
- `setHeroLoc`
|
||||||
|
- `getNakedStatus`
|
||||||
|
- `getStatusLabel`
|
||||||
|
- `setBuff`
|
||||||
|
- `addBuff`
|
||||||
|
- `getBuff`
|
||||||
|
- `setStatus`
|
||||||
|
- `addStatus`
|
||||||
|
- `getStatus`
|
||||||
|
- `getStatusOrDefault`
|
||||||
|
- `getRealStatus`
|
||||||
|
- `getRealStatusOrDefault`
|
||||||
|
|
||||||
|
# 需要重构
|
||||||
|
|
||||||
|
- 存档系统
|
||||||
|
- 寻路系统
|
||||||
|
- `core.status.hero`
|
||||||
|
- `core.status.hero.flags`
|
||||||
Loading…
Reference in New Issue
Block a user