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

Function stat_cap_indx

src/botl.c:2130–2141  ·  view source on GitHub ↗

callback so that interface can get capacity index rather than trying to reconstruct that from the encumbrance string or asking the general core what the value is */

Source from the content-addressed store, hash-verified

2128 to reconstruct that from the encumbrance string or asking the general
2129 core what the value is */
2130int
2131stat_cap_indx(void)
2132{
2133 int cap;
2134
2135#ifdef STATUS_HILITES
2136 cap = gb.blstats[gn.now_or_before_idx][BL_CAP].a.a_int;
2137#else
2138 cap = near_capacity();
2139#endif
2140 return cap;
2141}
2142
2143/* callback so that interface can get hunger index rather than trying to
2144 reconstruct that from the hunger string or dipping into core internals */

Callers 1

tty_status_updateFunction · 0.85

Calls 1

near_capacityFunction · 0.85

Tested by

no test coverage detected