HM-CODE / Haunted-Memories

A repository for Haunted Memories code.
http://www.haunted-memories.net/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

+packs case sensitivity #98

Open Bradamante opened 13 years ago

Bradamante commented 13 years ago

+packs currently has a strange case-sensitivity glitch: when a PC was added to the Soldaten des Randes as Soldaten Des Randes, the pack showed up twice in the +packs list, but all players with both versions showed up in both pack listings.

This may also be the case with +cabals, +coteries, and/or +motleys.

hmmorpheus commented 13 years ago

Altering the following attributes:

3245/c.+packs

17748/c.+packs

To:

&c.+packs =$^(?i)+packs(/all|):think setq( P, setdiff( iter( filter( %!/FIL.ISINPACK, setr( S, setunion( xget( #1762, LIST-WEREWOLF ), xget( #1762, LIST-WOLFBLOOD ) ) ) ), [caplist(caplist(lcstr(getstat( itext( 0 ), PACK ))),-)], , | ),, | ) ); @pemit %# = header( Packs ); @pemit %# = ansi( hw, [ljust( Name, 20 )] [ljust( Auspice, 10 )] [ljust( Tribe, 20 )] Last On ); @pemit %# = separator( , c, = ); @dolist/delim | %qP[ifelse(strmatch(%1,/all),|Packless)]|#-1 = { @break match( ##, #-1 ) = { @pemit %# = tail(); }; think setq( 1, switch( ##, Packless, , ## ) ); @assert gte( words( setr( M, filter( #1759/FIL.PACK, %qS ) ) ), ifelse(strmatch(%1,/all),0,switch( ##, Packless, 1, 3 )) ); @pemit %# = separator( ansi( y, ## ), c ); @pemit %# = iter( %qM, [ljust( name( itext( 0 ) )[ifelse( hassphere( itext( 0 ), ALPHA ), (%ch%cr*%cn), )], 20 )] [ifelse( hassphere( itext( 0 ), WOLFBLOOD ), ljust( Wolfblood, 31 ), [ljust( getstat( itext( 0 ), AUSPICE ), 10 )] [ljust( getstat( itext( 0 ), TRIBE ), 20 )] )] [ifelse( gt( conn( itext( 0 ) ), -1 ), Connected, ifelse( lt( convtime( setr( L, xget( itext( 0 ), LAST ) ) ), sub( secs(), mul( 30, 60, 60, 24 ) ) ), ansi( hr, %qL ), %qL ) )], , %r ); };

Will resolve the case sensitivity issue without causing the doubling on entries.