Advertisement
spacechase0

Untitled

Jun 16th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.69 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using StardewValley;
  3. using StardewValley.BellsAndWhistles;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10.  
  11. namespace CustomContentEngine.Critters
  12. {
  13.     public class CritterEntry
  14.     {
  15.         public string Id { get; set; }
  16.         public class SpriteData_
  17.         {
  18.             public string TextureName { get; set; }
  19.             public int BaseFrame { get; set; }
  20.             public int FrameWidth { get; set; }
  21.             public int FrameHeight { get; set; }
  22.         }
  23.         public SpriteData_ SpriteData { get; set; } = new SpriteData_();
  24.  
  25.         public class Animation_
  26.         {
  27.             public class AnimationFrame_
  28.             {
  29.                 public int Frame;
  30.                 public int Duration;
  31.             }
  32.  
  33.             public List<AnimationFrame_> Frames = new List<AnimationFrame_>();
  34.         }
  35.         public Dictionary<string, Animation_> Animations { get; set; } = new Dictionary<string, Animation_>();
  36.  
  37.         public class SpawnCondition_
  38.         {
  39.             public Boolean Not { get; set; } = false;
  40.             public string[] Seasons { get; set; } = new string[0];
  41.             public string[] Locations { get; set; } = new string[0];
  42.             public int MinTimeOfDay { get; set; } = -1;
  43.             public int MaxTimeOfDay { get; set; } = -1;
  44.             public double ChancePerTile { get; set; } = 1.0 / 15000;
  45.             public bool RequireDarkOut { get; set; } = false;
  46.             public bool AllowRain { get; set; } = false;
  47.             public string ChildrenCombine { get; set; } = "and"; // Can also be xor, or, atleast<num>, exactly<num>
  48.             public List<SpawnCondition_> Children { get; set; } = new List<SpawnCondition_>();
  49.  
  50.             public bool check( GameLocation loc ) { /*...*/ }
  51.         }
  52.         public List<SpawnCondition_> SpawnConditions { get; set; } = new List<SpawnCondition_>();
  53.  
  54.         public class SpawnLocation_
  55.         {
  56.             public string LocationType { get; set; } = "random"; // Can also be terrainfeature, and probably location as well
  57.             //public Vector2 Offset { get; set; } = new Vector2();
  58.             public string TerrainFeature { get; set; }
  59.  
  60.             public class ConditionEntry_
  61.             {
  62.                 public bool Not { get; set; } = false;
  63.  
  64.                 public double Chance { get; set; } = 1.0;
  65.                 public string Variable { get; set; }
  66.                 public bool RequireNotNull { get; set; }
  67.                 public string Is { get; set; }
  68.                 public string ValueEquals { get; set; }
  69.  
  70.                 public string ChildrenCombine { get; set; } = "and";
  71.                 public List<ConditionEntry_> Children { get; set; } = new List<ConditionEntry_>();
  72.  
  73.                 public bool check( object obj ) { /*...*/ }
  74.             }
  75.             public List<ConditionEntry_> Conditions { get; set; } = new List<ConditionEntry_>();
  76.            
  77.             public bool check(object obj) { /*...*/ }
  78.  
  79.             public Vector2? pickSpot( GameLocation loc ) { /*...*/ }
  80.         }
  81.         public List<SpawnLocation_> SpawnLocations { get; set; } = new List<SpawnLocation_>();
  82.  
  83.         public int SpawnAttempts { get; set; } = 3;
  84.  
  85.         public virtual bool check( GameLocation loc ) { /*...*/ }
  86.  
  87.         public virtual Vector2? pickSpot( GameLocation loc ) { /*...*/ }
  88.  
  89.         public virtual Critter makeCritter(Vector2 pos) { /*...*/ }
  90.  
  91.         internal static Dictionary<string, CritterEntry> critters = new Dictionary<string, CritterEntry>();
  92.         public static void Register( CritterEntry entry ) { /*...*/ }
  93.     }
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement