MCPcopy Create free account
hub / github.com/NetHack/NetHack / get_dgn_align

Function get_dgn_align

src/dungeon.c:780–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780staticfn int
781get_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
796staticfn void
797init_dungeon_levels(

Callers 2

init_dungeon_levelsFunction · 0.85
init_dungeon_dungeonsFunction · 0.85

Calls 1

get_table_optionFunction · 0.85

Tested by

no test coverage detected