File tree Expand file tree Collapse file tree
src/parseEconItem/ParsedEcon/getPropertyAttributes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { EconItem , TagAttributes } from '../../../types' ;
22
33export default function ( item : EconItem , tags : TagAttributes ) : boolean {
4- return isStrangeType ( item ) && ! isStrangeQuality ( tags ) ;
4+ return isStrange ( item ) && ! isStrangeQuality ( tags ) ;
5+ }
6+
7+ function isStrange ( item : EconItem ) {
8+ if ( item . type === '' ) { // Weird case for strange weapons
9+ return item . market_hash_name . includes ( "Strange " ) ;
10+ }
11+
12+ return isStrangeType ( item ) ;
513}
614
715function isStrangeType ( { type } : EconItem ) : boolean {
8- return / ( - K i l l s : | - P o i n t s S c o r e d : | - C a r n i v a l K i l l s : ) \d + / . test ( type ) ;
16+ return / ( - K i l l s : | - P o i n t s S c o r e d : | - C a r n i v a l K i l l s : | - T i m e s P e r f o r m e d : ) \d + / . test ( type ) ;
917}
1018
1119function isStrangeQuality ( { quality } : TagAttributes ) : boolean {
You can’t perform that action at this time.
0 commit comments