Quest system done

This commit is contained in:
2ndbeam 2024-06-08 13:21:45 +03:00
commit 231ff2bb1d
10 changed files with 52 additions and 9 deletions

View file

@ -71,3 +71,13 @@ func find_base_by_name(base_name: String) -> Base:
return base
return null
## Progress by elimination quest if destroyed ship is of required type
func on_ship_destroyed(ship: Ship):
if player_ship == null:
return
if player_ship.quest == null:
return
if player_ship.quest.type != Quest.Type.Elimination:
return
if player_ship.quest.data["target_class"] == ship.id:
player_ship.quest.do_progress()