Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions build/tradable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ const builtUntradable = [
'Launcher',
'Sniper',
];
/**
* Gate built Prime items (Warframes, weapons) from being marked tradable.
* Built Prime items are not directly tradable -- only their individual
* components/parts are (e.g. Loki Prime Blueprint). Components get their
* own tradable flag set independently during parsing.
*
* To determine if a Prime set is tradable, check item.components for
* parts with tradable: true.
*
* Item-specific tradability overrides live in config/overrides.json
* (keyed by uniqueName) and are applied by parser.mjs applyOverrides()
* after this check runs.
*
* @param {module:warframe-items.Item} item Item to check
* @returns {boolean}
*/
const tradableConditions = (item) => !(builtUntradable.includes(item.type) && item.name.match(/Prime/gi));

const tradableArcanes = [
Expand Down
Loading