diff --git a/src/App.vue b/src/App.vue
index 6c268fa..3bfbd7f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,7 @@
+
@@ -17,11 +18,12 @@
import { Component, Prop, Vue } from 'vue-property-decorator'
import Statblock from './Statblock.vue'
import ContainerView from './ContainerView.vue'
+import ItemView from './ItemView.vue'
import { Creature } from '@/game/creature'
import { World } from '@/game/world'
@Component({
components: {
- Statblock, ContainerView
+ Statblock, ContainerView, ItemView
}
})
@@ -53,6 +55,25 @@ export default class Explore extends Vue {
.character-items {
background: #222;
grid-area: items;
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-template-rows: repeat(100, 1fr);
+ justify-items: center;
+ align-items: start;
+}
+
+@media (max-width: 800px) {
+ .character-items {
+ grid-template-columns: repeat(2, 1fr);
+ }
+}
+
+.character-items > .item-view {
+ flex: 1 1;
+ height: 4rem;
+ max-height: 4rem;
+ width: 6rem;
+ max-width: 6rem;
}
.character-containers {
diff --git a/src/game/items.ts b/src/game/items.ts
index 18600fe..24e0f9e 100644
--- a/src/game/items.ts
+++ b/src/game/items.ts
@@ -3,9 +3,15 @@ import { Actionable, Action, DamageFormula, ConstantDamageFormula, Damage, Damag
import { AttackAction } from './combat/actions'
export enum ItemKind {
- Key,
- Consumable,
- Equipment
+ Key = "Key Item",
+ Consumable = "Consumable",
+ Equipment = "Equipment"
+}
+
+export const ItemKindIcons: {[key in ItemKind]: string} = {
+ [ItemKind.Key]: "fas fa-key",
+ [ItemKind.Consumable]: "fas fa-wine-bottle",
+ [ItemKind.Equipment]: "fas fa-hammer"
}
export abstract class Item implements Actionable {
@@ -18,13 +24,13 @@ export abstract class Item implements Actionable {
}
export enum EquipmentSlot {
- Head,
- Chest,
- Legs,
- Arms,
- MainHand,
- OffHand,
- Feet
+ Head = "Head",
+ Chest = "Chest",
+ Legs = "Legs",
+ Arms = "Arms",
+ MainHand = "MainHand",
+ OffHand = "OffHand",
+ Feet = "Feet"
}
export abstract class Equipment extends Item {