Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.Xna.Framework;
- using StardewValley;
- using StardewValley.BellsAndWhistles;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
- namespace CustomContentEngine.Critters
- {
- public class CritterEntry
- {
- public string Id { get; set; }
- public class SpriteData_
- {
- public string TextureName { get; set; }
- public int BaseFrame { get; set; }
- public int FrameWidth { get; set; }
- public int FrameHeight { get; set; }
- }
- public SpriteData_ SpriteData { get; set; } = new SpriteData_();
- public class Animation_
- {
- public class AnimationFrame_
- {
- public int Frame;
- public int Duration;
- }
- public List<AnimationFrame_> Frames = new List<AnimationFrame_>();
- }
- public Dictionary<string, Animation_> Animations { get; set; } = new Dictionary<string, Animation_>();
- public class SpawnCondition_
- {
- public Boolean Not { get; set; } = false;
- public string[] Seasons { get; set; } = new string[0];
- public string[] Locations { get; set; } = new string[0];
- public int MinTimeOfDay { get; set; } = -1;
- public int MaxTimeOfDay { get; set; } = -1;
- public double ChancePerTile { get; set; } = 1.0 / 15000;
- public bool RequireDarkOut { get; set; } = false;
- public bool AllowRain { get; set; } = false;
- public string ChildrenCombine { get; set; } = "and"; // Can also be xor, or, atleast<num>, exactly<num>
- public List<SpawnCondition_> Children { get; set; } = new List<SpawnCondition_>();
- public bool check( GameLocation loc ) { /*...*/ }
- }
- public List<SpawnCondition_> SpawnConditions { get; set; } = new List<SpawnCondition_>();
- public class SpawnLocation_
- {
- public string LocationType { get; set; } = "random"; // Can also be terrainfeature, and probably location as well
- //public Vector2 Offset { get; set; } = new Vector2();
- public string TerrainFeature { get; set; }
- public class ConditionEntry_
- {
- public bool Not { get; set; } = false;
- public double Chance { get; set; } = 1.0;
- public string Variable { get; set; }
- public bool RequireNotNull { get; set; }
- public string Is { get; set; }
- public string ValueEquals { get; set; }
- public string ChildrenCombine { get; set; } = "and";
- public List<ConditionEntry_> Children { get; set; } = new List<ConditionEntry_>();
- public bool check( object obj ) { /*...*/ }
- }
- public List<ConditionEntry_> Conditions { get; set; } = new List<ConditionEntry_>();
- public bool check(object obj) { /*...*/ }
- public Vector2? pickSpot( GameLocation loc ) { /*...*/ }
- }
- public List<SpawnLocation_> SpawnLocations { get; set; } = new List<SpawnLocation_>();
- public int SpawnAttempts { get; set; } = 3;
- public virtual bool check( GameLocation loc ) { /*...*/ }
- public virtual Vector2? pickSpot( GameLocation loc ) { /*...*/ }
- public virtual Critter makeCritter(Vector2 pos) { /*...*/ }
- internal static Dictionary<string, CritterEntry> critters = new Dictionary<string, CritterEntry>();
- public static void Register( CritterEntry entry ) { /*...*/ }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement