Implementation of saving inventory items (had to resturcture texture loading)
This commit is contained in:
@@ -1,31 +1,44 @@
|
||||
using Godot;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
[GlobalClass]
|
||||
[Meta, Id("accessory_stat_type")]
|
||||
public partial class AccessoryStats : InventoryItemStats
|
||||
{
|
||||
[Export]
|
||||
[Save("accessory_atk_up")]
|
||||
public int ATKUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_def_up")]
|
||||
public int DEFUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_luck_up")]
|
||||
public double LuckUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_max_hp_up")]
|
||||
public int MaxHPUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_max_vt_up")]
|
||||
public int MaxVTUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
public Godot.Collections.Array<AccessoryTag> AccessoryTags { get; set; } = new Godot.Collections.Array<AccessoryTag>();
|
||||
[Save("accessory_tag")]
|
||||
public AccessoryTag AccessoryTag { get; set; } = AccessoryTag.None;
|
||||
}
|
||||
|
||||
public enum AccessoryTag
|
||||
{
|
||||
None,
|
||||
HalfVTConsumption,
|
||||
StatusEffectImmunity
|
||||
}
|
||||
|
||||
[JsonSerializable(typeof(AccessoryTag))]
|
||||
public partial class AccessoryTagEnumContext : JsonSerializerContext;
|
||||
|
||||
Reference in New Issue
Block a user