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

Function set_wallprop_in_selection

src/sp_lev.c:5910–5932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5908}
5909
5910staticfn void
5911set_wallprop_in_selection(lua_State *L, int prop)
5912{
5913 int argc = lua_gettop(L);
5914 boolean freesel = FALSE;
5915 struct selectionvar *sel = (struct selectionvar *) 0;
5916
5917 create_des_coder();
5918
5919 if (argc == 1) {
5920 sel = l_selection_check(L, -1);
5921 } else if (argc == 0) {
5922 freesel = TRUE;
5923 sel = selection_new();
5924 selection_clear(sel, 1);
5925 }
5926
5927 if (sel) {
5928 selection_iterate(sel, sel_set_wall_property, (genericptr_t) &prop);
5929 if (freesel)
5930 selection_free(sel, TRUE);
5931 }
5932}
5933
5934/* non_diggable(selection); */
5935/* non_diggable(); */

Callers 2

lspo_non_diggableFunction · 0.85
lspo_non_passwallFunction · 0.85

Calls 6

create_des_coderFunction · 0.85
l_selection_checkFunction · 0.85
selection_newFunction · 0.85
selection_clearFunction · 0.85
selection_iterateFunction · 0.85
selection_freeFunction · 0.85

Tested by

no test coverage detected