UNPKG

@screeps/engine

Version:

This is a module for Screeps standalone server. See [main repository](https://github.com/screeps/screeps) for more info.

24 lines (18 loc) 618 B
'use strict'; var _ = require('lodash'), utils = require('../../../utils'), driver = utils.getDriver(), C = driver.constants; module.exports = function (userId, intent, { flags }) { var flagItem = _.find(flags, { user: userId }); if (!flagItem) { return; } var name = intent.name.replace(/\|/g, "$VLINE$").replace(/~/g, "$TILDE$"); if (!_.any(flagItem._parsed, i => i[0] == name)) { return; } flagItem._modified = true; _.remove(flagItem._parsed, i => i[0] == name); }; //# sourceMappingURL=../../../sourcemaps/processor/intents/room/remove-flag.js.map