MCPcopy Index your code
hub / github.com/NetHack/NetHack / timebot

Function timebot

src/botl.c:274–294  ·  view source on GitHub ↗

special purpose status update: move counter ('time' status) only */

Source from the content-addressed store, hash-verified

272
273/* special purpose status update: move counter ('time' status) only */
274void
275timebot(void)
276{
277 if (gb.bot_disabled)
278 return;
279 /* we're called when disp.time_botl is set and general disp.botl
280 is clear; disp.time_botl gets set whenever svm.moves changes value
281 so there's no benefit in tracking previous value to decide whether
282 to skip update; suppress_map_output() handles program_state.restoring
283 and program_state.done_hup (tty hangup => no further output at all)
284 and we use it for maybe skipping status as well as for the map */
285 if (flags.time && iflags.status_updates && !suppress_map_output()) {
286 if (VIA_WINDOWPORT()) {
287 stat_update_time();
288 } else {
289 /* old status display updates everything */
290 bot();
291 }
292 }
293 disp.time_botl = FALSE;
294}
295
296/* convert experience level (1..30) to rank index (0..8) */
297int

Callers 2

allmain.cFile · 0.85
flush_screenFunction · 0.85

Calls 3

suppress_map_outputFunction · 0.85
stat_update_timeFunction · 0.85
botFunction · 0.85

Tested by

no test coverage detected