Implement Combinable Inventoryslots
All checks were successful
E2E Testing / test (push) Successful in 1m32s
All checks were successful
E2E Testing / test (push) Successful in 1m32s
This commit is contained in:
parent
216d9aec07
commit
8fc57d3396
@ -12,6 +12,19 @@
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="combinable">
|
||||
<th mat-header-cell *matHeaderCellDef>Combinable</th>
|
||||
<td mat-cell *matCellDef="let slot">
|
||||
<span *ngIf="slot != editedSlot">
|
||||
<mat-icon *ngIf="slot.combinable">done</mat-icon>
|
||||
<mat-icon *ngIf="!slot.combinable">close</mat-icon>
|
||||
</span>
|
||||
<span *ngIf="slot == editedSlot">
|
||||
<mat-checkbox [(ngModel)]="slot.combinable"></mat-checkbox>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="edit">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let slot">
|
||||
|
@ -22,7 +22,7 @@ export class InventorySlotEditorComponent implements OnInit{
|
||||
|
||||
@Input() character: Character | undefined
|
||||
@Input() itemgroups: ItemGroup[] = []
|
||||
displayedColumns: string[] = ['name', 'edit', 'delete']
|
||||
displayedColumns: string[] = ['name','combinable', 'edit', 'delete']
|
||||
columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
|
||||
dataSource: MatTableDataSource<InventorySlot> = new MatTableDataSource<InventorySlot>();
|
||||
|
||||
|
@ -7,6 +7,7 @@ export class InventorySlot {
|
||||
slotName: string
|
||||
slotCharacteristics: InventoryCharacteristic[] = []
|
||||
requiredInheritances: ItemGroup[] = [] //if empty: non reqierements
|
||||
combinable: boolean = false;
|
||||
|
||||
|
||||
constructor(slotName: string) {
|
||||
|
@ -30,6 +30,8 @@ export class InventorySlotParser {
|
||||
const inventorySlot = new InventorySlot(slotName);
|
||||
inventorySlot.slotCharacteristics = slotCharacteristics;
|
||||
inventorySlot.requiredInheritances = inheritedGroups;
|
||||
inventorySlot.combinable = inventorySlotData.combinable;
|
||||
|
||||
return inventorySlot;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ export class InventorySlotSerializer {
|
||||
}),
|
||||
requiredInheritances: inventorySlot.requiredInheritances.map(itemgroup => {
|
||||
return itemgroup.componentName
|
||||
})
|
||||
}),
|
||||
combinable: inventorySlot.combinable
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -69,7 +69,7 @@
|
||||
],
|
||||
"inventorySlots": [
|
||||
{
|
||||
"slotName": "New Inventory Slot",
|
||||
"slotName": "Linke Hand",
|
||||
"slotCharacteristics": [
|
||||
{
|
||||
"increasingCharacteristic": "Test0",
|
||||
@ -78,7 +78,14 @@
|
||||
],
|
||||
"requiredInheritances": [
|
||||
"Clothing"
|
||||
]
|
||||
],
|
||||
"combinable": true
|
||||
},
|
||||
{
|
||||
"slotName": "Rechte Hand",
|
||||
"slotCharacteristics": [],
|
||||
"requiredInheritances": [],
|
||||
"combinable": true
|
||||
}
|
||||
],
|
||||
"combinableInventorySlots": []
|
||||
|
Loading…
Reference in New Issue
Block a user