<NME> CoreDescriptions.aslx
<BEF> ﻿<library>
  <function name="ShowRoomDescription">
    <![CDATA[
      isDark = CheckDarkness()
      if (isDark) {
        descriptionfield = "darkroomdescription"
      }
      else {
        descriptionfield = "description"
      }

      if (game.autodescription) {
        desc = ""
        
        for (i, 1, 4) {
          if (i = game.autodescription_youarein) {
            if (game.autodescription_youarein_useprefix) {
              youarein = game.pov.parent.descprefix
              desc = AddDescriptionLine (desc, youarein + " " + GetDisplayName(game.pov.parent) + ".")
            }
            else {
              desc = AddDescriptionLine (desc, "<b>" + CapFirst(GetDisplayName(game.pov.parent)) + "</b>")
            }
            if (game.autodescription_youarein_newline) {
              msg (desc + "<br/>")
              desc = ""
            }
          }
          if (i = game.autodescription_youcansee) {
            objects = FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
            desc = AddDescriptionLine(desc, objects)
            
            if (game.autodescription_youcansee_newline) {
              msg (desc + "<br/>")
              desc = ""
            }
          }
          if (i = game.autodescription_youcango) {
            exits = FormatExitList(game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".")
            desc = AddDescriptionLine(desc, exits)
            
            if (game.autodescription_youcango_newline) {
              msg (desc + "<br/>")
              desc = ""
            }
          }
          if (i = game.autodescription_description) {
            if (HasScript(game.pov.parent, descriptionfield)) {
              if (LengthOf(desc) > 0) {
                    msg (desc)
                    desc = ""
                }
              do (game.pov.parent, descriptionfield)
              if (game.autodescription_description_newline) {
                msg ("")
              }
            }
            else  {
              desc = AddDescriptionLine(desc, GetRoomDescription())
              if (game.autodescription_description_newline) {
                msg (desc + "<br/>")
                desc = ""
              }
            }
          }
        }
        
        if (LengthOf(desc) > 0) {
          msg (desc)
        }
      }
      else {
        if (HasScript(game.pov.parent, descriptionfield)) {
          do (game.pov.parent, descriptionfield)
        }
        else {
          fulldesc = GetRoomDescription()
     
          if (LengthOf(fulldesc) > 0) {
            msg (fulldesc)
          }
        }
      }
    ]]>
  </function>

  <function name="AddDescriptionLine" parameters="desc, line" type="string">
    <![CDATA[
    if (LengthOf(line) > 0) {
      if (LengthOf(desc) > 0) {
        msg (desc)
        desc = ""
      }
      desc = desc + line
    }
    return (desc)
    ]]>
  </function>

  <function name="GetRoomDescription" type="string">
    <![CDATA[
    fulldesc = ""
    
    if (CheckDarkness()) {
      if (HasString(game.pov.parent, "darkroomdescription")) {
        if (LengthOf(game.pov.parent.darkroomdescription) > 0) {
          fulldesc = game.pov.parent.darkroomdescription
        }
      }
      // Added by The Pixie to correct what appears to be a bug
      if (fulldesc = "") fulldesc = DynamicTemplate("LookAtDarkness", game.pov.parent)
    }
    else {
       if (HasString(game.pov.parent, "description")) {
         if (LengthOf(game.pov.parent.description) > 0) {
             fulldesc = game.pov.parent.description
         }
       }
    }
    
    if (game.appendobjectdescription) {
      foreach (val, ScopeVisibleNotHeld()) {
        if (HasString(val, "inroomdescription")) {
          if (LengthOf(val.inroomdescription) > 0 and val <> game.pov) {
            fulldesc = fulldesc + " " + val.inroomdescription
          }
        }
      }
    }
    
    return (Trim(fulldesc))
    ]]>
  </function>

  <function name="OnEnterRoom" parameters="oldRoom">
    <![CDATA[
    game.displayroomdescriptiononstart = false
    if (IsDefined("oldRoom")) {
      if (oldRoom <> null) {
        if (game.clearscreenonroomenter) {
          ClearScreen
          if (not game.currentexitmessage = null) {
            msg(game.currentexitmessage)
            game.currentexitmessage = null
          }
        }
        if (HasScript(oldRoom, "onexit")) {
          do (oldRoom, "onexit")
        }
      }
    }
    
    on ready {
      if ((not GetBoolean(game.pov.parent, "visited")) and HasScript(game.pov.parent, "beforefirstenter")) {
        do (game.pov.parent, "beforefirstenter")
      }
  
      on ready {
        if (HasScript(game.pov.parent, "beforeenter")) {
          do (game.pov.parent, "beforeenter")
        }
    
        on ready {
          if (game.gridmap) {
            Grid_CalculateMapCoordinates (game.pov.parent, game.pov)
            Grid_DrawPlayerInRoom (game.pov.parent)
          }
          
          if (IsDefined("oldRoom")) {
            if (oldRoom <> null and game.changeroom_newline and not game.command_newline) {
              msg ("")
            }            
          }
          
          JS.updateLocation(CapFirst(GetDisplayName(game.pov.parent)))
          roomFrameExists = false
          if (HasString(game.pov.parent, "picture")) {
            if (LengthOf(game.pov.parent.picture) > 0) {
              roomFrameExists = true
              SetFramePicture(game.pov.parent.picture)
            }
          }
          if (game.clearframe and not roomFrameExists) {
            ClearFramePicture
          }
          if (game.showdescriptiononenter) {
            ShowRoomDescription
          }
          
          if (HasScript( game, "roomenter")) {
            do (game, "roomenter")
          }
          on ready {     
            if ((not GetBoolean(game.pov.parent, "visited")) and HasScript(game.pov.parent, "firstenter")) {
              do (game.pov.parent, "firstenter")
            }
            on ready {
              if (HasScript(game.pov.parent, "enter")) {
    foreach (item, list) {
      if (LengthOf(result) = 0) result = preList + " "
      verbs = GetDisplayVerbs(item)
      result = result + GetDisplayNameLink(item, "object", verbs)
      if (CanSeeThrough(item)) {
        result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")", useinventoryverbs)
      }
    }
    ]]>
  </function>

  <function name="FormatObjectList" type="string" parameters="preList, parent, preFinal, postList">
    <![CDATA[
    result = ""
    count = 0
    list = RemoveSceneryObjects(GetDirectChildren(parent))
    if (CheckDarkness()) {
      list = RemoveDarkObjects(list)
    }
    listLength = ListCount(list)
    foreach (item, list) {
      if (LengthOf(result) = 0) result = preList + " "
      result = result + GetDisplayNameLink(item, "object")
      if (CanSeeThrough(item)) {
        result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")")
      }
      count = count + 1
      if (count = listLength - 1) {
        result = result + " " + preFinal + " "
      }
      else if (count < listLength) {
        result = result + ", "
      }
      else {
        result = result + postList
      }
    }
    return (result)
  ]]>
  </function>

  <function name="RemoveSceneryObjects" type="objectlist" parameters="list">
    <![CDATA[
    result = NewObjectList()
    foreach (obj, list) {
      if (not obj.scenery and obj <> game.pov and obj.visible) {
        list add (result, obj)
      }
    }
    return (result)
    ]]>
  </function>
      count = 0
      result = preList + " "
      foreach (item, list) {
        result = result + GetDisplayNameLink(item, "exit", item.displayverbs)
        count = count + 1
        if (count = listLength - 1) {
          result = result + " " + preFinal + " "
      }
    }
    return (result)
    ]]>
  </function>
  
  <function name="RemoveDarkObjects" type="objectlist" parameters="list">
    <![CDATA[
    result = NewObjectList()
    foreach (obj, list) {
      if (GetBoolean(obj, "lightsource") or obj.parent = game.pov) {
        list add(result, obj)
      }
    }
    return (result)
    ]]>
  </function>
  
  <function name="FormatExitList" type="string" parameters="preList, list, preFinal, postList">
    <![CDATA[
    result = ""
  </function>

  <function name="GetDisplayName" type="string" parameters="obj">
    return (GetDisplayNameLink(obj, "", null))
  </function>

  <function name="GetDisplayNameLink" type="string" parameters="obj, type, verbs">
  <![CDATA[
    if (verbs <> null) {
      verbCount = ListCount(verbs)
    }
          result = result + ", "
        }
      }
      result = result + postList
    }
    return (result)
  ]]>
  </function>

  <function name="GetDisplayAlias" type="string" parameters="obj">
    <![CDATA[
    if (HasString(obj, "alias")) {
      result = obj.alias
    }
    else {
      result = obj.name
    }
    return (result)
  ]]>
  </function>

  <function name="GetDisplayName" type="string" parameters="obj">
    return (GetDisplayNameLink(obj, ""))
  </function>

  <function name="GetDisplayNameLink" type="string" parameters="obj, type">
  <![CDATA[
    verbs = GetDisplayVerbs(obj)
    if (verbs <> null) {
      verbCount = ListCount(verbs)
    }
    else {      
      verbCount = 0
    }
    
    if (type = "exit" and verbCount = 1) {
      if (not game.enablehyperlinks) {
        result = GetDisplayAlias(obj)
      } else {
        result = "{exit:" + obj.name + "}"
      }
    }
    else if (type = "") {
      result = GetDisplayAlias(obj)
    }
    else {
      result = "{object:" + obj.name + "}"
    }
    
    if (not GetBoolean(obj, "usedefaultprefix")) {
      if (obj.prefix = null) {
        prefix = ""
      }
      else {
        prefix = obj.prefix
      }
    }
    else if (type = "exit") {
      prefix = ""
    }
    else {
      prefix = GetDefaultPrefix(obj)
    }
    if (LengthOf(prefix) > 0) prefix = prefix + " "
    result = prefix + result
    if (not GetBoolean(obj, "usedefaultprefix") and HasString(obj, "suffix")) {
      if (LengthOf(obj.suffix) > 0) {
        result = result + " " + obj.suffix
      }
    }
    return (result)
  ]]>
  </function>

  <function name="ObjectLink" type="string" parameters="obj">
    return ("{object:" + obj.name + "}")
  </function>

  <function name="GetListDisplayAlias" type="string" parameters="obj">
    <![CDATA[
    if (HasString(obj, "listalias")) {
      // Modified by KV
      result = ProcessText(obj.listalias)
    }
    else {
      result = GetDisplayAlias(obj)
    }
    return (result)
  ]]>
  </function>
  
  <function name="CheckDarkness" type="boolean">
    roomCheckDarkness = true
    if (GetBoolean(game.pov.parent, "dark")) {
      if (ListCount(ScopeVisibleLightsource("strong")) > 0) {
        roomCheckDarkness = false
      }
    } 
    else {
      roomCheckDarkness = false
    }
    game.pov.parent.darklevel = roomCheckDarkness
    return (roomCheckDarkness)
  </function>
</library>

<MSG> Remove verbs parameter from GetDisplayNameLink

<DFF> @@ -199,7 +199,7 @@
     foreach (item, list) {
       if (LengthOf(result) = 0) result = preList + " "
       verbs = GetDisplayVerbs(item)
-      result = result + GetDisplayNameLink(item, "object", verbs)
+      result = result + GetDisplayNameLink(item, "object")
       if (CanSeeThrough(item)) {
         result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")", useinventoryverbs)
       }
@@ -251,7 +251,7 @@
       count = 0
       result = preList + " "
       foreach (item, list) {
-        result = result + GetDisplayNameLink(item, "exit", item.displayverbs)
+        result = result + GetDisplayNameLink(item, "exit")
         count = count + 1
         if (count = listLength - 1) {
           result = result + " " + preFinal + " "
@@ -279,11 +279,12 @@
   </function>
 
   <function name="GetDisplayName" type="string" parameters="obj">
-    return (GetDisplayNameLink(obj, "", null))
+    return (GetDisplayNameLink(obj, ""))
   </function>
 
-  <function name="GetDisplayNameLink" type="string" parameters="obj, type, verbs">
+  <function name="GetDisplayNameLink" type="string" parameters="obj, type">
   <![CDATA[
+    verbs = GetDisplayVerbs(obj)
     if (verbs <> null) {
       verbCount = ListCount(verbs)
     }

{'commit': 'diff --git a/WorldModel/WorldModel/Core/CoreDescriptions.aslx b/WorldModel/WorldModel/Core/CoreDescriptions.aslx\nindex e6c9e674..dcfbea97 100644\n--- a/WorldModel/WorldModel/Core/CoreDescriptions.aslx\n+++ b/WorldModel/WorldModel/Core/CoreDescriptions.aslx\n@@ -199,7 +199,7 @@\n     foreach (item, list) {\r\n       if (LengthOf(result) = 0) result = preList + " "\r\n       verbs = GetDisplayVerbs(item)\r\n-      result = result + GetDisplayNameLink(item, "object", verbs)\r\n+      result = result + GetDisplayNameLink(item, "object")\r\n       if (CanSeeThrough(item)) {\r\n         result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")", useinventoryverbs)\r\n       }\r\n@@ -251,7 +251,7 @@\n       count = 0\r\n       result = preList + " "\r\n       foreach (item, list) {\r\n-        result = result + GetDisplayNameLink(item, "exit", item.displayverbs)\r\n+        result = result + GetDisplayNameLink(item, "exit")\r\n         count = count + 1\r\n         if (count = listLength - 1) {\r\n           result = result + " " + preFinal + " "\r\n@@ -279,11 +279,12 @@\n   </function>\r\n \r\n   <function name="GetDisplayName" type="string" parameters="obj">\r\n-    return (GetDisplayNameLink(obj, "", null))\r\n+    return (GetDisplayNameLink(obj, ""))\r\n   </function>\r\n \r\n-  <function name="GetDisplayNameLink" type="string" parameters="obj, type, verbs">\r\n+  <function name="GetDisplayNameLink" type="string" parameters="obj, type">\r\n   <![CDATA[\r\n+    verbs = GetDisplayVerbs(obj)\r\n     if (verbs <> null) {\r\n       verbCount = ListCount(verbs)\r\n     }\r\n', 'commit_subject': 'Remove verbs parameter from GetDisplayNameLink', 'repo_name': 'textadventures/quest', 'committer': {'name': 'Alex Warren', 'email': '60c6d277a8bd81de7fdde19201bf9c58a3df08f4@axeuk.com', 'time_sec': '1360253019', 'tz_offset': '0', 'date': {'seconds': '1360253019'}}, 'commit_tree': '30fcf0ac011197caf5b2b76ffcdd8dcd75ce3124', 'commit_message': 'Remove verbs parameter from GetDisplayNameLink\n', 'language_name': 'C#', 'license': 'mit', 'hunks': '@@ -199,7 +199,7 @@\n     foreach (item, list) {\r\n       if (LengthOf(result) = 0) result = preList + " "\r\n       verbs = GetDisplayVerbs(item)\r\n-      result = result + GetDisplayNameLink(item, "object", verbs)\r\n+      result = result + GetDisplayNameLink(item, "object")\r\n       if (CanSeeThrough(item)) {\r\n         result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")", useinventoryverbs)\r\n       }\r\n@@ -251,7 +251,7 @@\n       count = 0\r\n       result = preList + " "\r\n       foreach (item, list) {\r\n-        result = result + GetDisplayNameLink(item, "exit", item.displayverbs)\r\n+        result = result + GetDisplayNameLink(item, "exit")\r\n         count = count + 1\r\n         if (count = listLength - 1) {\r\n           result = result + " " + preFinal + " "\r\n@@ -279,11 +279,12 @@\n   </function>\r\n \r\n   <function name="GetDisplayName" type="string" parameters="obj">\r\n-    return (GetDisplayNameLink(obj, "", null))\r\n+    return (GetDisplayNameLink(obj, ""))\r\n   </function>\r\n \r\n-  <function name="GetDisplayNameLink" type="string" parameters="obj, type, verbs">\r\n+  <function name="GetDisplayNameLink" type="string" parameters="obj, type">\r\n   <![CDATA[\r\n+    verbs = GetDisplayVerbs(obj)\r\n     if (verbs <> null) {\r\n       verbCount = ListCount(verbs)\r\n     }\r\n', 'addition_count': 5, 'deletion_count': 4, 'src_file': 'a/WorldModel/WorldModel/Core/CoreDescriptions.aslx', 'tgt_file': 'b/WorldModel/WorldModel/Core/CoreDescriptions.aslx', 'file_extension': '.aslx', 'before_file': '\ufeff<library>\n  <function name="ShowRoomDescription">\n    <![CDATA[\n      isDark = CheckDarkness()\n      if (isDark) {\n        descriptionfield = "darkroomdescription"\n      }\n      else {\n        descriptionfield = "description"\n      }\n\n      if (game.autodescription) {\n        desc = ""\n        \n        for (i, 1, 4) {\n          if (i = game.autodescription_youarein) {\n            if (game.autodescription_youarein_useprefix) {\n              youarein = game.pov.parent.descprefix\n              desc = AddDescriptionLine (desc, youarein + " " + GetDisplayName(game.pov.parent) + ".")\n            }\n            else {\n              desc = AddDescriptionLine (desc, "<b>" + CapFirst(GetDisplayName(game.pov.parent)) + "</b>")\n            }\n            if (game.autodescription_youarein_newline) {\n              msg (desc + "<br/>")\n              desc = ""\n            }\n          }\n          if (i = game.autodescription_youcansee) {\n            objects = FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")\n            desc = AddDescriptionLine(desc, objects)\n            \n            if (game.autodescription_youcansee_newline) {\n              msg (desc + "<br/>")\n              desc = ""\n            }\n          }\n          if (i = game.autodescription_youcango) {\n            exits = FormatExitList(game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".")\n            desc = AddDescriptionLine(desc, exits)\n            \n            if (game.autodescription_youcango_newline) {\n              msg (desc + "<br/>")\n              desc = ""\n            }\n          }\n          if (i = game.autodescription_description) {\n            if (HasScript(game.pov.parent, descriptionfield)) {\n              if (LengthOf(desc) > 0) {\n                    msg (desc)\n                    desc = ""\n                }\n              do (game.pov.parent, descriptionfield)\n              if (game.autodescription_description_newline) {\n                msg ("")\n              }\n            }\n            else  {\n              desc = AddDescriptionLine(desc, GetRoomDescription())\n              if (game.autodescription_description_newline) {\n                msg (desc + "<br/>")\n                desc = ""\n              }\n            }\n          }\n        }\n        \n        if (LengthOf(desc) > 0) {\n          msg (desc)\n        }\n      }\n      else {\n        if (HasScript(game.pov.parent, descriptionfield)) {\n          do (game.pov.parent, descriptionfield)\n        }\n        else {\n          fulldesc = GetRoomDescription()\n     \n          if (LengthOf(fulldesc) > 0) {\n            msg (fulldesc)\n          }\n        }\n      }\n    ]]>\n  </function>\n\n  <function name="AddDescriptionLine" parameters="desc, line" type="string">\n    <![CDATA[\n    if (LengthOf(line) > 0) {\n      if (LengthOf(desc) > 0) {\n        msg (desc)\n        desc = ""\n      }\n      desc = desc + line\n    }\n    return (desc)\n    ]]>\n  </function>\n\n  <function name="GetRoomDescription" type="string">\n    <![CDATA[\n    fulldesc = ""\n    \n    if (CheckDarkness()) {\n      if (HasString(game.pov.parent, "darkroomdescription")) {\n        if (LengthOf(game.pov.parent.darkroomdescription) > 0) {\n          fulldesc = game.pov.parent.darkroomdescription\n        }\n      }\n      // Added by The Pixie to correct what appears to be a bug\n      if (fulldesc = "") fulldesc = DynamicTemplate("LookAtDarkness", game.pov.parent)\n    }\n    else {\n       if (HasString(game.pov.parent, "description")) {\n         if (LengthOf(game.pov.parent.description) > 0) {\n             fulldesc = game.pov.parent.description\n         }\n       }\n    }\n    \n    if (game.appendobjectdescription) {\n      foreach (val, ScopeVisibleNotHeld()) {\n        if (HasString(val, "inroomdescription")) {\n          if (LengthOf(val.inroomdescription) > 0 and val <> game.pov) {\n            fulldesc = fulldesc + " " + val.inroomdescription\n          }\n        }\n      }\n    }\n    \n    return (Trim(fulldesc))\n    ]]>\n  </function>\n\n  <function name="OnEnterRoom" parameters="oldRoom">\n    <![CDATA[\n    game.displayroomdescriptiononstart = false\n    if (IsDefined("oldRoom")) {\n      if (oldRoom <> null) {\n        if (game.clearscreenonroomenter) {\n          ClearScreen\n          if (not game.currentexitmessage = null) {\n            msg(game.currentexitmessage)\n            game.currentexitmessage = null\n          }\n        }\n        if (HasScript(oldRoom, "onexit")) {\n          do (oldRoom, "onexit")\n        }\n      }\n    }\n    \n    on ready {\n      if ((not GetBoolean(game.pov.parent, "visited")) and HasScript(game.pov.parent, "beforefirstenter")) {\n        do (game.pov.parent, "beforefirstenter")\n      }\n  \n      on ready {\n        if (HasScript(game.pov.parent, "beforeenter")) {\n          do (game.pov.parent, "beforeenter")\n        }\n    \n        on ready {\n          if (game.gridmap) {\n            Grid_CalculateMapCoordinates (game.pov.parent, game.pov)\n            Grid_DrawPlayerInRoom (game.pov.parent)\n          }\n          \n          if (IsDefined("oldRoom")) {\n            if (oldRoom <> null and game.changeroom_newline and not game.command_newline) {\n              msg ("")\n            }            \n          }\n          \n          JS.updateLocation(CapFirst(GetDisplayName(game.pov.parent)))\n          roomFrameExists = false\n          if (HasString(game.pov.parent, "picture")) {\n            if (LengthOf(game.pov.parent.picture) > 0) {\n              roomFrameExists = true\n              SetFramePicture(game.pov.parent.picture)\n            }\n          }\n          if (game.clearframe and not roomFrameExists) {\n            ClearFramePicture\n          }\n          if (game.showdescriptiononenter) {\n            ShowRoomDescription\n          }\n          \n          if (HasScript( game, "roomenter")) {\n            do (game, "roomenter")\n          }\n          on ready {     \n            if ((not GetBoolean(game.pov.parent, "visited")) and HasScript(game.pov.parent, "firstenter")) {\n              do (game.pov.parent, "firstenter")\n            }\n            on ready {\n              if (HasScript(game.pov.parent, "enter")) {\n    foreach (item, list) {\r\n      if (LengthOf(result) = 0) result = preList + " "\r\n      verbs = GetDisplayVerbs(item)\r\n      result = result + GetDisplayNameLink(item, "object", verbs)\r\n      if (CanSeeThrough(item)) {\r\n        result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")", useinventoryverbs)\r\n      }\r\n    }\n    ]]>\n  </function>\n\n  <function name="FormatObjectList" type="string" parameters="preList, parent, preFinal, postList">\n    <![CDATA[\n    result = ""\n    count = 0\n    list = RemoveSceneryObjects(GetDirectChildren(parent))\n    if (CheckDarkness()) {\n      list = RemoveDarkObjects(list)\n    }\n    listLength = ListCount(list)\n    foreach (item, list) {\n      if (LengthOf(result) = 0) result = preList + " "\n      result = result + GetDisplayNameLink(item, "object")\n      if (CanSeeThrough(item)) {\n        result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")")\n      }\n      count = count + 1\n      if (count = listLength - 1) {\n        result = result + " " + preFinal + " "\n      }\n      else if (count < listLength) {\n        result = result + ", "\n      }\n      else {\n        result = result + postList\n      }\n    }\n    return (result)\n  ]]>\n  </function>\n\n  <function name="RemoveSceneryObjects" type="objectlist" parameters="list">\n    <![CDATA[\n    result = NewObjectList()\n    foreach (obj, list) {\n      if (not obj.scenery and obj <> game.pov and obj.visible) {\n        list add (result, obj)\n      }\n    }\n    return (result)\n    ]]>\n  </function>\n      count = 0\r\n      result = preList + " "\r\n      foreach (item, list) {\r\n        result = result + GetDisplayNameLink(item, "exit", item.displayverbs)\r\n        count = count + 1\r\n        if (count = listLength - 1) {\r\n          result = result + " " + preFinal + " "\r\n      }\n    }\n    return (result)\n    ]]>\n  </function>\n  \n  <function name="RemoveDarkObjects" type="objectlist" parameters="list">\n    <![CDATA[\n    result = NewObjectList()\n    foreach (obj, list) {\n      if (GetBoolean(obj, "lightsource") or obj.parent = game.pov) {\n        list add(result, obj)\n      }\n    }\n    return (result)\n    ]]>\n  </function>\n  \n  <function name="FormatExitList" type="string" parameters="preList, list, preFinal, postList">\n    <![CDATA[\n    result = ""\n  </function>\r\n\r\n  <function name="GetDisplayName" type="string" parameters="obj">\r\n    return (GetDisplayNameLink(obj, "", null))\r\n  </function>\r\n\r\n  <function name="GetDisplayNameLink" type="string" parameters="obj, type, verbs">\r\n  <![CDATA[\r\n    if (verbs <> null) {\r\n      verbCount = ListCount(verbs)\r\n    }\r\n          result = result + ", "\n        }\n      }\n      result = result + postList\n    }\n    return (result)\n  ]]>\n  </function>\n\n  <function name="GetDisplayAlias" type="string" parameters="obj">\n    <![CDATA[\n    if (HasString(obj, "alias")) {\n      result = obj.alias\n    }\n    else {\n      result = obj.name\n    }\n    return (result)\n  ]]>\n  </function>\n\n  <function name="GetDisplayName" type="string" parameters="obj">\n    return (GetDisplayNameLink(obj, ""))\n  </function>\n\n  <function name="GetDisplayNameLink" type="string" parameters="obj, type">\n  <![CDATA[\n    verbs = GetDisplayVerbs(obj)\n    if (verbs <> null) {\n      verbCount = ListCount(verbs)\n    }\n    else {      \n      verbCount = 0\n    }\n    \n    if (type = "exit" and verbCount = 1) {\n      if (not game.enablehyperlinks) {\n        result = GetDisplayAlias(obj)\n      } else {\n        result = "{exit:" + obj.name + "}"\n      }\n    }\n    else if (type = "") {\n      result = GetDisplayAlias(obj)\n    }\n    else {\n      result = "{object:" + obj.name + "}"\n    }\n    \n    if (not GetBoolean(obj, "usedefaultprefix")) {\n      if (obj.prefix = null) {\n        prefix = ""\n      }\n      else {\n        prefix = obj.prefix\n      }\n    }\n    else if (type = "exit") {\n      prefix = ""\n    }\n    else {\n      prefix = GetDefaultPrefix(obj)\n    }\n    if (LengthOf(prefix) > 0) prefix = prefix + " "\n    result = prefix + result\n    if (not GetBoolean(obj, "usedefaultprefix") and HasString(obj, "suffix")) {\n      if (LengthOf(obj.suffix) > 0) {\n        result = result + " " + obj.suffix\n      }\n    }\n    return (result)\n  ]]>\n  </function>\n\n  <function name="ObjectLink" type="string" parameters="obj">\n    return ("{object:" + obj.name + "}")\n  </function>\n\n  <function name="GetListDisplayAlias" type="string" parameters="obj">\n    <![CDATA[\n    if (HasString(obj, "listalias")) {\n      // Modified by KV\n      result = ProcessText(obj.listalias)\n    }\n    else {\n      result = GetDisplayAlias(obj)\n    }\n    return (result)\n  ]]>\n  </function>\n  \n  <function name="CheckDarkness" type="boolean">\n    roomCheckDarkness = true\n    if (GetBoolean(game.pov.parent, "dark")) {\n      if (ListCount(ScopeVisibleLightsource("strong")) > 0) {\n        roomCheckDarkness = false\n      }\n    } \n    else {\n      roomCheckDarkness = false\n    }\n    game.pov.parent.darklevel = roomCheckDarkness\n    return (roomCheckDarkness)\n  </function>\n</library>\n', 'message': 'Remove verbs parameter from GetDisplayNameLink\n', 'author_name': 'Alex Warren', 'lang': 'aslx'}