diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 607db90635..a0a7da307b 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11511,11 +11511,8 @@ var process=require("__browserify_process");(function() { } }); } - _.each(gear.owned, function(v, k) { - if (gear.owned[k]) { - gear.owned[k] = false; - return true; - } + gear.owned = _.mapValues(gear.owned, function() { + return false; }); gear.owned.weapon_warrior_0 = true; if (typeof user.markModified === "function") { diff --git a/script/index.coffee b/script/index.coffee index 6c315a942f..7165845007 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -442,7 +442,7 @@ api.wrap = (user, main=true) -> if user.items.currentPet then user.ops.equip({params:{type: 'pet', key: user.items.currentPet}}) if user.items.currentMount then user.ops.equip({params:{type: 'mount', key: user.items.currentMount}}) # Strip owned gear down to the training sword, but preserve purchase history so user can re-purchase limited edition equipment - _.each gear.owned, (v, k) -> if gear.owned[k] then gear.owned[k] = false; true + gear.owned = _.mapValues gear.owned, ->false gear.owned.weapon_warrior_0 = true user.markModified? 'items.gear.owned' user.preferences.costume = false