mirror of
https://github.com/bartvdbraak/SlayerWeightCalculator.git
synced 2025-04-26 17:21:21 +00:00
Ignore combat level, remove unused elements (edit columns)
This commit is contained in:
parent
78b2cb442e
commit
69fef0bcee
3 changed files with 18 additions and 15 deletions
|
@ -39,9 +39,19 @@
|
|||
v-model="statUnlock.value.current"
|
||||
debounce="500"
|
||||
type="number"
|
||||
:disabled="statUnlock.ignore === 'true'"
|
||||
:min="statUnlock.value.min"
|
||||
:max="statUnlock.value.max">
|
||||
</b-form-input>
|
||||
<div class="input-group-append" v-if="statUnlock.hasOwnProperty('ignore')">
|
||||
<span class="input-group-text">
|
||||
<b-form-checkbox
|
||||
@change="ignoreStat(statUnlock, $event)"
|
||||
:checked="statUnlock.ignore === 'true'"
|
||||
v-b-tooltip.hover.right
|
||||
:title="'Ignore '+statUnlock.name"></b-form-checkbox>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
@ -187,10 +197,13 @@ export default {
|
|||
data.questUnlocks.forEach(quest=>{
|
||||
quest.unlock = value;
|
||||
});
|
||||
},
|
||||
ignoreStat(obj, value) {
|
||||
this.configData.statUnlocks.filter(stat => stat.id === obj.id)[0].ignore = value.toString()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setRemember()
|
||||
this.setRemember();
|
||||
},
|
||||
watch: {
|
||||
configFile() {
|
||||
|
|
|
@ -11,9 +11,9 @@ export default {
|
|||
return {
|
||||
mainConfig: {
|
||||
statUnlocks: [
|
||||
{id: 0, name: 'Slayer level', filter: 'slayer_req', value: {min: 1, current: 99, max: 99}, image: 'slayer_icon.png', unlock: 'false'},
|
||||
{id: 1, name: 'Combat level', filter: 'combat_req', value: {min: 3, current: 126, max: 126}, image: 'combat_icon.png', unlock: 'false'},
|
||||
{id: 2, name: 'Defence level', filter: 'defence_req', value: {min: 1, current: 99, max: 99}, image: 'defence_icon.png', unlock: 'false'},
|
||||
{id: 0, name: 'Slayer level', filter: 'slayer_req', value: {min: 1, current: 99, max: 99}, image: 'slayer_icon.png'},
|
||||
{id: 1, name: 'Combat level', filter: 'combat_req', value: {min: 3, current: 126, max: 126}, image: 'combat_icon.png', ignore: 'false'},
|
||||
{id: 2, name: 'Defence level', filter: 'defence_req', value: {min: 1, current: 99, max: 99}, image: 'defence_icon.png'},
|
||||
],
|
||||
pointUnlocks: [
|
||||
{id: 0, name: 'Seeing red', monster_ids: [83, 3], unlock: 'false', masters: [5,6,7]},
|
||||
|
|
|
@ -2,15 +2,6 @@
|
|||
<section>
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 my-2">
|
||||
<h1 class="h3 text-uppercase font-weight-bolder"><span v-if="currentMaster">{{currentMaster.name}}</span></h1>
|
||||
<div class="btn-toolbar mb-2 mb-md-0">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
|
||||
<svg height="20" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m184.296875 512c-4.199219 0-8.277344-1.644531-11.304687-4.691406-3.925782-3.925782-5.527344-9.582032-4.265626-14.976563l23.253907-98.667969c.679687-2.902343 2.152343-5.546874 4.265625-7.636718l203.648437-203.648438c18.109375-18.132812 49.75-18.15625 67.882813 0l30.164062 30.164063c9.066406 9.046875 14.058594 21.121093 14.058594 33.921875 0 12.820312-4.992188 24.894531-14.058594 33.941406l-203.648437 203.625c-2.113281 2.113281-4.757813 3.585938-7.636719 4.265625l-98.667969 23.253906c-1.234375.320313-2.472656.449219-3.691406.449219zm37.78125-106.582031-16.277344 69.078125 69.078125-16.277344 200.429688-200.425781c3.027344-3.03125 4.691406-7.039063 4.691406-11.308594 0-4.265625-1.664062-8.296875-4.691406-11.304687l-30.167969-30.167969c-6.25-6.226563-16.382813-6.25-22.632813 0zm60.910156 67.328125h.210938zm0 0"/><path d="m433.835938 337.898438c-4.097657 0-8.191407-1.558594-11.308594-4.691407l-75.433594-75.4375c-6.25-6.25-6.25-16.382812 0-22.632812s16.382812-6.25 22.632812 0l75.4375 75.433593c6.25 6.25 6.25 16.382813 0 22.636719-3.136718 3.132813-7.234374 4.691407-11.328124 4.691407zm0 0"/><path d="m145.921875 448h-97.921875c-26.476562 0-48-21.523438-48-48v-352c0-26.476562 21.523438-48 48-48h309.332031c26.476563 0 48 21.523438 48 48v98.773438c0 8.832031-7.167969 16-16 16s-16-7.167969-16-16v-98.773438c0-8.832031-7.167969-16-16-16h-309.332031c-8.832031 0-16 7.167969-16 16v352c0 8.832031 7.167969 16 16 16h97.921875c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m389.332031 138.667969h-373.332031c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h373.332031c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m310.828125 245.332031h-294.828125c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h294.828125c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m202.667969 352h-186.667969c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h186.667969c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m202.667969 352c-8.832031 0-16-7.167969-16-16v-213.332031c0-8.832031 7.167969-16 16-16s16 7.167969 16 16v213.332031c0 8.832031-7.167969 16-16 16zm0 0"/></svg> Edit columns
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<b-table striped hover
|
||||
|
@ -44,7 +35,6 @@ export default {
|
|||
sortDirection: 'desc',
|
||||
sortDesc: true,
|
||||
sortBy: 'task_percentage',
|
||||
|
||||
fields: [
|
||||
{
|
||||
key: 'id',
|
||||
|
@ -107,7 +97,7 @@ export default {
|
|||
//filter based on Stats
|
||||
this.configData.statUnlocks.forEach(stat=>{
|
||||
//for each stat requirement, remove those from list where the current stat value is greater or equal to the monsters requirement value.
|
||||
this.filtered_items = _.filter(this.filtered_items, function(monster){ return parseInt(stat.value.current) >= parseInt(monster[stat.filter]) } );
|
||||
this.filtered_items = _.filter(this.filtered_items, function(monster){ return (parseInt(stat.value.current) >= parseInt(monster[stat.filter])) || stat.ignore === 'true' } );
|
||||
});
|
||||
|
||||
//filter based on Point Unlocks
|
||||
|
|
Loading…
Reference in a new issue