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

Function wiz_load_splua

src/wizcmds.c:375–395  ·  view source on GitHub ↗

the #wizloaddes command - load a special level lua file */

Source from the content-addressed store, hash-verified

373
374/* the #wizloaddes command - load a special level lua file */
375int
376wiz_load_splua(void)
377{
378 if (wizard) {
379 char buf[BUFSZ];
380
381 buf[0] = '\0';
382 getlin("Load which des lua file?", buf);
383 if (buf[0] == '\033' || buf[0] == '\0')
384 return ECMD_CANCEL;
385 if (!strchr(buf, '.'))
386 strcat(buf, ".lua");
387
388 lspo_reset_level(NULL);
389 (void) load_special(buf);
390 lspo_finalize_level(NULL);
391
392 } else
393 pline(unavailcmd, ecname_from_fn(wiz_load_splua));
394 return ECMD_OK;
395}
396
397/* the #wizlevelport command - level teleport */
398int

Callers

nothing calls this directly

Calls 6

getlinFunction · 0.85
lspo_reset_levelFunction · 0.85
load_specialFunction · 0.85
lspo_finalize_levelFunction · 0.85
ecname_from_fnFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected