Skip to content

Commit 87a982a

Browse files
author
Dale Kunce
authored
Merge pull request #38 from MissingMaps/revert-33-patch-1
Revert "added more badge levels"
2 parents ccd870e + d8dcdec commit 87a982a

1 file changed

Lines changed: 14 additions & 28 deletions

File tree

src/badge_logic/sum_check.js

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,64 +5,64 @@ module.exports = function (data) {
55
pois: {
66
name: 'On Point',
77
id: 3,
8-
tiers: {1: 10, 2: 50, 3: 100, 4: 250, 5: 500, 6: 1000, 7: 1500, 8: 2000, 9: 2500, 10: 4000}
8+
tiers: {1: 500, 2: 2500, 3: 5000}
99
},
1010
buildings: {
1111
name: 'The Wright Stuff',
1212
id: 4,
13-
tiers: {1: 100, 2: 500, 3: 1000, 4: 2500, 5: 5000, 6: 10000, 7: 25000, 8: 50000, 9: 75000, 10: 100000}
13+
tiers: {1: 100, 2: 500, 3: 1000}
1414
},
1515
gpsTraces: {
1616
name: 'Field Mapper',
1717
id: 5,
18-
tiers: {1: 10, 2: 50, 3: 100, 4: 250, 5: 500, 6: 750, 7: 1000, 8: 1500, 9: 2000, 10: 5000}
18+
tiers: {1: 10, 2: 50, 3: 100}
1919
},
2020
roadKms: {
2121
name: 'On The Road Again',
2222
id: 6,
23-
tiers: {1: 50, 2: 100, 3: 500, 4: 1000, 5: 1500, 6: 2000, 7: 2500, 8: 5000, 9: 7500, 10: 10000}
23+
tiers: {1: 50, 2: 100, 3: 500}
2424
},
2525
roadKmMods: {
2626
name: 'Long and Winding Road',
2727
id: 7,
28-
tiers: {1: 50, 2: 100, 3: 500, 4: 1000, 5: 1500, 6: 2000, 7: 2500, 8: 5000, 9: 7500, 10: 10000}
28+
tiers: {1: 50, 2: 100, 3: 500}
2929
},
3030
waterways: {
3131
name: 'White Water Rafting',
3232
id: 8,
33-
tiers: {1: 50, 2: 100, 3: 500, 4: 1000, 5: 1500, 6: 2000, 7: 2500, 8: 5000, 9: 7500, 10: 10000}
33+
tiers: {1: 50, 2: 100, 3: 500}
3434
},
3535
countries: {
3636
name: 'World Renown',
3737
id: 9,
38-
tiers: {1: 5, 2: 10, 3: 20, 4: 25, 5: 30, 6: 35, 7: 40, 8: 50, 9: 75, 10: 100}
38+
tiers: {1: 5, 2: 10, 3: 25}
3939
},
4040
tasks: {
4141
name: 'Task Champion',
4242
id: 10,
43-
tiers: {1: 10, 2: 25, 3: 100, 4: 200, 5: 400, 6: 800, 7: 1250, 8: 2500, 9: 5000, 10: 10000}
43+
tiers: {1: 10, 2: 25, 3: 100}
4444
},
4545
taskValidations: {
4646
name: 'Scrutinizer',
4747
id: 11,
48-
tiers: {1: 10, 2: 25, 3: 50, 4: 100, 5: 250, 6: 500, 7: 750, 8: 1000, 9: 2000, 10: 5000}
48+
tiers: {1: 25, 2: 100, 3: 250}
4949
},
5050
josm: {
5151
name: 'Awesome JOSM',
5252
id: 12,
53-
tiers: {1: 1, 2: 10, 3: 100, 4: 250, 5: 500, 6: 750, 7: 1000, 8: 1500, 9: 2500, 10: 5000}
53+
tiers: {1: 1, 2: 10, 3: 100}
5454
},
5555
hashtags: {
5656
name: 'Mapathoner',
5757
id: 13,
58-
tiers: {1: 1, 2: 10, 3: 25, 4: 25, 5: 50, 6: 75, 7: 100, 8: 150, 9: 250, 10: 500}
58+
tiers: {1: 5, 2: 20, 3: 50}
5959
},
6060

6161
// ID #14 and 16 used by date check logic
6262
taskInvalidations: {
6363
name: 'High Standards',
6464
id: 16,
65-
tiers: {1: 5, 2: 15, 3: 25, 4: 50, 5: 100, 6: 200, 7: 300, 8: 500, 9: 750, 10: 1000}
65+
tiers: {1: 25, 2: 100, 3: 250}
6666
}
6767
};
6868

@@ -71,22 +71,8 @@ module.exports = function (data) {
7171
return 1;
7272
} else if (userTotal >= badge.tiers[2] && userTotal < badge.tiers[3]) {
7373
return 2;
74-
} else if (userTotal >= badge.tiers[3] && userTotal < badge.tiers[4]) {
74+
} else if (userTotal >= badge.tiers[3]) {
7575
return 3;
76-
} else if (userTotal >= badge.tiers[4] && userTotal < badge.tiers[5]) {
77-
return 4;
78-
} else if (userTotal >= badge.tiers[5] && userTotal < badge.tiers[6]) {
79-
return 5;
80-
} else if (userTotal >= badge.tiers[6] && userTotal < badge.tiers[7]) {
81-
return 6;
82-
} else if (userTotal >= badge.tiers[7] && userTotal < badge.tiers[8]) {
83-
return 7;
84-
} else if (userTotal >= badge.tiers[8] && userTotal < badge.tiers[9]) {
85-
return 8;
86-
} else if (userTotal >= badge.tiers[9] && userTotal < badge.tiers[10]) {
87-
return 9;
88-
} else if (userTotal >= badge.tiers[10]) {
89-
return 10;
9076
} else {
9177
return 0;
9278
}
@@ -99,7 +85,7 @@ module.exports = function (data) {
9985

10086
var badgeLevel = checkBadgeLevel(userTotal, badge);
10187

102-
if (badgeLevel < 10) {
88+
if (badgeLevel < 3) {
10389
var nextBadgeLevel = badgeLevel + 1;
10490
var currentPoints = Number(userTotal);
10591
var lastPoints = 0;

0 commit comments

Comments
 (0)