TerryCavanagh / VVVVVV

The source code to VVVVVV! http://thelettervsixtim.es/
Other
7k stars 559 forks source link

Convert entity `type`s to an enum #1007

Open AllyTally opened 1 year ago

AllyTally commented 1 year ago

Changes:

In an effort to remove magic numbers, I've given every entity type a name. Hopefully I didn't miss anywhere.

Legal Stuff:

By submitting this pull request, I confirm that...

InfoTeddy commented 1 year ago

This has conflicts.

Since I can't test this due to conflicts, may I ask what happens if you spawn an invalid entry with createentity?

AllyTally commented 1 year ago

may I ask what happens if you spawn an invalid entry with createentity?

It spawns the default entity, being the entity which takes player input, does not have a speed cap, uses tile 0, is cyan, etc. Commonly known as a "glitchy Viridian".

InfoTeddy commented 1 year ago

So I don't think this was known before, but if you createentity 100, that invalid entity is still treated as a teleporter by entityclass::getteleporter, and can, for example, fling Viridian out of it with teleporter gamestates.

I don't think any custom levels use this, though.