diff options
Diffstat (limited to 'scripts/Map')
| -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); } } } |
