Quest save/load + beta tag for prereleases

This commit is contained in:
gotfishmakesticks 2023-11-16 17:51:07 +03:00
commit 33bcd65c53
5 changed files with 25 additions and 2 deletions

View file

@ -50,6 +50,16 @@ func _ready():
var weapon_inst = Game.get_weapon(save['secondaryweapon']).instantiate()
weapon_inst.id = save['secondaryweapon']
ship.secondary_slot.add_child(weapon_inst)
if save.has('quest'):
var data = save['quest']
var type = data['type'] as Quest.TYPE
var restrictions : Array[Quest.RESTRICTIONS] = []
for rest in data['restrictions']:
restrictions.append(rest as Quest.RESTRICTIONS)
ship.quest.create(type, data['progress_max'], data['reward_money'], restrictions, data['data'])
if data['got_reward']:
ship.quest.new = true
ship.quest_completed = true
func addtargetlist(body : Node2D):
if !can_target.has(body):