How do i make sure that the compared enums are of same type?
Example: class Enums.gd:
class_name Enums
enum Armor {
FULL,
NAKED
}
enum Action {
ATTACK,
DEFEND
}
Now if i try to compare Enums.Action.ATTACK == Enums.Armor.FULL the result will be true ...
Now if i make a function that accepts only this type like
func _receive_action(action: Enums.Action)
Then if i call this function with incorrect enum then there is an error and that is good.
But if i emit signal with incorrect value there is no type check.
Maybe there is a way to enforce signal argument type?