|
diff --git a/src/app/editor/character-editor/inventory-slot-editor/inventory-slot-editor.component.ts b/src/app/editor/character-editor/inventory-slot-editor/inventory-slot-editor.component.ts
index 5e8f9c8..46c36bb 100644
--- a/src/app/editor/character-editor/inventory-slot-editor/inventory-slot-editor.component.ts
+++ b/src/app/editor/character-editor/inventory-slot-editor/inventory-slot-editor.component.ts
@@ -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 = new MatTableDataSource();
diff --git a/src/app/project/game-model/inventory/intentory-slots/InventorySlot.ts b/src/app/project/game-model/inventory/intentory-slots/InventorySlot.ts
index c7657f6..a588f11 100644
--- a/src/app/project/game-model/inventory/intentory-slots/InventorySlot.ts
+++ b/src/app/project/game-model/inventory/intentory-slots/InventorySlot.ts
@@ -7,6 +7,7 @@ export class InventorySlot {
slotName: string
slotCharacteristics: InventoryCharacteristic[] = []
requiredInheritances: ItemGroup[] = [] //if empty: non reqierements
+ combinable: boolean = false;
constructor(slotName: string) {
diff --git a/src/app/project/parser/characterParser/InventorySlotParser.ts b/src/app/project/parser/characterParser/InventorySlotParser.ts
index 3f637cd..22b4041 100644
--- a/src/app/project/parser/characterParser/InventorySlotParser.ts
+++ b/src/app/project/parser/characterParser/InventorySlotParser.ts
@@ -30,6 +30,8 @@ export class InventorySlotParser {
const inventorySlot = new InventorySlot(slotName);
inventorySlot.slotCharacteristics = slotCharacteristics;
inventorySlot.requiredInheritances = inheritedGroups;
+ inventorySlot.combinable = inventorySlotData.combinable;
+
return inventorySlot;
}
diff --git a/src/app/project/serializer/InventorySlotSerializer.ts b/src/app/project/serializer/InventorySlotSerializer.ts
index ae6a6a2..739d260 100644
--- a/src/app/project/serializer/InventorySlotSerializer.ts
+++ b/src/app/project/serializer/InventorySlotSerializer.ts
@@ -16,7 +16,8 @@ export class InventorySlotSerializer {
}),
requiredInheritances: inventorySlot.requiredInheritances.map(itemgroup => {
return itemgroup.componentName
- })
+ }),
+ combinable: inventorySlot.combinable
}
})
}
diff --git a/testModel/characters/Hicks Haddock.json b/testModel/characters/Hicks Haddock.json
index 0a3a015..b3f515d 100644
--- a/testModel/characters/Hicks Haddock.json
+++ b/testModel/characters/Hicks Haddock.json
@@ -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": []
|