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
802455b9
Commit
802455b9
authored
Jun 09, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
role/mission erase/add/delete
parent
7685c7e0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
15 deletions
+75
-15
app.component.html
src/app/app.component.html
+5
-5
educational-objective.component.html
...ducational-objective/educational-objective.component.html
+1
-0
educational-objective.component.ts
.../educational-objective/educational-objective.component.ts
+18
-2
game-context.component.ts
src/app/pieces/game-context/game-context.component.ts
+5
-1
game-educationnal-objective.component.ts
...ionnal-objective/game-educationnal-objective.component.ts
+1
-1
mission-context.component.html
...app/pieces/mission-context/mission-context.component.html
+1
-0
mission-context.component.ts
src/app/pieces/mission-context/mission-context.component.ts
+21
-2
role.component.html
src/app/pieces/role/role.component.html
+1
-1
role.component.ts
src/app/pieces/role/role.component.ts
+22
-3
No files found.
src/app/app.component.html
View file @
802455b9
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"container-scenario-main-missions"
>
<div
class=
"container-scenario-main-missions-mission"
*
ngFor=
"let mission of this.scenario.missions"
>
<div
class=
"container-scenario-main-missions-mission"
*
ngFor=
"let mission of this.scenario.missions
, let i = index
"
>
<div
class=
"container-scenario-chronologie"
>
<div
class=
"container-scenario-chronologie-title"
>
Chronologie générale de la mission
</div>
...
...
@@ -29,12 +29,12 @@
<div
style=
"display: flex;"
>
<div
class=
"container-scenario-main-missions-mission-missionPieces"
[
style
.
z-index
]="
3
"
>
<app-educational-objective
[
educationnalObjective
]="
mission
.
educationnalObjective
"
></app-educational-objective>
<app-mission-context
[
style
.
z-index
]="
2
"
[
missionContext
]="
mission
.
context
"
></app-mission-context>
<app-educational-objective
[
educationnalObjective
]="
mission
.
educationnalObjective
"
[
scenario
]="
scenario
"
[
i
]="
i
"
></app-educational-objective>
<app-mission-context
[
style
.
z-index
]="
2
"
[
missionContext
]="
mission
.
context
"
[
scenario
]="
scenario
"
[
i
]="
i
"
></app-mission-context>
</div>
<div
class=
"container-scenario-main-missions-mission-roles"
[
style
.
z-index
]="
2
"
>
<div
class=
"container-scenario-main-missions-mission-roles-role"
*
ngFor=
"let role of mission.roles"
>
<div
class=
"container-scenario-main-missions-mission-roles-role"
*
ngFor=
"let role of mission.roles
, let i = index
"
>
<div
style=
"display: flex; flex-direction: column;"
>
<div
class=
"container-scenario-main-missions-mission-roles-role-chronologie"
>
...
...
@@ -54,7 +54,7 @@
</div>
<div
style=
"display: flex; flex-direction: row;"
>
<app-role
[
style
.
z-index
]="
2
"
[
role
]="
role
"
></app-role>
<app-role
[
style
.
z-index
]="
2
"
[
role
]="
role
"
[
mission
]="
mission
"
[
i
]="
i
"
></app-role>
<div
class=
"container-scenario-main-missions-mission-roles-role-tasks"
[
style
.
z-index
]="
1
"
>
<div
class=
"container-scenario-main-missions-mission-roles-role-tasks-inlineTasks"
*
ngFor=
"let tasks of role.tasks, let i = index"
[
style
.
z-index
]="
role
.
tasks
.
length
+
i
"
>
<div
*
ngFor=
"let task of tasks, let j = index"
[
style
.
z-index
]="
tasks
.
length-j
"
>
...
...
src/app/pieces/educational-objective/educational-objective.component.html
View file @
802455b9
...
...
@@ -6,6 +6,7 @@
<div
class=
"piece-menu"
[
class
]="
displayMenu
"
>
<mat-icon
fontIcon=
"add"
(
click
)="
onClickAdd
()"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
*
ngIf=
"canDelete()"
></mat-icon>
<mat-icon
fontIcon=
"more_vert"
(
click
)="
onClickDots
()"
></mat-icon>
</div>
...
...
src/app/pieces/educational-objective/educational-objective.component.ts
View file @
802455b9
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
EducationnalObjective
}
from
'src/app/class/educationnal-objective/educationnal-objective'
;
import
{
Mission
}
from
'src/app/class/mission/mission'
;
import
{
Scenario
}
from
'src/app/class/scenario/scenario'
;
@
Component
({
selector
:
'app-educational-objective'
,
...
...
@@ -9,6 +11,8 @@ import { EducationnalObjective } from 'src/app/class/educationnal-objective/educ
export
class
EducationalObjectiveComponent
implements
OnInit
{
@
Input
()
educationnalObjective
:
EducationnalObjective
=
new
EducationnalObjective
();
@
Input
()
scenario
:
Scenario
=
new
Scenario
();
@
Input
()
i
:
number
=
0
;
constructor
()
{
}
...
...
@@ -22,11 +26,23 @@ export class EducationalObjectiveComponent implements OnInit {
}
onClickAdd
():
void
{
this
.
scenario
.
missions
.
push
(
new
Mission
());
}
onClickErase
():
void
{
this
.
educationnalObjective
.
objective
=
''
;
}
onClickDelete
():
void
{
this
.
scenario
.
missions
.
splice
(
this
.
i
,
1
);
}
canDelete
():
boolean
{
let
res
:
boolean
=
true
;
if
(
this
.
scenario
.
missions
.
length
<=
1
)
{
res
=
false
;
}
return
res
;
}
}
src/app/pieces/game-context/game-context.component.ts
View file @
802455b9
...
...
@@ -18,7 +18,11 @@ export class GameContextComponent implements OnInit {
displayMenu
:
string
=
'hide'
;
onClickErase
():
void
{
this
.
gameContext
.
univers
=
''
;
this
.
gameContext
.
support
=
''
;
this
.
gameContext
.
duration
=
''
;
this
.
gameContext
.
intrigue
=
''
;
this
.
gameContext
.
other
=
''
;
}
onClickDots
():
void
{
...
...
src/app/pieces/game-educationnal-objective/game-educationnal-objective.component.ts
View file @
802455b9
...
...
@@ -22,7 +22,7 @@ export class GameEducationnalObjectiveComponent implements OnInit {
}
onClickErase
():
void
{
this
.
gameEducationnalObjective
.
objective
=
''
;
}
}
src/app/pieces/mission-context/mission-context.component.html
View file @
802455b9
...
...
@@ -6,6 +6,7 @@
<div
class=
"piece-menu"
[
class
]="
displayMenu
"
>
<mat-icon
fontIcon=
"add"
(
click
)="
onClickAdd
()"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
*
ngIf=
"canDelete()"
></mat-icon>
<mat-icon
fontIcon=
"more_vert"
(
click
)="
onClickDots
()"
></mat-icon>
</div>
...
...
src/app/pieces/mission-context/mission-context.component.ts
View file @
802455b9
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
MissionContext
}
from
'src/app/class/mission-context/mission-context'
;
import
{
Mission
}
from
'src/app/class/mission/mission'
;
import
{
Scenario
}
from
'src/app/class/scenario/scenario'
;
@
Component
({
selector
:
'app-mission-context'
,
...
...
@@ -11,6 +13,8 @@ export class MissionContextComponent implements OnInit {
constructor
()
{
}
@
Input
()
missionContext
:
MissionContext
=
new
MissionContext
();
@
Input
()
scenario
:
Scenario
=
new
Scenario
();
@
Input
()
i
:
number
=
0
;
ngOnInit
():
void
{
}
...
...
@@ -22,11 +26,26 @@ export class MissionContextComponent implements OnInit {
}
onClickAdd
():
void
{
this
.
scenario
.
missions
.
push
(
new
Mission
());
}
onClickErase
():
void
{
this
.
missionContext
.
duration
=
''
;
this
.
missionContext
.
intrigue
=
''
;
this
.
missionContext
.
communication
=
''
;
this
.
missionContext
.
various
=
''
;
}
onClickDelete
():
void
{
this
.
scenario
.
missions
.
splice
(
this
.
i
,
1
);
}
canDelete
():
boolean
{
let
res
:
boolean
=
true
;
if
(
this
.
scenario
.
missions
.
length
<=
1
)
{
res
=
false
;
}
return
res
;
}
}
src/app/pieces/role/role.component.html
View file @
802455b9
...
...
@@ -6,7 +6,7 @@
<div
class=
"piece-menu"
[
class
]="
displayMenu
"
>
<mat-icon
fontIcon=
"add"
(
click
)="
onClickAdd
()"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
*
ngIf=
"canDelete()"
></mat-icon>
<mat-icon
fontIcon=
"more_vert"
(
click
)="
onClickDots
()"
></mat-icon>
</div>
...
...
src/app/pieces/role/role.component.ts
View file @
802455b9
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Mission
}
from
'src/app/class/mission/mission'
;
import
{
Ressource
}
from
'src/app/class/ressource/ressource'
;
import
{
CharacterReward
}
from
'src/app/class/rewards/character-reward/character-reward'
;
import
{
ObjectiveReward
}
from
'src/app/class/rewards/objective-reward/objective-reward'
;
...
...
@@ -19,10 +20,13 @@ import { SupplementaryRole } from 'src/app/class/supplementary-role/supplementar
export
class
RoleComponent
implements
OnInit
{
@
Input
()
role
:
Role
=
new
Role
();
@
Input
()
mission
:
Mission
=
new
Mission
();
@
Input
()
i
:
number
=
0
;
constructor
()
{
}
ngOnInit
():
void
{
this
.
mission
.
equalizeLengths
();
}
displayMenu
:
string
=
'hide'
;
...
...
@@ -33,15 +37,30 @@ export class RoleComponent implements OnInit {
}
onClickAdd
():
void
{
this
.
mission
.
roles
.
push
(
new
Role
());
}
onClickErase
():
void
{
this
.
role
.
intitule
=
''
;
this
.
role
.
questName
=
''
;
this
.
role
.
description
=
''
;
this
.
role
.
educationnalObjectives
=
[
new
RoleEducationnalObjective
()];
this
.
role
.
rewards
=
[];
this
.
role
.
stuff
=
''
;
this
.
role
.
ressources
=
[];
this
.
role
.
supplementaryRoles
=
[];
}
onClickDelete
():
void
{
this
.
mission
.
roles
.
splice
(
this
.
i
,
1
);
}
canDelete
():
boolean
{
let
res
:
boolean
=
true
;
if
(
this
.
mission
.
roles
.
length
<=
2
)
{
res
=
false
;
}
return
res
;
}
addEducationnalObjective
():
void
{
...
...
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