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
f9b30794
Commit
f9b30794
authored
Jul 13, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework QuestReward + remove some console.log
parent
e3968fae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
9 deletions
+18
-9
quest-reward.ts
src/app/class/rewards/quest-reward/quest-reward.ts
+2
-1
role.component.html
src/app/pieces/role/role.component.html
+8
-3
role.component.ts
src/app/pieces/role/role.component.ts
+8
-0
annexe-task.component.ts
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
+0
-1
final-task.component.ts
src/app/pieces/tasks/final-task/final-task.component.ts
+0
-1
optionnal-task.component.ts
...p/pieces/tasks/optionnal-task/optionnal-task.component.ts
+0
-1
random-event.component.ts
src/app/pieces/tasks/random-event/random-event.component.ts
+0
-1
task.component.ts
src/app/pieces/tasks/task/task.component.ts
+0
-1
No files found.
src/app/class/rewards/quest-reward/quest-reward.ts
View file @
f9b30794
...
...
@@ -7,5 +7,6 @@ export class QuestReward extends Reward {
super
(
'quest'
);
}
indexQuest
!
:
number
;
intitule
!
:
string
;
questName
!
:
string
;
}
src/app/pieces/role/role.component.html
View file @
f9b30794
...
...
@@ -82,9 +82,14 @@
<button
mat-button
(
click
)="
removeReward
(
i
)"
><mat-icon
fontIcon=
"remove"
></mat-icon></button>
</div>
<div
class=
"piece-form-rewards-reward-quest"
*
ngIf=
"reward.type == 'quest'"
>
<select
[(
ngModel
)]="
getQuestReward
(
i
).
indexQuest
"
>
<ng-container
*
ngFor=
"let quest of mission.roles; let index = index"
>
<option
[
ngValue
]="
index
"
*
ngIf=
"i != index"
>
{{quest.intitule ? quest.intitule : 'Role '+(index+1)}}
</option>
<select
(
change
)="
changeQuestReward
(
i
,
$
event
)"
>
<ng-container
*
ngFor=
"let mission of scenario.missions; let indexMission = index"
>
<ng-container
*
ngFor=
"let quest of mission.roles; let indexRole = index"
>
<option
[
ngValue
]="
quest
.
questName
"
[
selected
]="
getQuestReward
(
i
).
intitule =
=
quest
.
intitule
&&
getQuestReward
(
i
).
questName =
=
quest
.
questName
"
*
ngIf=
"role.intitule && quest.questName && role.intitule == quest.intitule && role.questName != quest.questName"
>
{{quest.questName}}
</option>
</ng-container>
</ng-container>
</select>
<button
mat-button
(
click
)="
removeReward
(
i
)"
><mat-icon
fontIcon=
"remove"
></mat-icon></button>
...
...
src/app/pieces/role/role.component.ts
View file @
f9b30794
...
...
@@ -148,4 +148,12 @@ export class RoleComponent implements OnInit {
removeObject
(
i
:
number
,
j
:
number
):
void
{
this
.
getObjectsReward
(
i
).
objects
.
splice
(
j
,
1
);
}
changeQuestReward
(
index
:
number
,
event
:
any
)
{
let
value
:
string
=
event
.
target
.
value
;
let
reward
=
new
QuestReward
();
reward
.
intitule
=
this
.
role
.
intitule
;
reward
.
questName
=
value
;
this
.
role
.
rewards
[
index
]
=
reward
;
}
}
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
View file @
f9b30794
...
...
@@ -196,7 +196,6 @@ export class AnnexeTaskComponent implements OnInit {
}
else
{
this
.
onUncheckRessource
(
ressource
);
}
console
.
log
(
this
.
task
.
prerequireRessources
);
}
isCheckedRessource
(
ressource
:
Ressource
):
boolean
{
...
...
src/app/pieces/tasks/final-task/final-task.component.ts
View file @
f9b30794
...
...
@@ -198,7 +198,6 @@ export class FinalTaskComponent implements OnInit {
}
else
{
this
.
onUncheckRessource
(
ressource
);
}
console
.
log
(
this
.
task
.
prerequireRessources
);
}
isCheckedRessource
(
ressource
:
Ressource
):
boolean
{
...
...
src/app/pieces/tasks/optionnal-task/optionnal-task.component.ts
View file @
f9b30794
...
...
@@ -216,7 +216,6 @@ export class OptionnalTaskComponent implements OnInit {
}
else
{
this
.
onUncheckRessource
(
ressource
);
}
console
.
log
(
this
.
task
.
prerequireRessources
);
}
isCheckedRessource
(
ressource
:
Ressource
):
boolean
{
...
...
src/app/pieces/tasks/random-event/random-event.component.ts
View file @
f9b30794
...
...
@@ -193,7 +193,6 @@ export class RandomEventComponent implements OnInit {
}
else
{
this
.
onUncheckRessource
(
ressource
);
}
console
.
log
(
this
.
task
.
prerequireRessources
);
}
isCheckedRessource
(
ressource
:
Ressource
):
boolean
{
...
...
src/app/pieces/tasks/task/task.component.ts
View file @
f9b30794
...
...
@@ -216,7 +216,6 @@ export class TaskComponent implements OnInit {
}
else
{
this
.
onUncheckRessource
(
ressource
);
}
console
.
log
(
this
.
task
.
prerequireRessources
);
}
isCheckedRessource
(
ressource
:
Ressource
):
boolean
{
...
...
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