| 778 | } |
| 779 | |
| 780 | staticfn int |
| 781 | get_dgn_align(lua_State *L) |
| 782 | { |
| 783 | static const char *const dgnaligns[] = { |
| 784 | "unaligned", "noalign", "lawful", "neutral", "chaotic", NULL |
| 785 | }; |
| 786 | static const int dgnaligns2i[] = { |
| 787 | D_ALIGN_NONE, D_ALIGN_NONE, D_ALIGN_LAWFUL, |
| 788 | D_ALIGN_NEUTRAL, D_ALIGN_CHAOTIC, D_ALIGN_NONE |
| 789 | }; |
| 790 | |
| 791 | int a = dgnaligns2i[get_table_option(L, "alignment", |
| 792 | "unaligned", dgnaligns)]; |
| 793 | return a; |
| 794 | } |
| 795 | |
| 796 | staticfn void |
| 797 | init_dungeon_levels( |
no test coverage detected