move_object(): Can only move current_object. transfer(): Not supported any longer. move_object(): exit() is not called any longer when a player leaves a room.
---------------------------------------------------------- object shadow(object ob, int flag) If 'flag' is 0, then current object will shadow 'ob'. If 'flag' is 1, then either 0 will be returned, or the object that is shadow for 'ob'. An object that defines that funtion query_prevent_shadow() to return 1 can't be shadowed, and the shadow() function will return 0 instead of 'ob'. If an object 'a' shadows an object 'b', then all call_other() to 'b' will be redirected to 'a'. If object 'a' has not defined the function, then the call will be passed on to 'b'. There is only one object that can call functions in 'b' with call_other(), and that is 'a'. Not even object 'b' can call_other() itself. All normal (internal) function calls inside 'b' will however remain internal to 'b'. There are two ways to remove the shadow. Either destruct it, or the object that was shadowed. In the latter case, the shadow will also be destructed automatically. The result is that it is possible to hide an object behind another one, but everything can be totally transparent. ----------------------------------------------------------
Fixed some bugs.
int find_call_out(string func_name);which will return the time until this call out will occur.
int interactive(object ob);which will return a non-zero number if object ob is an interactive player.
get_dir("/w"); returns ({ "w" }) get_dir("/w/"); and get_dir("/w/."); return contents of directory "/w" get_dir("/");, get_dir("."); and get_dir("/."); return contents of directory "/".
mixed assoc(mixed key, mixed *keys, mixed *|void data_or_fail, mixed|void fail);Searches a key in an alist.
Three modes of calling:
Complexity : O( lg(n) ) , where n is the number of keys.
Return value is undefined if another list is given in place of a presorted key list.
mixed insert_alist( mixed key, mixed data_or_key_list..., mixed * alist);inserts an entry into an alist, or shows the place where this is to be done. When called with the last argument being an alist:
The first argument is a key to be inserted, the second and all the following but the last are data to associate it with. The last has to be an array with as much elements as key and data arguments are given, the matching key and data arrays; this should be already an alist, or the return value will neither be an alist. Return value is the enlarged assoc list ( array of two arrays ). If the key is already in the list, the data is simply replaced in the returned list.
When called with the last argument beinig a list of non-lists:
The call has to be done with exactly two arguments. The first argument is a key to be inserted in the presorted key list ( first element of an array that is an alist ) that has to be given as second argument. Return value is the index where the key has to be inserted to preserve the structure of a presorted alist, or the index where the key has been found. Return value is an int. CEVEATS: when called with certain string keys, the correct place might change after the call. So better don't use this mode of calling with a string key.
Complexity O( lg(n) + a*n ) Where n is the number of keys and s is a very small constant ( for block move );
mixed *order_alist(mixed *keys, mixed *|void data, ...);Creates an alist. Either takes an array containing keys, and others containing the associated data, where all arrays are to be of the same length, or takes a single array that contains as first member the array of keys and has an arbitrary number of other members containing data, each of wich has to be of the same length as the key array. Returns an array holding the sorted key array and the data arrays; the same permutation that is applied to the key array is applied to all data arrays.
Complexity is O( n * lg(n) * m ) , where n is the number of elements in the key array and m is the number of data arrays + 1;
Note that the the dimensions of the arrays are used the other way than in lisp to allow for faster searching.
Keys have to be of type integer, string or object. Types can be mixed.
mixed *sort_array(mixed *arr, string greater_fun, object ob);Returns an array sorted by the ordering function ob->greater_fun() The function 'greater_fun' in the object 'ob' is continously passed two arguments which are two of the elements of the array 'arr'. It should return true or a positive number if the first argument is greater than the second.
object *deep_inventory(object *ob);This function returns the recursive inventory of an object. The returned array of objects is flat, ie there is no structure reflecting the internal containment relations.
int test; void test() { test = "test"->(int)test; test = 1; }