Refactor pet action management: rename PetAction to PetActionGather, update related models and services, and enhance resource gathering logic.
This commit is contained in:
@@ -13,7 +13,8 @@ namespace pet_companion_api.Models
|
||||
public int Level { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public bool IsDead { get; set; }
|
||||
public PetAction PetAction { get; set; }
|
||||
|
||||
public PetActionGather PetAction { get; set; }
|
||||
public DateTime ActionSince { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,14 @@
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public enum PetAction
|
||||
{
|
||||
UNKNOWN,
|
||||
FEED,
|
||||
PLAY,
|
||||
SLEEP,
|
||||
}
|
||||
|
||||
public enum PetActionGather
|
||||
{
|
||||
IDLE,
|
||||
GATHERING_WISDOM,
|
@@ -5,8 +5,25 @@ namespace pet_companion_api.Models
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string[] Modifiers { get; set; }
|
||||
public List<Modifier> Modifiers { get; set; }
|
||||
public string Color { get; set; }
|
||||
public string Emoji { get; set; }
|
||||
public PetClass Class { get; set; }
|
||||
}
|
||||
|
||||
public class Modifier
|
||||
{
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Other property (unused atm)
|
||||
/// </summary>
|
||||
public string? Misc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Either `intelligence`, `strength` or `charisma`
|
||||
/// </summary>
|
||||
public string? Attribute { get; set; } // The attribute that the modifier affects (used by reflection)
|
||||
public float? Value { get; set; }
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@ namespace pet_companion_api.Models
|
||||
{
|
||||
public class PetUpdateActionRequest
|
||||
{
|
||||
public PetAction PetAction { get; set; }
|
||||
public PetAction? Action { get; set; }
|
||||
public PetActionGather? PetActionGather { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user