diff --git a/lootalot_db/db.sqlite3 b/lootalot_db/db.sqlite3 index d0944f8..9ac5afe 100644 Binary files a/lootalot_db/db.sqlite3 and b/lootalot_db/db.sqlite3 differ diff --git a/lootalot_front/src/App.vue b/lootalot_front/src/App.vue index 229ce0d..eaf8d58 100644 --- a/lootalot_front/src/App.vue +++ b/lootalot_front/src/App.vue @@ -1,7 +1,7 @@ @@ -71,7 +69,7 @@ components: { Chest, Wealth }, data () { return { - state: AppStorage.state, + app_state: AppStorage.state, show_dropdown: false, edit_wealth: false, handleOutsideClick: null, @@ -79,19 +77,24 @@ }, computed: { player () { - const idx = this.state.player_id; - return this.state.player_list[idx]; + if (!this.app_state.initiated) return {} + const idx = this.app_state.player_id; + return this.app_state.player_list[idx]; }, wealth () { - const cp = this.player.cp - const sp = this.player.sp - const gp = this.player.gp - const pp = this.player.pp - return [cp, sp, gp, pp]; + if (!this.app_state.initiated) { + return ["-", "-", "-", "-"]; + } else { + const cp = this.player.cp + const sp = this.player.sp + const gp = this.player.gp + const pp = this.player.pp + return [cp, sp, gp, pp]; + } }, // Check if the active player is the special 'Group' player playerIsGroup () { - return this.state.player_id == 0; + return this.app_state.player_id == 0; } }, methods: { @@ -99,7 +102,7 @@ AppStorage.switchPlayerChestVisibility(); }, hidePlayerChest () { - if (this.state.show_player_chest) { + if (this.app_state.show_player_chest) { this.switchPlayerChestVisibility(); } }, @@ -153,4 +156,5 @@ diff --git a/lootalot_front/src/components/Request.vue b/lootalot_front/src/components/Request.vue index 1ef0991..8f35886 100644 --- a/lootalot_front/src/components/Request.vue +++ b/lootalot_front/src/components/Request.vue @@ -40,12 +40,12 @@ computed: { // Check if item is requested by active player isRequested () { - const reqs = this.state.requests[this.state.player_id]; + const reqs = this.state.player_claims[this.state.player_id]; return reqs.includes(this.item); }, // Check if item is requested by multiple players including active one isInConflict () { - const reqs = this.state.requests; + const reqs = this.state.player_claims; const playerId = this.state.player_id; var reqByPlayer = false; var reqByOther = false; diff --git a/lootalot_front/src/components/Wealth.vue b/lootalot_front/src/components/Wealth.vue index a7798a2..63f9dcf 100644 --- a/lootalot_front/src/components/Wealth.vue +++ b/lootalot_front/src/components/Wealth.vue @@ -12,8 +12,8 @@

{{ wealth[3] }}

-

PG

-

{{ wealth[2] }}

+

PO

+

{{ wealth[2] }}

PA