diff --git a/lib/fi.js b/lib/fi.js index ef21cca..77fad3e 100644 --- a/lib/fi.js +++ b/lib/fi.js @@ -1656,8 +1656,8 @@ const ctrl = ( function() { */ function decideLinkClass(cmd) { - const pnjRefPrefix = " 0 ) { let firstWord = words[ 0 ]; - const objs = [ - "ex", "examina", "examinar", "examino", - "m", "mirar", "mira", "miro", - "look", "x", "take", "get", "pick", - "coger", "coge", "cojo", "tomar", "toma", "tomo" ]; + const OBJS_VERBS = + actions.getAction( "examine" ).verbs + .concat( actions.getAction( "look" ).verbs ) + .concat( actions.getAction( "take" ).verbs ); - const pnjs = [ "habla", "hablar", "hablo", "talk" ]; + const PRS_VERBS = actions.getAction( "talk" ).verbs; - if ( objs.indexOf( firstWord ) > -1 ) { - toret = objRefPrefix; + if ( OBJS_VERBS.indexOf( firstWord ) > -1 ) { + toret = OBJ_REF_PREFIX; } else - if ( pnjs.indexOf( firstWord ) > -1 ) { - toret = pnjRefPrefix; + if ( PRS_VERBS.indexOf( firstWord ) > -1 ) { + toret = PRS_REF_PREFIX; } } } @@ -2524,7 +2523,7 @@ const ctrl = ( function() { // Action if ( loc == player ) { if ( obj.isWorn() ) { - toret += obj.id + " ("; + toret += buildTextLink( obj.id, EX_ACT ) + " ("; toret += buildTextLink( obj.id, DISROBE_ACT, "puesto" ); toret += ")"; } else {