2018-03-04 23:53:55 +08:00
|
|
|
|
using CustomNPCFramework.Framework.Enums;
|
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace CustomNPCFramework.Framework.Graphics
|
|
|
|
|
{
|
2018-03-19 18:32:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// An expanded Asset info class that deals with seasons and genders.
|
|
|
|
|
/// </summary>
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public class ExtendedAssetInfo :AssetInfo
|
|
|
|
|
{
|
2018-03-19 18:32:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The genders this part is associated with. 0=Male, 1=female, 2=other.
|
|
|
|
|
/// </summary>
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public Genders gender;
|
2018-03-19 18:32:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of seasons where this part can be displayed
|
|
|
|
|
/// </summary>
|
2018-03-17 19:04:04 +08:00
|
|
|
|
public List<Seasons> seasons=new List<Seasons>();
|
2018-03-19 18:32:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The part type to be used for this asset such as hair, eyes, etc.
|
|
|
|
|
/// </summary>
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public PartType type;
|
|
|
|
|
|
2018-03-19 18:32:00 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Constructor.
|
|
|
|
|
/// </summary>
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public ExtendedAssetInfo()
|
|
|
|
|
{
|
2018-03-17 19:04:04 +08:00
|
|
|
|
this.seasons = new List<Seasons>();
|
2018-03-04 23:53:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Constructor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name"></param>
|
|
|
|
|
/// <param name="assetSize"></param>
|
|
|
|
|
/// <param name="randomizeOnLoad"></param>
|
|
|
|
|
/// <param name="Gender">The type of gender this asset will be associated with.</param>
|
|
|
|
|
/// <param name="Season">The type of season this asset will be associated with.</param>
|
2018-03-05 06:32:59 +08:00
|
|
|
|
public ExtendedAssetInfo(string name, NamePairings StandingAssetPaths, NamePairings MovingAssetPaths, NamePairings SwimmingAssetPaths, NamePairings SittingAssetPaths, Vector2 assetSize, bool randomizeOnLoad, Genders Gender, List<Seasons> Season, PartType Type): base(name,StandingAssetPaths,MovingAssetPaths,SwimmingAssetPaths,SittingAssetPaths, assetSize, randomizeOnLoad)
|
2018-03-04 23:53:55 +08:00
|
|
|
|
{
|
|
|
|
|
this.gender = Gender;
|
|
|
|
|
this.seasons = Season;
|
2018-03-17 19:04:04 +08:00
|
|
|
|
if (this.seasons == null) this.seasons = new List<Seasons>();
|
2018-03-04 23:53:55 +08:00
|
|
|
|
this.type = Type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Save the json to a certain location.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path"></param>
|
|
|
|
|
public new void writeToJson(string path)
|
|
|
|
|
{
|
|
|
|
|
Class1.ModHelper.WriteJsonFile<ExtendedAssetInfo>(path, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Read the json from a certain location.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public new static ExtendedAssetInfo readFromJson(string path)
|
|
|
|
|
{
|
|
|
|
|
return Class1.ModHelper.ReadJsonFile<ExtendedAssetInfo>(path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|