mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
26 lines
No EOL
578 B
C#
26 lines
No EOL
578 B
C#
using Cirno.Scripts.Resources;
|
|
using Godot;
|
|
using Godot.Collections;
|
|
|
|
namespace Cirno.Scripts.Interactables;
|
|
|
|
public partial class ItemPickup : Interactable
|
|
{
|
|
[Export] public Array<LootItem> LootTable = new Array<LootItem>();
|
|
|
|
public override bool Activate()
|
|
{
|
|
GD.Print("Attempting to Pickup Item");
|
|
|
|
if (!MeetsRequirements()) return false;
|
|
foreach (var item in LootTable)
|
|
{
|
|
_inventoryManager.AddItem(item);
|
|
}
|
|
|
|
// Delet This
|
|
QueueFree();
|
|
|
|
return true;
|
|
}
|
|
} |