MC_survival/eventStatus.d.ts

457 lines
9.1 KiB
TypeScript
Raw Permalink Normal View History

2025-01-14 12:27:52 +08:00
interface EventStatusDataMap {
/**
*
*/
action: ActionStatusData;
/**
*
*/
book: number;
/**
*
*/
fly: number;
/**
*
*/
viewMaps: ViewMapStatusData;
/**
*
*/
equipbox: EquipboxStatusData;
/**
*
*/
toolbox: ToolboxStatusData;
/**
*
*/
save: SaveStatusData;
load: SaveStatusData;
replayLoad: SaveStatusData;
replayRemain: SaveStatusData;
replaySince: SaveStatusData;
/**
*
*/
text: TextStatusData;
/**
*
*/
confirmBox: ConfirmStatusData;
/**
*
* 西
*/
about: null;
help: null;
'book-detail': null;
keyBoard: null;
switchs: null;
'switchs-sounds': null;
'switchs-display': null;
'switchs-action': null;
settings: null;
selectShop: null;
notes: null;
syncSave: null;
syncSelect: null;
localSaveSelect: null;
storageRemove: null;
cursor: null;
replay: null;
gameInfo: null;
}
interface _EventStatusSelectionMap {
/**
*
*/
action: number;
/**
*
*/
equipbox: number;
/**
*
*/
toolbox: number;
/**
*
*/
save: boolean;
load: boolean;
/**
* (0)(1)
*/
confirmBox: 0 | 1;
/**
*
*/
switchs: number;
'switchs-sounds': number;
'switchs-display': number;
'switchs-action': number;
settings: number;
notes: number;
syncSave: number;
syncSelect: number;
localSaveSelect: number;
storageRemove: number;
replay: number;
gameInfo: number;
}
interface _EventStatusUiMap {
/**
*
*/
action: ActionStatusUi;
/**
* id
*/
book: number;
/**
*
*/
confirmBox: string;
/**
*
*/
'switchs-display': SwitchsStatusData;
/**
*
*/
settings: SwitchsStatusData;
/**
*
*/
selectShop: SelectShopStatusUi;
notes: SelectShopStatusUi;
syncSave: SelectShopStatusUi;
syncSelect: SelectShopStatusUi;
localSaveSelect: SelectShopStatusUi;
storageRemove: SelectShopStatusUi;
gameInfo: SelectShopStatusUi;
}
interface _EventStatusIntervalMap {
/**
* (?
*/
action: ActionStatusData;
/**
* 退
*/
book: ActionStatusData;
/**
* 退
*/
save: ActionStatusData;
load: ActionStatusData;
}
interface _EventStatusTimeoutMap {
/**
*
*/
action: number;
}
interface _EventStatusAnimateUiMap {
/**
*
*/
action: number;
}
type EventStatus = keyof EventStatusDataMap;
type _FillEventStatus<T> = {
[P in EventStatus]: P extends keyof T ? T[P] : null;
};
type EventStatusSelectionMap = _FillEventStatus<_EventStatusSelectionMap>;
type EventStatusUiMap = _FillEventStatus<_EventStatusUiMap>;
type EventStatusIntervalMap = _FillEventStatus<_EventStatusIntervalMap>;
type EventStatusTimeoutMap = _FillEventStatus<_EventStatusTimeoutMap>;
type EventStatusAnimateUiMap = _FillEventStatus<_EventStatusAnimateUiMap>;
/**
*
*/
interface EventStatusOf<T extends EventStatus = EventStatus> {
/**
*
*/
id: T;
/**
*
*/
data: EventStatusDataMap[T];
/**
*
*/
selection: EventStatusSelectionMap[T];
/**
* ui信息
*/
ui: EventStatusUiMap[T];
/**
*
*/
interval: EventStatusIntervalMap[T];
/**
*
*/
timeout: EventStatusTimeoutMap[T];
/**
*
*/
animateUi: EventStatusAnimateUiMap[T];
}
interface ActionStatusEventList {
/**
*
*/
todo: MotaEvent;
/**
*
*/
total: MotaEvent;
/**
*
*/
contidion: string;
}
interface ActionLocStackInfo {
/**
*
*/
x: number;
/**
*
*/
y: number;
/**
* id
*/
floorId: FloorIds;
}
/**
*
*/
interface ActionStatusData {
/**
*
*/
list: DeepReadonly<ActionStatusEventList>;
/**
*
*/
x?: number;
/**
*
*/
y?: number;
/**
*
*/
callback?: () => void;
/**
*
*/
appendingEvents: MotaEvent[];
/**
*
*/
locStack: any[];
/**
*
*/
type: string;
/**
*
*/
current: MotaAction;
}
interface ActionStatusUi {
/**
*
*/
text: string;
/**
*
*/
yes?: MotaEvent;
/**
*
*/
no?: MotaEvent;
/**
*
*/
choices?: string[];
/**
*
*/
width?: number;
}
interface ViewMapStatusData {
/**
*
*/
index: number;
/**
*
*/
damage: boolean;
/**
*
*/
all: boolean;
/**
*
*/
x: number;
/**
*
*/
y: number;
}
interface EquipboxStatusData {
/**
*
*/
page: number;
/**
*
*/
selectId: ItemIdOf<'equips'>;
}
interface ToolboxStatusData {
/**
*
*/
toolsPage: number;
/**
*
*/
constantsPage: number;
/**
* id
*/
selectId: ItemIdOf<'constants' | 'tools'>;
}
interface SaveStatusData {
/**
*
*/
page: number;
/**
*
*/
offset: number;
/**
* fav表示收藏all表示所有存档
*/
mode: 'fav' | 'all';
}
interface TextStatusData {
/**
*
*/
list: string[];
/**
*
*/
callback: () => void;
}
interface ConfirmStatusData {
/**
*
*/
yes: () => void;
/**
*
*/
no: () => void;
}
interface SwitchsStatusData {
/**
*
*/
choices: string[];
}
interface SelectShopStatusUi {
/**
*
*/
offset: number;
}