So I'm trying to get a neon light to spawn on the workcart, and be powered. I have figured out how to spawn it in, but not how to give it power? Anyone got advice?
Powering up a spawned electrical item
Change entity flag to IsOn
Is there a way to see a list of those flags?
You can view a complete list of flags in an IDE that exposes assembly metadata, or by using a decompiler. If you are not already using a decompiler, you should start because it will not only allow you to answer many questions on your own, but it will also give you much deeper insight into how the game works, which helps you build solutions that are more effective/stable based on the game's specific implementation.
Electrical entities primarily use the BaseEntity.Flags.Reserved8 flag, which is also aliased by IOEntity.Flag_HasPower. Some entities that can be toggled, such as a switch, will additionally use the BaseEntity.Flags.On flag, which the aforementioned IsOn method checks for. It's also used by some non-electrical entities such as furnaces.
You can also power an entity indirectly by calling ioEntity.UpdateFromInput(amount, slot) which is what the game calls behind the scenes when you plug something in, or when a plugged in electrical source changes it's power output. This will only work if you specify enough power. This works by toggling the Reserved8 flag behind the scenes.