using Godot; using Newlon.Components.GUI.Seedpackets; public partial class AlmanachGrid : GridContainer { private PackedScene _plantCard; [Export] private bool _zombies; public override void _Ready() { _plantCard = ResourceLoader.Load("res://scenes/gui/seedpacket.tscn"); if (_zombies) { foreach (var resource in GameRegistry.GetZombies()) { Seedpacket slot = _plantCard.Instantiate(); AddChild(slot); slot.SetResource(resource); slot.SetHandler(new AlmanachHandler(slot)); } } else { foreach (var resource in GameRegistry.GetPlants()) { Seedpacket slot = _plantCard.Instantiate(); AddChild(slot); slot.SetResource(resource); slot.SetHandler(new AlmanachHandler(slot)); } } } }