|
- <template>
- <div v-if="container.fullness > 0" class="statblock">
- <h3>{{container.name.capital}}</h3>
- <div>{{container.fullness}} / {{container.capacity}}</div>
- <div v-for="(prey, index) in container.contents" :key="'prey-' + index">{{prey.name}}</div>
- </div>
- </template>
-
- <script lang="ts">
- import { Component, Prop, Vue, Watch, Emit } from 'vue-property-decorator'
- import { Creature, POV } from '@/game/entity'
- import { Stats, Stat } from '@/game/combat'
- import { Container } from '@/game/vore'
-
- @Component
- export default class ContainerView extends Vue {
- @Prop({ required: true })
- container!: Container
-
- constructor () {
- super()
- }
- }
- </script>
-
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped>
- h3 {
- margin: 40px 0 0;
- font-size: 125%;
- }
- ul {
- list-style-type: none;
- padding: 0;
- }
- li {
- display: inline-block;
- margin: 0 10px;
- }
- a {
- color: #42b983;
- }
- </style>
|