Skip to content

Commit

Permalink
Add Reward data for Addison
Browse files Browse the repository at this point in the history
  • Loading branch information
savage13 committed Dec 20, 2024
1 parent 6fefac3 commit 53fbbf5
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
26 changes: 26 additions & 0 deletions public/game_files/names.json
Original file line number Diff line number Diff line change
Expand Up @@ -1689,6 +1689,32 @@
"Item_Cook_F_04": "Creamy Heart Soup",
"Item_Cook_G_02": "Seafood Rice Balls",
"Item_Cook_G_03": "Veggie Rice Balls",
"Item_Cook_G_02_ReadyMade_01": "Seafood Rice Balls",
"Item_Cook_G_02_ReadyMade_02": "Energizing Seafood Rice Balls",
"Item_Cook_G_02_ReadyMade_03": "Spicy Seafood Rice Balls",
"Item_Cook_G_02_ReadyMade_04": "Chilly Seafood Rice Balls",
"Item_Cook_G_02_ReadyMade_05": "Bright Seafood Rice Balls",
"Item_Cook_G_03_ReadyMade_01": "Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_02": "Energizing Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_03": "Spicy Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_04": "Chilly Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_05": "Electro Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_06": "Hasty Veggie Rice Balls",
"Item_Cook_G_03_ReadyMade_08": "Sunny Veggie Rice Balls",
"Item_Cook_G_04_ReadyMade_01": "Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_02": "Energizing Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_03": "Spicy Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_04": "Chilly Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_05": "Electro Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_06": "Hasty Mushroom Rice Balls",
"Item_Cook_G_04_ReadyMade_07": "Sneaky Mushroom Rice Balls",
"Item_Cook_G_15_ReadyMade_01": "Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_02": "Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_03": "Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_04": "Biting Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_05": "Scorching Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_06": "Rapid Meaty Rice Balls",
"Item_Cook_G_15_ReadyMade_07": "Stormy Meaty Rice Balls",
"Item_Cook_G_04": "Mushroom Rice Balls",
"Item_Cook_G_05": "Meat and Rice Bowl",
"Item_Cook_G_06": "Prime Meat and Rice Bowl",
Expand Down
3 changes: 3 additions & 0 deletions src/components/AppMapDetailsObj.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Prop } from 'vue-property-decorator';
import AppMapDetailsBase from '@/components/AppMapDetailsBase';
import ObjectInfo from '@/components/ObjectInfo';
import ShopData from '@/components/ShopData';
import RewardData from '@/components/RewardData';

import {
MapMarkerObj,
MapMarkerSearchResult,
Expand Down Expand Up @@ -66,6 +68,7 @@ const staticData = new StaticData();
components: {
ObjectInfo,
ShopData,
RewardData,
},
})
export default class AppMapDetailsObj extends AppMapDetailsBase<MapMarkerObj | MapMarkerSearchResult> {
Expand Down
4 changes: 4 additions & 0 deletions src/components/AppMapDetailsObj.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<ShopData :data="obj.data.ShopData" />
</section>

<section v-if="obj.name == 'Npc_CraftSignboard001'">
<RewardData :data="obj.data.Dynamic" />
</section>

<section v-if="obj.data.Presence">
<hr>
<h4 class="subsection-heading">Presence params</h4>
Expand Down
22 changes: 22 additions & 0 deletions src/components/RewardData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Vue from 'vue'
import Component, { mixins } from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import MixinUtil from '@/components/MixinUtil';
import * as ui from '@/util/ui';

@Component
export default class RewardData extends mixins(MixinUtil) {
@Prop()
private data!: any;

length() {
return Object.keys(this.data).filter(key => key.startsWith("CraftSignboardR")).length
}
item(i: number) {
const n = (i > 1) ? i.toString() : ""
return this.data[`CraftSignboardReward${n}`]
}
name(i: number) {
return ui.getName(this.item(i))
}
}
32 changes: 32 additions & 0 deletions src/components/RewardData.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<section>
<hr>
<h4 class="subsection-heading">Addison Rewards</h4>
<div class="beedle-shop-limit-size">
<div class="beedle-shop-table">
<div v-for="idx in length()" :key="idx" class="table-row">
<div class="cell">- {{name(idx)}}</div>
</div>
</div>
</div>
</section>
</template>
<style>
.beedle-shop-limit-size {
max-height: 15em;
overflow: scroll;
padding-right:1em;
}
.beedle-shop-table {
color: white;
display: table;
width: 100%;
}
.beedle-shop-table .table-row {
display: table-row;
}
.beedle-shop-table .cell {
display: table-cell;
}
</style>
<script src="./RewardData.ts"></script>

0 comments on commit 53fbbf5

Please sign in to comment.