// onMoveThatFromThis.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Entity.prototype;
/**
* Called when another asset is removed from this.
* Provides opportunities to override default behavior
* through the use of
* <a href="/doc/Verbs_ReactionHooks.html">verb reactions</a>
* doMoveThisFromThat and doMoveThatFromThis.
* @memberOf AdventureJS.Assets.Entity
* @method AdventureJS.Assets.Entity#onMoveThatFromThis
* @param {Object} asset
* @returns {Boolean}
*/
p.onMoveThatFromThis = function Entity_onMoveThatFromThis(
asset,
quantity = 1
) {
if ("string" === typeof asset) asset = this.game.getAsset(asset);
if (!asset) return;
this.game.log(
"L1485",
"log",
"high",
`[onMoveThatFromThis.js] remove ${asset.id} from ${this.id}`,
"Entity"
);
var results;
// this may have an override when asset is removed
results = this.doVerbAction({
action: "doMoveThatFromThis",
target: asset,
type: "VerbReaction",
});
if ("undefined" !== typeof results) return results;
return; // results;
};
})(); // onMoveThatFromThis.js