diff --git a/game/static/game/js/model.js b/game/static/game/js/model.js index 94cfb1b99..a4e206dfe 100644 --- a/game/static/game/js/model.js +++ b/game/static/game/js/model.js @@ -395,6 +395,22 @@ ocargo.Model.prototype.deliver = function() { popupHint: ocargo.game.registerFailure(), description: 'tried to deliver at non-destination' }); + + ocargo.animation.appendAnimation({ + type: 'callable', + functionType: 'playSound', + functionCall: ocargo.sound.failure, + description: 'failure sound' + }); + + ocargo.event.sendEvent("DeliverNonDestination", { levelName: LEVEL_NAME, + defaultLevel: DEFAULT_LEVEL, + workspace: ocargo.blocklyControl.serialize(), + failures: this.failures, + pythonWorkspace: ocargo.pythonControl.getCode() + }); + this.reasonForTermination = 'DELIVER_AT_NON_DESTINATION'; + return false; } return destination; };