mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Adjust newUser spec helper
This commit is contained in:
@@ -13,20 +13,24 @@ var specHelper = {};
|
|||||||
specHelper.newReward = newReward;
|
specHelper.newReward = newReward;
|
||||||
specHelper.newChallenge = newChallenge;
|
specHelper.newChallenge = newChallenge;
|
||||||
|
|
||||||
function newUser() {
|
function newUser(overrides) {
|
||||||
var buffs = {per:0, int:0, con:0, str:0, stealth: 0, streaks: false};
|
var buffs = { per:0, int:0, con:0, str:0, stealth: 0, streaks: false };
|
||||||
|
var stats = { str:1, con:1, per:1, int:1, mp: 32, class: 'warrior', buffs: buffs, gp: 0 };
|
||||||
|
var items = {
|
||||||
|
lastDrop: { count: 0 },
|
||||||
|
hatchingPotions: {},
|
||||||
|
eggs: {},
|
||||||
|
food: {},
|
||||||
|
pets: {},
|
||||||
|
mounts: {},
|
||||||
|
gear: { equipped: {}, costume: {}, owned: {} }
|
||||||
|
};
|
||||||
|
|
||||||
user = {
|
user = {
|
||||||
auth:{timestamps: {}},
|
_id: 'unique-user-id',
|
||||||
stats: {str:1, con:1, per:1, int:1, mp: 32, class: 'warrior', buffs: buffs, gp: 0},
|
auth: { timestamps: {} },
|
||||||
items:{
|
stats: stats,
|
||||||
lastDrop:{count: 0},
|
items: items,
|
||||||
hatchingPotions: {},
|
|
||||||
eggs: {},
|
|
||||||
food: {},
|
|
||||||
pets: {},
|
|
||||||
mounts: {},
|
|
||||||
gear: {equipped: {}, costume: {}, owned: {}}
|
|
||||||
},
|
|
||||||
party: {
|
party: {
|
||||||
quest: {
|
quest: {
|
||||||
progress: {down: 0}
|
progress: {down: 0}
|
||||||
@@ -41,6 +45,9 @@ var specHelper = {};
|
|||||||
filters: {},
|
filters: {},
|
||||||
achievements: {}
|
achievements: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_setOverrides(user, overrides);
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user