mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 10:55:55 +00:00
Separated ammo and notifications from hud
This commit is contained in:
parent
d644cece7f
commit
46c433e5f7
39 changed files with 258 additions and 86 deletions
|
|
@ -21,7 +21,9 @@ public partial class LootItem : Resource
|
|||
[Export] public int Max;
|
||||
[Export] public bool PickupIfMaxed;
|
||||
[Export] public bool ConsumeOnUse;
|
||||
[Export] public UiItemType UiType;
|
||||
|
||||
[Export(PropertyHint.Flags, "Icon,Count,Ammo,Energy")]
|
||||
public UiItemType UiType { get; set; } = 0;
|
||||
[Export] public bool Selectable;
|
||||
[Export] public bool AutoPickup { get; private set; } = false;
|
||||
[Export] public Texture2D InventorySprite;
|
||||
|
|
@ -42,11 +44,4 @@ public partial class LootItem : Resource
|
|||
|
||||
return spawnedItem;
|
||||
}
|
||||
}
|
||||
|
||||
public enum UiItemType
|
||||
{
|
||||
NoUI,
|
||||
Icon,
|
||||
IconText
|
||||
}
|
||||
13
Scripts/Resources/UiItemType.cs
Normal file
13
Scripts/Resources/UiItemType.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace Cirno.Scripts.Resources;
|
||||
|
||||
[Flags]
|
||||
public enum UiItemType
|
||||
{
|
||||
Icon = 1 << 1,
|
||||
Count = 1 << 2,
|
||||
Ammo = 1 << 3,
|
||||
Energy = 1 << 4,
|
||||
|
||||
}
|
||||
1
Scripts/Resources/UiItemType.cs.uid
Normal file
1
Scripts/Resources/UiItemType.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://daol2o7sgpqio
|
||||
Loading…
Add table
Add a link
Reference in a new issue