From dc0be2afe62dbe35988b9835d2a5287fb7169f7e Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:41:54 -0700 Subject: [PATCH 1/2] Added Level Completion Tracking to PlayerInventory.gd Newline added to line 8 --- .../Scripts/Inventory GUI/PlayerInventory.gd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd b/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd index 7345d89f..2c7c6931 100644 --- a/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd +++ b/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd @@ -5,6 +5,7 @@ const SlotClass = preload("res://Scripts/Inventory GUI/Slot.gd") const ItemClass = preload("res://Scripts/Inventory GUI/Items.gd") #const for inventory slots const INVENTORYSLOTS = 15 + #initial inventory data var inventory ={ 0: ["Iron Sword", 1], @@ -14,6 +15,18 @@ var inventory ={ 3: ["Large Health Potion", 5], #can add more starting items } + +#level completion data (Each time you beat a level, increment the count) + +var levels = { + 0: ["level_1" , 0], # Should be unlocked by default + 1: ["level_2", 0], # Unlock if level_1 count > 0 + 2: ["level_3", 0], # Unlock if level_2 count > 0 + + # ... + # N: ["level_(n+1)", 0], # Unlock if level_n count > 0 +} + var equip = { #0: [ , ], From 3c65eef77799618c20ac81ad2634000e4bd52f1d Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:45:26 -0700 Subject: [PATCH 2/2] Changed levels naming scheme to match MapScene files in PlayerInventory.gd level_n -> Leveln --- Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd b/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd index 2c7c6931..19ec82d3 100644 --- a/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd +++ b/Game/LifeQuest/Scripts/Inventory GUI/PlayerInventory.gd @@ -19,12 +19,12 @@ var inventory ={ #level completion data (Each time you beat a level, increment the count) var levels = { - 0: ["level_1" , 0], # Should be unlocked by default - 1: ["level_2", 0], # Unlock if level_1 count > 0 - 2: ["level_3", 0], # Unlock if level_2 count > 0 + 0: ["Level1" , 0], # Should be unlocked by default + 1: ["Level2", 0], # Unlock if Level1 count > 0 + 2: ["Level3", 0], # Unlock if Level2 count > 0 # ... - # N: ["level_(n+1)", 0], # Unlock if level_n count > 0 + # N: ["Level(n+1)", 0], # Unlock if Leveln count > 0 } var equip = {