Index: class.c ================================================================== --- class.c +++ class.c @@ -1890,10 +1890,15 @@ } else if(tokent==TF_CLOSE) { break; } else if(tokent==TF_INT) { if(tokenv<0 || tokenv>=cl->nimages) ParseError("Image number out of range\n"); cl->images[tokenv]|=0x8000; + } else if(Tokenf(TF_NAME) && !Tokenf(TF_MACRO) && tokenv==OP_MOD) { + nxttok(); + if(tokent!=TF_INT) ParseError("Expected ( or ) or number\n"); + if(tokenv<=0) ParseError("Zero or negative modulus is not allowed\n"); + for(i=0;inimages-tokenv;i++) if(cl->images[i]&0x8000) cl->images[i+tokenv]|=0x8000; } else { ParseError("Expected ( or ) or number\n"); } } } Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -416,10 +416,15 @@ that there are no default images. This specifies which images can be used in objects of this class which are initially present on the level (placed in the editor). If () is used, then this class is not available in the editor. If there is no (DefaultImage) block, all images are available. The (Image) block must come before this one. + The list can also contain the token "mod" followed by a positive number; + in this case, it will also add any images whose numbers are that many + more than the ones already specified and will repeat; for example, if + you write "(DefaultImage 1 mod 5)" then images 1, 6, 11, 16, 21, etc + are added to the list of default images. (Density ) Define the Density variable for this class. If you want the Density to be different in the editor, specify the value to use in the editor here, and then change the Density value in the INIT block.