Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
love_飞影
Neos
Commits
6fc33fa6
Commit
6fc33fa6
authored
Apr 09, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: rust-src module types
parent
d2c4a162
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
27 additions
and
24 deletions
+27
-24
src/api/ocgcore/ocgAdapter/bufferIO.ts
src/api/ocgcore/ocgAdapter/bufferIO.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectBattleCmd.ts
...re/ocgAdapter/ctos/ctosGameMsgResponse/selectBattleCmd.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectCard.ts
...ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectCard.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectChain.ts
...cgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectChain.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectCounter.ts
...core/ocgAdapter/ctos/ctosGameMsgResponse/selectCounter.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectEffectYn.ts
...ore/ocgAdapter/ctos/ctosGameMsgResponse/selectEffectYn.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectIdleCmd.ts
...core/ocgAdapter/ctos/ctosGameMsgResponse/selectIdleCmd.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectOption.ts
...gcore/ocgAdapter/ctos/ctosGameMsgResponse/selectOption.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectPlace.ts
...cgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectPlace.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectPosition.ts
...ore/ocgAdapter/ctos/ctosGameMsgResponse/selectPosition.ts
+0
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectUnselectCard.ts
...ocgAdapter/ctos/ctosGameMsgResponse/selectUnselectCard.ts
+1
-1
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/sortCard.ts
...i/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/sortCard.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/reloadField.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/reloadField.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
+0
-1
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
+0
-1
src/env.d.ts
src/env.d.ts
+26
-0
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+0
-1
No files found.
src/api/ocgcore/ocgAdapter/bufferIO.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../idl/ocgcore
"
;
import
{
numberToCardPosition
,
numberToCardZone
}
from
"
./util
"
;
import
{
numberToCardPosition
,
numberToCardZone
}
from
"
./util
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
const
LOCATION_OVERLAY
=
0x80
;
const
LOCATION_OVERLAY
=
0x80
;
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectBattleCmd.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
export
default
(
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectCard.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectCardResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectCardResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectChain.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectChainResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectChainResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectCounter.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectCounterResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectCounterResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectEffectYn.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
export
default
(
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectIdleCmd.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectIdleCmdResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectIdleCmdResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectOption.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectOptionResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SelectOptionResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectPlace.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
cardZoneToNumber
}
from
"
../../util
"
;
import
{
cardZoneToNumber
}
from
"
../../util
"
;
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectPosition.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
export
default
(
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/selectUnselectCard.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
export
default
(
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosGameMsgResponse/sortCard.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferWriter
}
from
"
rust-src
"
;
import
{
BufferWriter
}
from
"
rust-src
"
;
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SortCardResponse
)
=>
{
export
default
(
response
:
ygopro
.
CtosGameMsgResponse
.
SortCardResponse
)
=>
{
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/reloadField.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
MsgReloadField
=
ygopro
.
StocGameMessage
.
MsgReloadField
;
import
MsgReloadField
=
ygopro
.
StocGameMessage
.
MsgReloadField
;
import
{
numberToCardPosition
}
from
"
../../util
"
;
import
{
numberToCardPosition
}
from
"
../../util
"
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectOption
=
ygopro
.
StocGameMessage
.
MsgSelectOption
;
import
MsgSelectOption
=
ygopro
.
StocGameMessage
.
MsgSelectOption
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
import
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPosition
=
ygopro
.
StocGameMessage
.
MsgSelectPosition
;
import
MsgSelectPosition
=
ygopro
.
StocGameMessage
.
MsgSelectPosition
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
View file @
6fc33fa6
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
YgoProPacket
,
StocAdapter
}
from
"
../packet
"
;
import
{
YgoProPacket
,
StocAdapter
}
from
"
../packet
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
...
...
src/env.d.ts
View file @
6fc33fa6
...
@@ -10,3 +10,29 @@ interface ImportMetaEnv {
...
@@ -10,3 +10,29 @@ interface ImportMetaEnv {
interface
ImportMeta
{
interface
ImportMeta
{
readonly
env
:
ImportMetaEnv
;
readonly
env
:
ImportMetaEnv
;
}
}
/**
* 手动声明WASM模块rust-src
*/
declare
module
"
rust-src
"
{
export
default
function
rustInit
(
url
?:
URL
):
Promise
<
void
>
;
export
class
BufferWriter
{
constructor
();
public
writeInt8
(
value
:
number
):
void
;
public
writeUint8
(
value
:
number
):
void
;
public
writeInt16
(
value
:
number
):
void
;
public
writeUint16
(
value
:
number
):
void
;
public
writeInt32
(
value
:
number
):
void
;
public
writeUint32
(
value
:
number
):
void
;
public
toArray
():
Uint8Array
;
}
export
class
BufferReader
{
constructor
(
buffer
:
Uint8Array
);
public
readInt8
():
number
;
public
readUint8
():
number
;
public
readInt16
():
number
;
public
readUint16
():
number
;
public
readInt32
():
number
;
public
readUint32
():
number
;
}
}
src/ui/WaitRoom.tsx
View file @
6fc33fa6
...
@@ -43,7 +43,6 @@ import type { UploadProps } from "antd";
...
@@ -43,7 +43,6 @@ import type { UploadProps } from "antd";
import
{
selectDuelStart
}
from
"
@/reducers/moraSlice
"
;
import
{
selectDuelStart
}
from
"
@/reducers/moraSlice
"
;
import
NeosConfig
from
"
../../neos.config.json
"
;
import
NeosConfig
from
"
../../neos.config.json
"
;
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
// @ts-ignore
import
rustInit
from
"
rust-src
"
;
import
rustInit
from
"
rust-src
"
;
import
{
initStrings
}
from
"
@/api/strings
"
;
import
{
initStrings
}
from
"
@/api/strings
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment