Commit 1802f14a authored by timel's avatar timel

style: fmt

parent b85b3cab
import { ygopro } from "@/api/ocgcore/idl/ocgcore"; import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { setWaiting } from "@/reducers/duel/mod"; import { setWaiting } from "@/reducers/duel/mod";
import { store } from "@/store"; import { store } from "@/store";
import { matStore } from "@/valtioStores";
import onMsgAttack from "./attack"; import onMsgAttack from "./attack";
import onMsgAttackDisable from "./attackDisable"; import onMsgAttackDisable from "./attackDisable";
...@@ -43,8 +44,6 @@ import onMsgUpdateHp from "./updateHp"; ...@@ -43,8 +44,6 @@ import onMsgUpdateHp from "./updateHp";
import onMsgWait from "./wait"; import onMsgWait from "./wait";
import onMsgWin from "./win"; import onMsgWin from "./win";
import { matStore } from "@/valtioStores";
const ActiveList = [ const ActiveList = [
"select_idle_cmd", "select_idle_cmd",
"select_place", "select_place",
......
...@@ -5,7 +5,6 @@ import { ...@@ -5,7 +5,6 @@ import {
fetchSelectHintMeta, fetchSelectHintMeta,
} from "@/reducers/duel/hintSlice"; } from "@/reducers/duel/hintSlice";
import { AppDispatch } from "@/store"; import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores"; import { matStore } from "@/valtioStores";
import MsgHint = ygopro.StocGameMessage.MsgHint; import MsgHint = ygopro.StocGameMessage.MsgHint;
......
import { ygopro } from "@/api/ocgcore/idl/ocgcore"; import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { updatePhase } from "@/reducers/duel/mod"; import { updatePhase } from "@/reducers/duel/mod";
import { AppDispatch } from "@/store"; import { AppDispatch } from "@/store";
import { matStore, type PhaseName } from "@/valtioStores"; import { matStore, type PhaseName } from "@/valtioStores";
export default ( export default (
......
import { ygopro } from "@/api/ocgcore/idl/ocgcore"; import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { updateTurn } from "@/reducers/duel/mod"; import { updateTurn } from "@/reducers/duel/mod";
import { AppDispatch } from "@/store"; import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores"; import { matStore } from "@/valtioStores";
export default ( export default (
......
...@@ -7,6 +7,8 @@ import { ...@@ -7,6 +7,8 @@ import {
import { fetchCheckCardMeta } from "@/reducers/duel/modal/mod"; import { fetchCheckCardMeta } from "@/reducers/duel/modal/mod";
import { AppDispatch } from "@/store"; import { AppDispatch } from "@/store";
import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard; import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard;
import { messageStore } from "@/valtioStores";
import { CardZoneToChinese } from "./util"; import { CardZoneToChinese } from "./util";
export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => { export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => {
...@@ -21,6 +23,10 @@ export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => { ...@@ -21,6 +23,10 @@ export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => {
dispatch(setCheckCardModalMinMax({ min, max })); dispatch(setCheckCardModalMinMax({ min, max }));
dispatch(setCheckCardModalOnSubmit("sendSelectCardResponse")); dispatch(setCheckCardModalOnSubmit("sendSelectCardResponse"));
messageStore.checkCardModal.selectMin = min;
messageStore.checkCardModal.selectMax = max;
messageStore.checkCardModal.onSubmit = "sendSelectCardResponse";
for (const card of cards) { for (const card of cards) {
const tagName = CardZoneToChinese(card.location.location); const tagName = CardZoneToChinese(card.location.location);
dispatch( dispatch(
......
...@@ -5,7 +5,6 @@ import { ...@@ -5,7 +5,6 @@ import {
addMagicPlaceInteractivities, addMagicPlaceInteractivities,
addMonsterPlaceInteractivities, addMonsterPlaceInteractivities,
} from "@/reducers/duel/mod"; } from "@/reducers/duel/mod";
import { InteractType, valtioStore } from "@/valtioStores"; import { InteractType, valtioStore } from "@/valtioStores";
const { matStore } = valtioStore; const { matStore } = valtioStore;
......
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
setPositionModalPositions, setPositionModalPositions,
} from "@/reducers/duel/mod"; } from "@/reducers/duel/mod";
import { AppDispatch } from "@/store"; import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores"; import { matStore } from "@/valtioStores";
type MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition; type MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition;
......
export * from "./chatStore"; export * from "./chatStore";
export * from "./joinStore"; export * from "./joinStore";
export * from "./moraStore";
export * from "./playerStore";
export * from "./matStore"; export * from "./matStore";
export * from "./messageStore"; export * from "./messageStore";
export * from "./moraStore";
export * from "./playerStore";
import { createContext, type ReactNode, useRef } from "react"; import { createContext, type ReactNode, useRef } from "react";
import { proxy } from "valtio"; import { proxy } from "valtio";
...@@ -11,10 +11,10 @@ import { devtools } from "valtio/utils"; ...@@ -11,10 +11,10 @@ import { devtools } from "valtio/utils";
import { chatStore } from "./chatStore"; import { chatStore } from "./chatStore";
import { joinStore } from "./joinStore"; import { joinStore } from "./joinStore";
import { moraStore } from "./moraStore";
import { playerStore } from "./playerStore";
import { matStore } from "./matStore"; import { matStore } from "./matStore";
import { messageStore } from "./messageStore"; import { messageStore } from "./messageStore";
import { moraStore } from "./moraStore";
import { playerStore } from "./playerStore";
export const valtioStore = proxy({ export const valtioStore = proxy({
playerStore, playerStore,
......
...@@ -2,19 +2,19 @@ export * from "./types"; ...@@ -2,19 +2,19 @@ export * from "./types";
import { proxy } from "valtio"; import { proxy } from "valtio";
import { fetchCard, type CardMeta } from "@/api/cards"; import { type CardMeta, fetchCard } from "@/api/cards";
import { ygopro } from "@/api/ocgcore/idl/ocgcore"; import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { DESCRIPTION_LIMIT, fetchStrings, getStrings } from "@/api/strings";
import type { import type {
BothSide, BothSide,
CardState,
CardsBothSide, CardsBothSide,
CardState,
DuelFieldState, DuelFieldState,
InitInfo, InitInfo,
MatState, MatState,
} from "./types"; } from "./types";
import { InteractType } from "./types"; import { InteractType } from "./types";
import { DESCRIPTION_LIMIT, fetchStrings, getStrings } from "@/api/strings";
/** /**
* 生成一个指定长度的卡片数组 * 生成一个指定长度的卡片数组
......
import { proxy } from "valtio";
import type { CardMeta } from "@/api/cards"; import type { CardMeta } from "@/api/cards";
import { ygopro } from "@/api/ocgcore/idl/ocgcore"; import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { proxy } from "valtio";
export const messageStore = proxy<ModalState>({ export const messageStore = proxy<ModalState>({
cardModal: { isOpen: false, interactivies: [], counters: {} }, cardModal: { isOpen: false, interactivies: [], counters: {} },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment