mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
26 lines
No EOL
513 B
C#
26 lines
No EOL
513 B
C#
using Cirno.Scripts.Resources;
|
|
using Godot;
|
|
using Godot.Collections;
|
|
|
|
namespace Cirno.Scripts;
|
|
|
|
public partial class Chest : Interactable
|
|
{
|
|
|
|
[Export] public Array<LootItem> LootTable = new Array<LootItem>();
|
|
|
|
public override void Activate()
|
|
{
|
|
if (!MeetsRequirements()) return;
|
|
foreach (var item in LootTable)
|
|
{
|
|
_inventoryManager.AddItem(item.Item, item.Amount);
|
|
}
|
|
}
|
|
|
|
public override void _Ready()
|
|
{
|
|
base._Ready();
|
|
}
|
|
|
|
} |