Quest system done
This commit is contained in:
parent
9bff79e019
commit
231ff2bb1d
10 changed files with 52 additions and 9 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue