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

Function set_wallprop_from_str

src/objnam.c:3538–3550  ·  view source on GitHub ↗

set wall under hero undiggable/unphaseable from string */

Source from the content-addressed store, hash-verified

3536
3537/* set wall under hero undiggable/unphaseable from string */
3538staticfn void
3539set_wallprop_from_str(char *bp)
3540{
3541 int wall_prop = 0;
3542
3543 if (strstr(bp, "undiggable ") || strstr(bp, "nondiggable "))
3544 wall_prop |= W_NONDIGGABLE;
3545 if (strstr(bp, "unphaseable ") || strstr(bp, "nonpasswall "))
3546 wall_prop |= W_NONPASSWALL;
3547 /* |= because wall_info (aka flags) is overloaded with other stuff */
3548 if (wall_prop)
3549 levl[u.ux][u.uy].wall_info |= wall_prop;
3550}
3551
3552/* in wizard mode, readobjnam() can accept wishes for traps and terrain */
3553staticfn struct obj *

Callers 1

wizterrainwishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected