Enumerations in blocks!

Have you every wanted enums in blocks? To be able to save the state of your player or game, but as a number? Introducing enum-blocks!

blocks it adds:

  • setEnumVar / setEnumVarStatement - sets/adds a key to an enum, with an optional number (details to last+1).
  • getEnumVar - gets the number assigned to a key in an enum.
  • enumVar - same as getEnumVar, but if the key doesn’t exist, it will create it for you.
  • enumStr - gets the name of a key, which normal enums do not have.

test projects (same thing but different code, the first uses set/getEnumVar while the second uses enumVar):