Skip to content

Commit 3a63fa9

Browse files
committed
pull out community dlc seperately
1 parent d63c4e4 commit 3a63fa9

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"ngx-clipboard": "^16.0.0",
5050
"ngx-markdown": "^19.0.0",
5151
"pako": "^2.1.0",
52-
"pydt-shared": "^1.9.1",
52+
"pydt-shared": "^1.9.3",
5353
"remove-markdown": "^0.6.0",
5454
"rollbar": "^2.26.4",
5555
"rxjs": "^7.8.1",

src/app/game/config/config.component.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@
9090
</label>
9191
</div>
9292
</div>
93+
</div>
94+
<div class="form-group" *ngIf="communityDlc.length">
95+
<label class="col-sm-3 control-label">Community DLC:</label>
96+
<div class="col-sm-9">
97+
<div class="checkbox" *ngFor="let dlc of communityDlc">
98+
<label>
99+
<input type="checkbox" [(ngModel)]="model.dlc[dlc.id]" (ngModelChange)="validateDlc()" />
100+
{{ dlc.displayName }}
101+
<pydt-info-tooltip *ngIf="dlc.extraInfo" [text]="dlc.extraInfo"></pydt-info-tooltip>
102+
</label>
103+
</div>
104+
</div>
105+
</div>
106+
<div class="form-group">
93107
<span id="dlcHelp" class="help-block col-sm-offset-3"
94108
>All players in your game must have any DLC selected installed, otherwise they will be unable to load save
95109
files!</span

src/app/game/config/config.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,22 @@ export class ConfigureGameComponent implements OnInit {
5353

5454
selectAllDlc(selectAll: boolean): void {
5555
for (const dlc of this.model.civGame.dlcs) {
56-
this.model.dlc[dlc.id] = selectAll;
56+
this.model.dlc[dlc.id] = selectAll && !dlc.community;
5757
}
5858

5959
this.validateDlc();
6060
}
6161

62+
get communityDlc(): DLC[] {
63+
return this.model.civGame.dlcs.filter(dlc => dlc.community);
64+
}
65+
6266
get majorDlc(): DLC[] {
63-
return this.model.civGame.dlcs.filter(dlc => dlc.major);
67+
return this.model.civGame.dlcs.filter(dlc => dlc.major && !dlc.community);
6468
}
6569

6670
get minorDlc(): DLC[] {
67-
return this.model.civGame.dlcs.filter(dlc => !dlc.major);
71+
return this.model.civGame.dlcs.filter(dlc => !dlc.major && !dlc.community);
6872
}
6973

7074
get slotsArray() {

0 commit comments

Comments
 (0)