I guess this is a leftover from old quake code where you could carry many weapons, so the weapons in your inventory are stored in a bitfield, one bit per weapon. This bitfield is split over 2 16-bit ints, so you can have max 32 weapons. The code just combines the two 16-bit fields into a 32-bit field, adds the bit for the new weapon and splits it again into two 16-bit fields. Then it adds any bits to the STAT_SLOTS required for the weapon. The STAT_SLOTS are used to make certain combinations impossible, like BSUIT+HELMET, but in Trem all weapons except blaster use the same slot, so the bit field stuff is really not needed and has been removed in 1.2.
If you need more weapons, there are a few numbers (like 4 or 5) left in enum weapon_t. If this isn't enough I would think about reusing identical numbers for alien and human weapons. That would require a game and cgame change, but adding another stat slot means you need a new client and server or you have to remove one of the other stats.