diff --git a/behaviours/sacrificable.gd b/behaviours/sacrificable.gd index 6b9d772..8d5bdde 100644 --- a/behaviours/sacrificable.gd +++ b/behaviours/sacrificable.gd @@ -2,6 +2,7 @@ extends Node class_name Sacrificable + ## Emits [signal eaten] when eaten by an [Eater] whose acceptable diets contain this node's [field diet]. ## ## To add multiple possible [Edible] diets to an entity, add multiple [Edible] nodes to it. @@ -9,8 +10,18 @@ class_name Sacrificable signal sacrificed -@export var type: Enums.MonsterType = Enums.MonsterType.Sheep +@export var type: SacrificeKind = SacrificeKind.Sheep func sarcifice(): sacrificed.emit() + + +enum SacrificeKind { + None = 0, # I hate this but in GDScript enums can't be nulls and there aren't any sum types like in rust so this is all we can do + Sheep, + Imp, + Chupacabra, + Watcher, + Cthulhu, +} diff --git a/enums.gd b/enums.gd index 8380198..1e3f301 100644 --- a/enums.gd +++ b/enums.gd @@ -8,12 +8,3 @@ enum ZIndex { Props = 0, Terrain = -10, } - -enum MonsterType { - None = 0, # I hate this but in GDScript enums can't be nulls and there aren't any sum types like in rust so this is all we can do - Sheep, - Imp, - Chupacapra, - Watcher, - Chtulu, -}