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

Function get_table_align

src/sp_lev.c:3113–3128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3111RESTORE_WARNING_UNREACHABLE_CODE
3112
3113staticfn int
3114get_table_align(lua_State *L)
3115{
3116 static const char *const gtaligns[] = {
3117 "noalign", "law", "neutral", "chaos",
3118 "coaligned", "noncoaligned", "random", NULL
3119 };
3120 static const int aligns2i[] = {
3121 AM_NONE, AM_LAWFUL, AM_NEUTRAL, AM_CHAOTIC,
3122 AM_SPLEV_CO, AM_SPLEV_NONCO, AM_SPLEV_RANDOM, 0
3123 };
3124
3125 int a = aligns2i[get_table_option(L, "align", "random", gtaligns)];
3126
3127 return a;
3128}
3129
3130staticfn int
3131get_table_monclass(lua_State *L)

Callers 2

lspo_monsterFunction · 0.85
lspo_altarFunction · 0.85

Calls 1

get_table_optionFunction · 0.85

Tested by

no test coverage detected