public override void _Ready() { _lootTable.SetRandom(Main.RNG); foreach (var child in GetChildren()) { if (child is LootTableItem li) { _lootTable.AddItem(li, li.Weight); } } if (_healthComponentPath != null) { GetNodeOrNull <HealthComponent>(_healthComponentPath)?.Connect(nameof(HealthComponent.HealthDepleted), this, nameof(OnHealthDepleted)); } }