mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Move SacrificeKind
to Sacrificable
This commit is contained in:
parent
07f40806be
commit
fefcacef4b
2 changed files with 12 additions and 10 deletions
|
@ -2,6 +2,7 @@
|
||||||
extends Node
|
extends Node
|
||||||
class_name Sacrificable
|
class_name Sacrificable
|
||||||
|
|
||||||
|
|
||||||
## Emits [signal eaten] when eaten by an [Eater] whose acceptable diets contain this node's [field diet].
|
## 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.
|
## To add multiple possible [Edible] diets to an entity, add multiple [Edible] nodes to it.
|
||||||
|
@ -9,8 +10,18 @@ class_name Sacrificable
|
||||||
signal sacrificed
|
signal sacrificed
|
||||||
|
|
||||||
|
|
||||||
@export var type: Enums.MonsterType = Enums.MonsterType.Sheep
|
@export var type: SacrificeKind = SacrificeKind.Sheep
|
||||||
|
|
||||||
|
|
||||||
func sarcifice():
|
func sarcifice():
|
||||||
sacrificed.emit()
|
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,
|
||||||
|
}
|
||||||
|
|
9
enums.gd
9
enums.gd
|
@ -8,12 +8,3 @@ enum ZIndex {
|
||||||
Props = 0,
|
Props = 0,
|
||||||
Terrain = -10,
|
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,
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue