Quest taking and rejecting
This commit is contained in:
parent
8a40de576e
commit
c6d8ae8be0
12 changed files with 87 additions and 14 deletions
|
|
@ -14,8 +14,10 @@ var selected_node: Node2D = null
|
|||
var money: float = 1000.0
|
||||
## Base which was requested to dock last
|
||||
var docking_base: Base = null
|
||||
|
||||
## Items that player ship carries
|
||||
var cargo = {}
|
||||
## Current quest
|
||||
var quest: Quest = null
|
||||
|
||||
func destroy():
|
||||
super.destroy()
|
||||
|
|
@ -23,3 +25,6 @@ func destroy():
|
|||
docking_base.dock_ready()
|
||||
docking_base = null
|
||||
selected_node = null
|
||||
if quest != null:
|
||||
if Quest.Restriction.NoDeaths in quest.restrictions:
|
||||
quest.fail()
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ func _process(_delta) -> void:
|
|||
ship.shield.can_recharge_laser = false
|
||||
|
||||
func shoot() -> void:
|
||||
if ship is PlayerShip:
|
||||
if ship.quest != null:
|
||||
if Quest.Restriction.NoWeapon in ship.quest.restrictions:
|
||||
ship.quest.fail()
|
||||
for spawner in spawner_points:
|
||||
var projectile_instance = projectile.instantiate()
|
||||
ProjectileContainer.instance.add_child(projectile_instance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue