diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-13 11:06:46 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-13 11:06:46 -0300 |
| commit | 539fd4820f37aa54df8878091db9680d89ee027a (patch) | |
| tree | 41f9f5d6aa123058e3549c1baba4155fa5a85279 /scripts/Map/DungeonGenerator.cs | |
| parent | b8962990ddb75b874a49c83d8eeaba7b7e45c196 (diff) | |
pergaminho
Diffstat (limited to 'scripts/Map/DungeonGenerator.cs')
| -rw-r--r-- | scripts/Map/DungeonGenerator.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/Map/DungeonGenerator.cs b/scripts/Map/DungeonGenerator.cs index 9a44d33..6f239ac 100644 --- a/scripts/Map/DungeonGenerator.cs +++ b/scripts/Map/DungeonGenerator.cs @@ -22,7 +22,8 @@ public partial class DungeonGenerator : Node ]; private static readonly Godot.Collections.Array<ConsumableItemDefinition> items = [ - GD.Load<HealingConsumableDefinition>("res://assets/definitions/Items/small_healing_potion.tres") + GD.Load<HealingConsumableDefinition>("res://assets/definitions/Items/small_healing_potion.tres"), + GD.Load<ScrollConsumableDefinition>("res://assets/definitions/Items/mana_bolt_scroll.tres") ]; #endregion @@ -274,7 +275,6 @@ public partial class DungeonGenerator : Node Rng.RandiRange(room.Position.Y, room.End.Y - 1) ); - // Só podemos colocar um ator por ponto no espaço. bool canPlace = true; foreach (Entity entity in data.Entities) { @@ -293,6 +293,10 @@ public partial class DungeonGenerator : Node { HealingConsumable item = new(position, data, hcDefinition); data.InsertEntity(item); + } else if (definition is ScrollConsumableDefinition scroll) + { + ScrollConsumable item = new(position, data, scroll); + data.InsertEntity(item); } } } |
