diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index fc0e610802..9877a51f8d 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11148,7 +11148,10 @@ var process=require("__browserify_process");(function() { if (typeof user.markModified === "function") { user.markModified('items.gear'); } - return typeof cb === "function" ? cb(null, req) : void 0; + return typeof cb === "function" ? cb((item ? { + code: 200, + message: "Your " + item.text + " broke." + } : null), req) : void 0; }, hatch: function(req, cb) { var egg, hatchingPotion, pet, _ref; diff --git a/script/index.coffee b/script/index.coffee index cb2530074b..416718f7a1 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -438,7 +438,7 @@ api.wrap = (user) -> user.items.gear.costume[item.type] = "#{item.type}_base_0" if user.items.gear.costume[item.type] is lostItem user.markModified? 'items.gear' - cb? null, req + cb? (if item then {code:200,message:"Your #{item.text} broke."} else null), req hatch: (req, cb) -> {egg, hatchingPotion} = req.query