Author Topic: HideExit code  (Read 2541 times)

Offline shadyman

  • Friend
  • **
  • Posts: 50
    • View Profile
HideExit code
« on: January 13, 2007, 05:01:19 pm »
This is my update to the /lib/exits.c and /lib/std/room.c to make obvious exits easier to use and worth with. It adds the following:

    * a sub-mapping to the Exits mapping in exits.c to include ([ "obv" : 0 or 1 ]).
    * HideExit(dir), which hides the given exit (and should be used in your room code to hide exits)
    * GetObvMap(), which returns a mapping of direction and hidden [Example where south is hidden by HideExit("south"): ([ "west" : 1, "north" : 1, "east" : 1, "south" : 0 ]) ].

Room Exits default to Obvious, so there is no need to set them. The old SetObviousExits and its related functions are still included and valid for compatibility purposes. I will be releasing another version of this code for use with muds who want more than the [n, s, e, w, u] exit list.

Update: Moved one block of code in GenerateVerboseExits() in room.c to allow you to HideExit() enters. (Example: HideExit("enter office"); )

Click Here to go to my site to download