Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
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
nanahira
ygopro2
Commits
f1cc78ac
Commit
f1cc78ac
authored
Apr 07, 2019
by
mercury233
Committed by
Unicorn369
Apr 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only ask saving deck when deck changed
parent
2256817d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+6
-0
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+15
-3
No files found.
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
f1cc78ac
...
...
@@ -89,6 +89,8 @@ public class selectDeck : WindowServantSP
((
DeckManager
)
Program
.
I
().
deckManager
).
returnAction
=
()
=>
{
if
(((
DeckManager
)
Program
.
I
().
deckManager
).
deckDirty
)
{
RMSshow_yesOrNoOrCancle
(
"deckManager_returnAction"
,
InterString
.
Get
(
"要保存卡组的变更吗?"
)
...
...
@@ -96,6 +98,10 @@ public class selectDeck : WindowServantSP
,
new
messageSystemValue
{
hint
=
"no"
,
value
=
"no"
}
,
new
messageSystemValue
{
hint
=
"cancle"
,
value
=
"cancle"
}
);
}
else
{
Program
.
I
().
shiftToServant
(
Program
.
I
().
selectDeck
);
}
};
}
}
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
f1cc78ac
...
...
@@ -291,6 +291,7 @@ public class DeckManager : ServantWithCardDescription
}
System
.
IO
.
File
.
WriteAllText
(
"deck/"
+
deckInUse
+
".ydk"
,
value
,
System
.
Text
.
Encoding
.
UTF8
);
}
deckDirty
=
false
;
RMSshow_none
(
InterString
.
Get
(
"卡组[?]已经被保存。"
,
deckInUse
));
return
true
;
}
...
...
@@ -358,6 +359,7 @@ public class DeckManager : ServantWithCardDescription
Debug
.
Log
(
e
);
}
}
deckDirty
=
true
;
}
bool
detailShowed
=
false
;
...
...
@@ -1164,6 +1166,7 @@ public class DeckManager : ServantWithCardDescription
destroyCard
(
deck
.
IRemoved
[
i
]);
}
deck
=
new
YGOSharp
.
Deck
();
deckDirty
=
false
;
((
CardDescription
)
Program
.
I
().
cardDescription
).
setTitle
(
""
);
base
.
hide
();
}
...
...
@@ -1292,6 +1295,7 @@ public class DeckManager : ServantWithCardDescription
MonoCardInDeckManager_
.
cardData
.
cloneTo
(
card
.
cardData
);
card
.
gameObject
.
layer
=
16
;
deck
.
IMain
.
Add
(
card
);
deckDirty
=
true
;
ArrangeObjectDeck
(
true
);
ShowObjectDeck
();
}
...
...
@@ -1316,6 +1320,7 @@ public class DeckManager : ServantWithCardDescription
card
.
cardData
=
cardPicLoader_
.
data
;
card
.
gameObject
.
layer
=
16
;
deck
.
IMain
.
Add
(
card
);
deckDirty
=
true
;
cardInDragging
=
card
;
card
.
beginDrag
();
}
...
...
@@ -1334,6 +1339,7 @@ public class DeckManager : ServantWithCardDescription
}
else
{
deckDirty
=
true
;
ArrangeObjectDeck
(
true
);
ShowObjectDeck
();
}
...
...
@@ -1401,8 +1407,9 @@ public class DeckManager : ServantWithCardDescription
deck
.
ISide
.
Add
(
MonoCardInDeckManager_
);
deck
.
IMain
.
Remove
(
MonoCardInDeckManager_
);
deck
.
IExtra
.
Remove
(
MonoCardInDeckManager_
);
}
ShowObjectDeck
();
}
deckDirty
=
true
;
ShowObjectDeck
();
}
}
}
...
...
@@ -1438,16 +1445,19 @@ public class DeckManager : ServantWithCardDescription
{
deck
.
IMain
.
Add
(
card
);
deck
.
Main
.
Add
(
card
.
cardData
.
Id
);
}
}
deckDirty
=
true
;
}
}
public
YGOSharp
.
Deck
deck
=
new
YGOSharp
.
Deck
();
public
bool
deckDirty
=
false
;
public
void
loadDeckFromYDK
(
string
path
)
{
FromYDKtoCodedDeck
(
path
,
out
deck
);
FormCodedDeckToObjectDeck
();
deckDirty
=
false
;
}
public
static
void
FromYDKtoCodedDeck
(
string
path
,
out
YGOSharp
.
Deck
deck
)
...
...
@@ -1647,11 +1657,13 @@ public class DeckManager : ServantWithCardDescription
YGOSharp
.
Deck
.
sort
((
List
<
MonoCardInDeckManager
>)
deck
.
IMain
);
YGOSharp
.
Deck
.
sort
((
List
<
MonoCardInDeckManager
>)
deck
.
IExtra
);
YGOSharp
.
Deck
.
sort
((
List
<
MonoCardInDeckManager
>)
deck
.
ISide
);
deckDirty
=
true
;
}
void
RandObjectDeck
()
{
YGOSharp
.
Deck
.
rand
((
List
<
MonoCardInDeckManager
>)
deck
.
IMain
);
deckDirty
=
true
;
}
...
...
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