| 4522 | } |
| 4523 | |
| 4524 | RESTORE_WARNING_UNREACHABLE_CODE |
| 4525 | |
| 4526 | /* corridor({ srcroom=1, srcdoor=2, srcwall="north", |
| 4527 | * destroom=2, destdoor=1, destwall="west" }); */ |
| 4528 | int |
| 4529 | lspo_corridor(lua_State *L) |
| 4530 | { |
| 4531 | static const char *const walldirs[] = { |
| 4532 | "all", "random", "north", "west", "east", "south", NULL |
| 4533 | }; |
| 4534 | static const int walldirs2i[] = { |
| 4535 | W_ANY, W_RANDOM, W_NORTH, W_WEST, W_EAST, W_SOUTH, 0 |
| 4536 | }; |
| 4537 | corridor tc; |
| 4538 | |
| 4539 | create_des_coder(); |
| 4540 | |
| 4541 | lcheck_param_table(L); |
| 4542 | |
| 4543 | tc.src.room = get_table_int(L, "srcroom"); |
| 4544 | tc.src.door = get_table_int(L, "srcdoor"); |
| 4545 | tc.src.wall = walldirs2i[get_table_option(L, "srcwall", "all", walldirs)]; |
| 4546 | tc.dest.room = get_table_int(L, "destroom"); |
| 4547 | tc.dest.door = get_table_int(L, "destdoor"); |
| 4548 | tc.dest.wall = walldirs2i[get_table_option(L, "destwall", "all", |
| 4549 | walldirs)]; |
| 4550 | |
| 4551 | create_corridor(&tc); |
| 4552 | |
| 4553 | return 0; |
| 4554 | } |
| 4555 | |
| 4556 | /* random_corridors(); */ |
| 4557 | int |
nothing calls this directly
no test coverage detected