death: notify users of broken item

This commit is contained in:
Tyler Renelle
2013-12-14 13:01:13 -07:00
parent 2d23803207
commit 6a107db7a3
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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;
+1 -1
View File
@@ -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