mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 12:45:55 +00:00
Update Weapon in status
This commit is contained in:
parent
8f9e4f0bb9
commit
83d3cc7835
10 changed files with 45 additions and 15 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Godot;
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace Cirno.Scripts.Resources;
|
||||
|
|
@ -8,4 +9,9 @@ public partial class ItemsDatabase : Resource
|
|||
{
|
||||
[Export]
|
||||
public Array<LootItem> LootItems { get; set; } = new();
|
||||
|
||||
public LootItem GetLootItem(string itemName)
|
||||
{
|
||||
return LootItems.FirstOrDefault(x => x.ItemKey == itemName);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ namespace Cirno.Scripts.Resources;
|
|||
public partial class LootItem : Resource
|
||||
{
|
||||
[Export] public StringName ItemName { get; set; }
|
||||
[Export] public StringName ShortName { get; set; }
|
||||
[Export] public StringName ItemDescription { get; set; }
|
||||
[Export] public StringName ItemKey { get; set; }
|
||||
[Export] public ItemTypes Item;
|
||||
|
|
@ -19,8 +20,8 @@ public partial class LootItem : Resource
|
|||
[Export] public UiItemType UiType;
|
||||
[Export] public bool Selectable;
|
||||
[Export] public Texture2D InventorySprite;
|
||||
[Export] public SpriteFrames WorldSprite;
|
||||
[Export] public PackedScene HudItemScene;
|
||||
//[Export] public SpriteFrames WorldSprite;
|
||||
//[Export] public PackedScene HudItemScene;
|
||||
[Export(PropertyHint.File)] public StringName DropScenePath { get; private set; } // Has to be a string path to avoid recursion issues
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue