/*****************************************
 * This file is automatically generated! *
 * Its contents will be overwritten on   *
 * the next build.                       *
 *                                       *
 * is_valid_types_gen.pl generates this. *
 *****************************************/

/**
 * Checks if the specified type is a valid one for a Crossfire object.
 *
 * @param type value to check.
 * @return 1 if the type is valid, 0 else.
 */
#include <global.h>
#include <libproto.h>
int is_type_valid(uint8_t type) {
    if (type >= OBJECT_TYPE_MAX)
        return 0;
    switch (type){
	case 11:
	case 12:
	case 19:
	case 25:
	case 35:
	case 38:
	case 44:
	case 47:
	case 61:
	case 63:
	case 76:
	case 78:
	case 81:
	case 84:
	case 86:
	case 88:
	case 89:
	case 96:
	case 97:
	case 107:
	case 108:
	case 110:
	case 117:
	case 118:
	case 119:
	case 120:
	case 125:
	case 126:
	case 127:
	case 128:
	case 129:
	case 131:
	case 132:
	case 133:
	case 134:
	case 135:
	case 136:
	case 137:
	case 140:
	case 141:
	case 142:
	case 143:
	case 144:
	case 145:
	case 146:
	case 147:
	case 148:
	case 149:
	case 151:
	case 152:
	case 153:
	    return 0;
    }
	return 1;
}
