moves all api logic inside PlayerView, found weird bug in unpack_gold_value (floating error)

This commit is contained in:
2019-10-18 16:21:00 +02:00
parent 3fce1dc7d0
commit 61c9a4e6d4
7 changed files with 78 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
<template>
<PlayerView
:id="state.player_id"
v-slot="{ player, loot, notifications, actions }"
v-slot="{ player, loot, notifications, actions, claims }"
>
<main id="app" class="container">
<header>
@@ -62,12 +62,16 @@
@confirmAction="addNewLoot"
></Loot>
<AddingChest
:player="player.id"
:claims="claims"
:items="playerIsGroup ? pending_loot : state.inventory"
:perms="playerIsGroup ? {} : { canBuy: true }"
@buy="(data) => { switchView('player'); actions.buyItems(data); }">
</AddingChest>
</template>
<Chest v-else
<Chest v-else
:player="player.id"
:claims="claims"
:items="showPlayerChest ? loot : state.group_loot"
:perms="{
canGrab: !(showPlayerChest || playerIsGroup),