1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-21 23:54:23 +00:00

Convert Sacrificable's enum into a StringName

Sigh, Godot displays an array of enums as ints...
This commit is contained in:
Steffo 2024-04-28 19:43:10 +02:00
parent 8fb258b493
commit 872ff3c6b6
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 2 additions and 11 deletions

View file

@ -10,18 +10,8 @@ class_name Sacrificable
signal sacrificed
@export var type: SacrificeKind = SacrificeKind.Sheep
@export var kind: StringName = &""
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,
}

View file

@ -229,6 +229,7 @@ blend_times = [&"drag_start", &"drag_loop", 0.5]
diet = &"Meat"
[node name="Sacrificable" parent="." instance=ExtResource("8_43m1b")]
kind = &"Sheep"
[node name="MovementSampler" parent="." instance=ExtResource("9_s5lod")]