if ai_component and save_data.has("ai_component"):
var ai_data: Dictionary = save_data["ai_component"]
if ai_data["type"] == "ConfusedEnemyAIComponent":
var confused_enemy_ai := ConfusedEnemyAIComponent.new(ai_data["turns_remaining"])
add_child(confused_enemy_ai)
...
The third row " if ai_data["type"] == "ConfusedEnemyAIComponent": "
corresponding
<confused_enemy_ai_component.gd -> get_save_data()> " "type": "ConfusedEnemyAI", "
...
" if ai_data["type"] == "ConfusedEnemyAIComponent": "
in the <entity.gd -> restore()> function should be changed to
" if ai_data["type"] == "ConfusedEnemyAI": "
(This is the first time I have raised issues on github, please forgive me if the format is wrong😊)
<entity.gd -> restore(save_data: Dictionary)> ...
... The third row " if ai_data["type"] == "ConfusedEnemyAIComponent": " corresponding <confused_enemy_ai_component.gd -> get_save_data()> " "type": "ConfusedEnemyAI", " ...
...
" if ai_data["type"] == "ConfusedEnemyAIComponent": " in the <entity.gd -> restore()> function should be changed to " if ai_data["type"] == "ConfusedEnemyAI": "
(This is the first time I have raised issues on github, please forgive me if the format is wrong😊)