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
bce1c2f5
Commit
bce1c2f5
authored
Jan 23, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt exclusion
parent
fa4add3a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
0 deletions
+29
-0
src/reducers/duel/exclusionSlice.ts
src/reducers/duel/exclusionSlice.ts
+18
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+3
-0
src/service/duel/selectIdleCmd.ts
src/service/duel/selectIdleCmd.ts
+6
-0
src/ui/Duel/singleSlot.tsx
src/ui/Duel/singleSlot.tsx
+2
-0
No files found.
src/reducers/duel/exclusionSlice.ts
View file @
bce1c2f5
...
@@ -13,6 +13,9 @@ import {
...
@@ -13,6 +13,9 @@ import {
extendState
,
extendState
,
extendMeta
,
extendMeta
,
removeCard
,
removeCard
,
DuelReducer
,
Interactivity
,
extendIdleInteractivities
,
}
from
"
./generic
"
;
}
from
"
./generic
"
;
export
interface
ExclusionState
extends
DuelFieldState
{}
export
interface
ExclusionState
extends
DuelFieldState
{}
...
@@ -81,6 +84,21 @@ export const removeExclusionImpl: CaseReducer<
...
@@ -81,6 +84,21 @@ export const removeExclusionImpl: CaseReducer<
removeCard
(
exclusion
,
action
.
payload
.
sequence
);
removeCard
(
exclusion
,
action
.
payload
.
sequence
);
};
};
export
const
addExclusionIdleInteractivitiesImpl
:
DuelReducer
<
{
player
:
number
;
sequence
:
number
;
interactivity
:
Interactivity
<
number
>
;
}
>
=
(
state
,
action
)
=>
{
const
exclusion
=
judgeSelf
(
action
.
payload
.
player
,
state
)
?
state
.
meExclusion
:
state
.
opExclusion
;
extendIdleInteractivities
(
exclusion
,
action
.
payload
.
sequence
,
action
.
payload
.
interactivity
);
};
export
const
selectMeExclusion
=
(
state
:
RootState
)
=>
export
const
selectMeExclusion
=
(
state
:
RootState
)
=>
state
.
duel
.
meExclusion
||
{
inner
:
[]
};
state
.
duel
.
meExclusion
||
{
inner
:
[]
};
export
const
selectopExclusion
=
(
state
:
RootState
)
=>
export
const
selectopExclusion
=
(
state
:
RootState
)
=>
...
...
src/reducers/duel/mod.ts
View file @
bce1c2f5
...
@@ -88,6 +88,7 @@ import {
...
@@ -88,6 +88,7 @@ import {
initExclusionImpl
,
initExclusionImpl
,
removeExclusionImpl
,
removeExclusionImpl
,
exclusionCase
,
exclusionCase
,
addExclusionIdleInteractivitiesImpl
,
}
from
"
./exclusionSlice
"
;
}
from
"
./exclusionSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
import
{
...
@@ -193,6 +194,7 @@ const duelSlice = createSlice({
...
@@ -193,6 +194,7 @@ const duelSlice = createSlice({
// 除外区相关`Reducer`
// 除外区相关`Reducer`
initExclusion
:
initExclusionImpl
,
initExclusion
:
initExclusionImpl
,
removeExclusion
:
removeExclusionImpl
,
removeExclusion
:
removeExclusionImpl
,
addExclusionIdleInteractivities
:
addExclusionIdleInteractivitiesImpl
,
// 卡组相关`Reducer`
// 卡组相关`Reducer`
initDeck
:
initDeckImpl
,
initDeck
:
initDeckImpl
,
...
@@ -297,6 +299,7 @@ export const {
...
@@ -297,6 +299,7 @@ export const {
initDeck
,
initDeck
,
initExclusion
,
initExclusion
,
removeExclusion
,
removeExclusion
,
addExclusionIdleInteractivities
,
setCheckCardModalV2IsOpen
,
setCheckCardModalV2IsOpen
,
setCheckCardModalV2MinMax
,
setCheckCardModalV2MinMax
,
setCheckCardModalV2CancelAble
,
setCheckCardModalV2CancelAble
,
...
...
src/service/duel/selectIdleCmd.ts
View file @
bce1c2f5
...
@@ -9,6 +9,7 @@ import {
...
@@ -9,6 +9,7 @@ import {
setEnableEp
,
setEnableEp
,
addCemeteryIdleInteractivities
,
addCemeteryIdleInteractivities
,
clearAllIdleInteractivities
,
clearAllIdleInteractivities
,
addExclusionIdleInteractivities
,
}
from
"
../../reducers/duel/mod
"
;
}
from
"
../../reducers/duel/mod
"
;
import
MsgSelectIdleCmd
=
ygopro
.
StocGameMessage
.
MsgSelectIdleCmd
;
import
MsgSelectIdleCmd
=
ygopro
.
StocGameMessage
.
MsgSelectIdleCmd
;
import
{
ActionCreatorWithPayload
}
from
"
@reduxjs/toolkit
"
;
import
{
ActionCreatorWithPayload
}
from
"
@reduxjs/toolkit
"
;
...
@@ -85,6 +86,11 @@ export default (selectIdleCmd: MsgSelectIdleCmd, dispatch: AppDispatch) => {
...
@@ -85,6 +86,11 @@ export default (selectIdleCmd: MsgSelectIdleCmd, dispatch: AppDispatch) => {
break
;
break
;
}
}
case
ygopro
.
CardZone
.
REMOVED
:
{
dispatcher
(
data
,
interactType
,
addExclusionIdleInteractivities
);
break
;
}
default
:
{
default
:
{
console
.
log
(
`Unhandled zone type:
${
cardInfo
.
location
}
`
);
console
.
log
(
`Unhandled zone type:
${
cardInfo
.
location
}
`
);
}
}
...
...
src/ui/Duel/singleSlot.tsx
View file @
bce1c2f5
...
@@ -25,6 +25,7 @@ const SingleSlot = (props: {
...
@@ -25,6 +25,7 @@ const SingleSlot = (props: {
item
===
undefined
?
false
:
item
.
idleInteractivities
.
length
>
0
item
===
undefined
?
false
:
item
.
idleInteractivities
.
length
>
0
)
!==
undefined
;
)
!==
undefined
;
const
edgesWidth
=
2.0
;
const
edgesWidth
=
2.0
;
const
edgesColor
=
BABYLON
.
Color4
.
FromColor3
(
BABYLON
.
Color3
.
Yellow
());
useClick
(
useClick
(
(
_event
)
=>
{
(
_event
)
=>
{
...
@@ -72,6 +73,7 @@ const SingleSlot = (props: {
...
@@ -72,6 +73,7 @@ const SingleSlot = (props: {
rotation={props.rotation}
rotation={props.rotation}
enableEdgesRendering
enableEdgesRendering
edgesWidth={edgeRender ? edgesWidth : 0}
edgesWidth={edgeRender ? edgesWidth : 0}
edgesColor={edgesColor}
>
>
<standardMaterial
<standardMaterial
name="single-slot-mat"
name="single-slot-mat"
...
...
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