mirror of
https://github.com/Steffo99/hella-farm.git
synced 2025-02-16 09:03:58 +00:00
Convert Sacrificable
's enum into a StringName
Sigh, Godot displays an array of enums as ints...
This commit is contained in:
parent
8fb258b493
commit
872ff3c6b6
2 changed files with 2 additions and 11 deletions
|
@ -10,18 +10,8 @@ class_name Sacrificable
|
||||||
signal sacrificed
|
signal sacrificed
|
||||||
|
|
||||||
|
|
||||||
@export var type: SacrificeKind = SacrificeKind.Sheep
|
@export var kind: StringName = &""
|
||||||
|
|
||||||
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
|
|
|
@ -229,6 +229,7 @@ blend_times = [&"drag_start", &"drag_loop", 0.5]
|
||||||
diet = &"Meat"
|
diet = &"Meat"
|
||||||
|
|
||||||
[node name="Sacrificable" parent="." instance=ExtResource("8_43m1b")]
|
[node name="Sacrificable" parent="." instance=ExtResource("8_43m1b")]
|
||||||
|
kind = &"Sheep"
|
||||||
|
|
||||||
[node name="MovementSampler" parent="." instance=ExtResource("9_s5lod")]
|
[node name="MovementSampler" parent="." instance=ExtResource("9_s5lod")]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue