Added current quest interface + new quest template interface

This commit is contained in:
gotfishmakesticks 2023-11-16 14:29:14 +03:00
commit 008e74eba3
4 changed files with 169 additions and 2 deletions

View file

@ -15,6 +15,7 @@ var allow_shooting = true
var faction = "player"
var money : float = 1000
var quest : Quest = Quest.new()
var quest_completed : bool = false
signal destroyed
@ -26,7 +27,7 @@ func _ready():
secondary_slot.add_child(Game.get_weapon("SingleRocketMk1").instantiate())
quest.create(Quest.TYPE.ELIMINATION, 1, 100)
quest.create(Quest.TYPE.ELIMINATION, 2, 200)
func _process(_delta):
if hull.hp < 0: destroy()
@ -48,7 +49,7 @@ func add_quest(quest : Quest):
func kill_quest(success : bool):
if success:
money += quest.reward_money
quest_completed = true
quest.new = true
func timer_failed():