Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RLG Maker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Romain DELEAU
RLG Maker
Commits
924fa2bd
Commit
924fa2bd
authored
Oct 04, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Traces on tasks characters
parent
854a1a9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
characters.component.ts
src/app/sider-pieces/characters/characters.component.ts
+22
-3
No files found.
src/app/sider-pieces/characters/characters.component.ts
View file @
924fa2bd
...
...
@@ -3,9 +3,9 @@ import { MatDialog } from '@angular/material/dialog';
import
{
Character
}
from
'src/app/class/character/character'
;
import
{
Scenario
}
from
'src/app/class/scenario/scenario'
;
import
{
Task
}
from
'src/app/class/task/task'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
PieceDetailsService
}
from
'src/app/services/piece-details/piece-details.service'
;
import
{
TooltipService
}
from
'src/app/services/tooltip/tooltip.service'
;
import
{
SuppressDialogComponent
}
from
'src/app/components/dialogs/suppress-dialog/suppress-dialog.component'
;
import
{
CreateDialogComponent
}
from
'src/app/components/dialogs/create-dialog/create-dialog.component'
;
@
Component
({
selector
:
'app-characters'
,
...
...
@@ -20,7 +20,7 @@ export class CharactersComponent implements OnInit {
selectedAssignCharacter
!
:
Character
|
undefined
;
selectedDeleteCharacterIndex
!
:
number
;
constructor
(
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
constructor
(
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
,
private
pieceDetailsService
:
PieceDetailsService
)
{
}
ngOnInit
():
void
{
}
...
...
@@ -29,6 +29,7 @@ export class CharactersComponent implements OnInit {
if
(
this
.
selectedAssignCharacter
!=
undefined
)
{
this
.
task
.
characters
.
push
(
this
.
selectedAssignCharacter
);
this
.
selectedAssignCharacter
=
undefined
;
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'Select_character'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
'character_['
+
this
.
task
.
characters
.
length
+
']'
,
this
.
formatTraceTarget
(),
'#CE7B66'
));
}
}
...
...
@@ -38,5 +39,23 @@ export class CharactersComponent implements OnInit {
unassignCharacter
(
index
:
number
):
void
{
this
.
task
.
characters
.
splice
(
index
,
1
);
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'Deselect_character'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
'character_['
+
index
+
']'
,
this
.
formatTraceTarget
(),
'#CE7B66'
));
}
formatTraceTarget
():
string
{
let
res
:
string
=
''
;
if
(
this
.
pieceDetailsService
.
piece
instanceof
Task
)
{
switch
(
this
.
pieceDetailsService
.
piece
.
type
)
{
case
'normal'
:
res
=
'Task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'annexe'
:
res
=
'Side_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'final'
:
res
=
'Final_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'optionnal'
:
res
=
'Opt_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'event'
:
res
=
'Event_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'repeat'
:
res
=
'Repeat_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
}
}
return
res
;
}
}
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