public/js-roguelike-skeleton/src/mixins/action-interface.js
function(action, source, settings){
            if(!this.resolvableActions){
                return false;
            }
            var handler = this.resolvableActions[action];
            if(!handler){
                return false;
            }
            settings = settings || {};
            if(!settings.skipCanResolveAction && !this.canResolveAction(action, source, settings)){
                return false;
            }

            if(handler.resolveAction === false){
                return false;
            }
            if(handler.resolveAction === true){
                return true;
            }
            return handler.resolveAction.call(this, source, settings);
        }
function(action, source, settings){
            if(!this.resolvableActions){
                return false;
            }
            var handler = this.resolvableActions[action];
            if(!handler){
                return false;
            }
            settings = settings || {};
            if(!settings.skipCanResolveAction && !this.canResolveAction(action, source, settings)){
                return false;
            }

            if(handler.resolveAction === false){
                return false;
            }
            if(handler.resolveAction === true){
                return true;
            }
            return handler.resolveAction.call(this, source, settings);
        }
function ( action , source , settings ) { if ( ! this . resolvableActions ) { return false ; } var handler = this . resolvableActions [ action ] ; if ( ! handler ) { return false ; } settings = settings || { } ; if ( ! settings . skipCanResolveAction && ! this . canResolveAction ( action , source , settings ) ) { return false ; } if ( handler . resolveAction === false ) { return false ; } if ( handler . resolveAction === true ) { return true ; } return handler . resolveAction . call ( this , source , settings ) ; }
Resolves an action on target from source with given settings.
@method performAction
@param {String} action - The action being performed on this target to resolve.
@param {Object} source - The source object performing the action on this target.
@param {Object} [settings] - Settings for the action.
@param {Object} [settings.skipCanResolveAction] - If true skips checking that `this.skipCanResolveAction(action, source, settings) == true`
@return {Boolean} `true` if the action was successfully resolved.
Resolves an action on target from source with given settings .