Exit Utilities #279
Aliases: Exit Utilities
4 verbs · 14 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
opposite_dir od | this none this | rxd | #279 | 18 |
fix_water_exits | this none this | rxd | #279 | 17 |
fix_out_exit | this none this | rxd | #279 | 27 |
cardinal_name | this none this | rxd | #279 | 8 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
cardinal_names | #279 | rc | #29 | {"north", "northeast", "east", "southeast", "south", "southwest", "west", "northwest"} |
cardinal_letters | #279 | rc | #29 | {"n", "ne", "e", "se", "s", "sw", "w", "nw"} |
directions | #279 | rc | #29 | 0 |
help_msg | #72 | rc | #29 | list of 11{"Exit Utilities: verbs and properties useful in dealing with exits.", "", ":fix_water_exits(OBJ area) => list of fixed rooms or E_INVARG if not an area.", "Looks for water rooms and exits connected to them, and chparents the exits", "to the correct shoreline/antishoreline/diving/surfacing exits.", "", ":opposite_dir(STR dir) => STR opposite (what would be on the other side of an exit to dir)", "", "Useful properties:", ".cardinal_names => {\"north\", \"northeast\", \"east\", \"southeast\", \"south\", \"southwest\", \"west\", \"northwest\"}", ".cardinal_letters => {\"n\", \"ne\", \"e\", \"se\", \"s\", \"sw\", \"w\", \"nw\"}"} |
aliases | #1 | rc | #29 | {"Exit Utilities"} |
description | #1 | rc | #29 | <clear> |
object_size | #1 | r | #29 | {3986, 1298434451} |
hidden_verbs | #1 | rc | #29 | <clear> |
phelp_msg | #1 | rc | #29 | <clear> |
weight | #1 | rc | #29 | <clear> |
owner_verbs | #1 | rc | #29 | <clear> |
plural_name | #1 | rc | #29 | <clear> |
client_image | #1 | rc | #29 | <clear> |
listening | #1 | rc | #29 | <clear> |
Ancestry
Ancestors (nearest first): #72 Generic Utilities Package → #1 root
Children: none
Call graph
Source
opposite_dir od
Referenced by
none
Source
1":opposite_dir(STR dir) => STR opposite (what would be on the other side of an exit to dir)"; 2startdir = args[1]; 3names = this.cardinal_names; 4letters = this.cardinal_letters; 5if (startdir in names) 6i = startdir in names; 7n = (i <= 4) ? i + 4 | (i - 4); 8return names[n]; 9elseif (startdir in letters) 10i = startdir in letters; 11n = (i <= 4) ? i + 4 | (i - 4); 12return letters[n]; 13else 14if (startdir in {"in", "out"}) 15return (startdir == "in") ? "out" | "in"; 16endif 17endif 18return E_INVARG;
fix_water_exits
Referenced by
none
Source
1player = caller_perms(); 2where = args[1]; 3if (!$perm_utils:controls(player, where)) 4return E_PERM; 5endif 6fixed = {}; 7if (is_a(where, $area)) 8for room in (where.contents) 9if (is_a(room, #1034) || is_a(room, #1047)) 10room:("@exitfix")(); 11fixed = {@fixed, room}; 12endif 13endfor 14return fixed; 15else 16return E_INVARG; 17endif
fix_out_exit
Referenced by
none
Source
1":fix_out_exit => STR name"; 2"Fixes an 'out' exit so it shows as out(door to <whatever>)"; 3"instead of just 'out'"; 4e = args[1]; 5if (!$perm_utils:controls(caller_perms(), e)) 6raise(E_PERM); 7endif 8if ((e.direction == "out") || (e.name == "out")) 9newname = is_a(e, $door) ? "door " | ""; 10if (valid(e.otherside) && valid(e.otherside.location)) 11if (e.otherside.location.outdoor) 12suffix = is_a(e, $door) ? "to outside" | ""; 13elseif (is_a(e.otherside.location, #279762)) 14suffix = is_a(e, $door) ? "to the hallway" | "hallway"; 15endif 16else 17raise(E_INVIND, "Bad .otherside or .otherside.location"); 18endif 19e.name = tostr(newname, suffix); 20if (!e.name) 21e.name = "out"; 22endif 23e.direction = "out"; 24to_what = suffix ? $su:words(suffix)[$] | ""; 25e:set_aliases({e.name, newname, to_what, "out", "o"}); 26return e.name; 27endif
cardinal_name
Referenced by
none
Source
1n = args[1]; 2if (i = n in this.cardinal_names) 3return n; 4elseif (i = n in this.cardinal_letters) 5return this.cardinal_names[i]; 6else 7return E_INVARG; 8endif