Add new resources and presenters for item pickups and effects

This commit is contained in:
2025-10-29 00:13:36 +01:00
parent 329a942de7
commit 87169b17ae
19 changed files with 151 additions and 8 deletions

View File

@@ -0,0 +1,10 @@
using Godot;
namespace CryptonymThunder.Code.Resources.Effects;
[GlobalClass]
public partial class ConsumeAmmoCostResource : EffectResource
{
[Export] public string AmmoId { get; set; } = "ammo_bullets";
[Export(PropertyHint.Range, "1,100,1")] public int Amount { get; set; } = 1;
}

View File

@@ -0,0 +1 @@
uid://b6argm77cho2t

View File

@@ -0,0 +1 @@
uid://dhcbayl5iwvf3

View File

@@ -8,4 +8,5 @@ public partial class PickupComponentResource : Resource
[Export] public string ItemId { get; set; }
[Export] public int Quantity { get; set; } = 1;
[Export] public bool IsInstantUse { get; set; } = false;
[Export] public Godot.Collections.Array<EffectResource> OnAcquireEffects { get; set; } = [];
}

View File

@@ -0,0 +1 @@
uid://cg8upylcrj8le

View File

@@ -9,6 +9,7 @@ public partial class WeaponResource : Resource
[Export] public float FireRate { get; set; } = 1.0f;
[ExportGroup("Effects")]
[Export] public Godot.Collections.Array<EffectResource> FireCosts { get; set; } = [];
[Export] public Godot.Collections.Array<EffectResource> OnFireEffects { get; set; } = [];
[Export] public Godot.Collections.Array<EffectResource> OnHitEffects { get; set; } = [];
}