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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
54e935ac
Commit
54e935ac
authored
Mar 15, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bbee7335
Pipeline
#20695
passed with stages
in 16 minutes and 48 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
.gitlab-ci.yml
.gitlab-ci.yml
+8
-12
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
+4
-3
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+3
-0
No files found.
.gitlab-ci.yml
View file @
54e935ac
...
...
@@ -22,17 +22,14 @@ npm_ci:
dependencies
:
-
npm_ci
# ts_check:
# dependencies:
# - npm_ci
# stage: check
# tags:
# - linux
# before_script:
# - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# script:
# - wasm-pack build ./rust-src --target web
# - npx tsc
ts_check
:
dependencies
:
-
npm_ci
stage
:
check
tags
:
-
linux
script
:
-
npx tsc
rs_check
:
stage
:
check
...
...
@@ -83,7 +80,6 @@ npm_build:
script
:
-
mv neos.config.prod.json neos.config.json
-
npm run build:prod
-
npx tsc
artifacts
:
paths
:
-
dist
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
View file @
54e935ac
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
init
,
{
ocgDamageAdapter
}
from
"
rust-src
"
;
//@ts-ignore
import
{
ocgDamageAdapter
}
from
"
rust-src
"
;
/*
* Msg Damage
...
...
@@ -7,8 +8,8 @@ import init, { ocgDamageAdapter } from "rust-src";
* @param player - 玩家编号
* @param value - 减少的Hp数值
* */
export
default
async
(
data
:
Uint8Array
)
=>
{
const
damage
=
await
init
().
then
(()
=>
ocgDamageAdapter
(
data
)
);
export
default
(
data
:
Uint8Array
)
=>
{
const
damage
=
ocgDamageAdapter
(
data
);
return
new
ygopro
.
StocGameMessage
.
MsgUpdateHp
(
damage
);
};
src/ui/Duel/main.tsx
View file @
54e935ac
...
...
@@ -31,6 +31,8 @@ import {
selectMeInitInfo
,
selectOpInitInfo
,
}
from
"
../../reducers/duel/initInfoSlice
"
;
//@ts-ignore
import
rustInit
from
"
rust-src
"
;
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
...
...
@@ -39,6 +41,7 @@ const NeosDuel = () => {
useEffect
(()
=>
{
const
init
=
async
()
=>
{
await
initStrings
();
await
rustInit
();
};
if
(
initialRender
.
current
)
{
...
...
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