object viewer; object oldroom; object keeper; set_viewer(ob) { viewer = ob; } set_keeper(ob) { keeper = ob; } set_oldroom(ob) { oldroom = ob; } move_player(dir_dest, optional_dest_ob) { string dir, dest; int is_light; if (!optional_dest_ob) { if (sscanf(dir_dest, "%s#%s", dir, dest) != 2) { tell_object(this_object(), "Move to bad dir/dest\n"); return; } } else { dir = dir_dest; dest = optional_dest_ob; } move_object(this_object(), dest); is_light = set_light(0); if(is_light < 0) is_light = 0; if(is_light) command("glance", viewer); else write("It is dark here.\n"); } glance() { int i; object ob; ob = environment(this_object()); call_other(ob, "long", 0); for (i=0, ob=first_inventory(ob); ob; ob = next_inventory(ob)) { if (ob != this_object()) { string short_str; short_str = call_other(ob, "short"); if (short_str) write(short_str + ".\n"); } if (i++ > 40) { write("*** TRUNCATED\n"); break; } } return 1; } query_current_room() { return file_name(environment(this_object())); }