diff --git a/examples/maze/maze3d.scad b/examples/maze/maze3d.scad index d3aee8d4..2a36c791 100644 --- a/examples/maze/maze3d.scad +++ b/examples/maze/maze3d.scad @@ -1,6 +1,6 @@ use ; use ; -use ; +use ; use ; layers = 4; @@ -41,11 +41,11 @@ module draw_3dmaze(cells, cell_width, road_width) { } } - function z_road(type) = !has(["Z_WALL", "Z_Y_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type); + function z_road(type) = !contains(["Z_WALL", "Z_Y_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type); - function y_road(type) = !has(["Y_WALL", "Y_X_WALL", "Z_Y_WALL", "Z_Y_X_WALL", "MASK"], type); + function y_road(type) = !contains(["Y_WALL", "Y_X_WALL", "Z_Y_WALL", "Z_Y_X_WALL", "MASK"], type); - function x_road(type) = !has(["X_WALL", "Y_X_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type); + function x_road(type) = !contains(["X_WALL", "Y_X_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type); module drawCell(cell_width, road_width, channels) { half_cw = cell_width / 2; diff --git a/examples/tiles/random_town_square.scad b/examples/tiles/random_town_square.scad index 4d8f2659..368d453b 100644 --- a/examples/tiles/random_town_square.scad +++ b/examples/tiles/random_town_square.scad @@ -1,6 +1,6 @@ use ; use ; -use ; +use ; use ; use ; use ; @@ -58,25 +58,25 @@ module random_town_square(size, tileW, layerH) { } module draw_tile(tile, tileW, layerH) { - if(has(["F2", "F4", "F6"], tile)) { + if(contains(["F2", "F4", "F6"], tile)) { layers = parse_number(tile[len(tile) - 1]); floor(tileW, layers * layerH); } - else if(has(["CCRS0", "CCRS1", "CCRS2", "CCRS3"], tile)) { + else if(contains(["CCRS0", "CCRS1", "CCRS2", "CCRS3"], tile)) { type = parse_number(tile[len(tile) - 1]); ccr_stairs(tileW, layerH, type); } - else if(has(["VCRS02", "VCRS12", "VCRS22", "VCRS32", "VCRS04", "VCRS14", "VCRS24", "VCRS34"], tile)) { + else if(contains(["VCRS02", "VCRS12", "VCRS22", "VCRS32", "VCRS04", "VCRS14", "VCRS24", "VCRS34"], tile)) { type = parse_number(tile[len(tile) - 2]); stairs = parse_number(tile[len(tile) - 1]); vcr_stairs(tileW, layerH, type, stairs); } - else if(has(["SS02", "SS12", "SS22", "SS32", "SS04", "SS14", "SS24", "SS34"], tile)) { + else if(contains(["SS02", "SS12", "SS22", "SS32", "SS04", "SS14", "SS24", "SS34"], tile)) { type = parse_number(tile[len(tile) - 2]); stairs = parse_number(tile[len(tile) - 1]); side_stairs(tileW, layerH, type, stairs); } - else if(has(["FW0", "FW1", "FW2", "FW3"], tile)) { + else if(contains(["FW0", "FW1", "FW2", "FW3"], tile)) { type = parse_number(tile[len(tile) - 1]); floor_wall(tileW, layerH, type); }