echohyperlinks

I was just looking at how the metadata object works, and I saw this piece of code in HandleCommand:

        if (game.echocommand) {
          if (metadata <> null and game.enablehyperlinks and game.echohyperlinks) {
            foreach (key, metadata) {
              if (EndsWith(command, key)) {
                objectname = StringDictionaryItem(metadata, key)
                object = GetObject(objectname)
                if (object <> null) {
                  msg ("")
                  msg ("&gt; " + Left(command, LengthOf(command) - LengthOf(key)) + "{object:" + object.name + "}" )
                  shownlink = true
                }
              }
            }
          }

This looks a little ugly to me. It seems to imply that hyperlinks in echoed commands only appear at the end. This feels like it would seem a little odd from the player's POV at times. For example, if I try to use an object and it asks me what to use it on, I would expect to see both objects as hyperlinks in the echoed command.

This got my attention because I've got a system in mind for revamping the link/verb system, just overriding javascript. But as it's in a core function, I can't override this bit on the web version. Could always turn it off, of course, but then finding the echoed commands is still a little annoying.

I'm not going to suggest modifications to a core thing that would only work with the systems I'm planning on building. But… does anyone else think it would be a good idea to have a class for echoed commands? Would mean that it's easier for a user who wants echoed commands to be a different colour from other output text (just add a CSS rule), as well as adding a hook that's useful for anyone playing with the javascript.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums