| 5908 | } |
| 5909 | |
| 5910 | staticfn void |
| 5911 | set_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(); */ |
no test coverage detected