public static void checkAndInjectDynamicObject(OverlaidDictionary objects, Vector2 key)
 {
     if (!(objects[key] is IBigCraftable) && wrappers.ContainsKey(objects[key].name))
     {
         IBigCraftableWrapper wrapper = wrappers[objects[key].name];
         objects[key] = (IBigCraftable)Activator.CreateInstance(wrapper.dynamicObjectType, objects[key], wrapper);
     }
 }
Ejemplo n.º 2
0
        public static void injectDynamicsInCurrentLocation()
        {
            OverlaidDictionary objects = Game1.currentLocation.objects;

            foreach (Vector2 key in objects.Keys)
            {
                IBigCraftableWrapper.checkAndInjectDynamicObject(objects, key);
            }
        }
Ejemplo n.º 3
0
 public static void removeDynamicsInAllLocations()
 {
     foreach (GameLocation location in Game1.locations)
     {
         OverlaidDictionary objects = location.objects;
         foreach (Vector2 key in objects.Keys)
         {
             IBigCraftableWrapper.checkAndRemoveDynamicObject(objects, key);
         }
     }
 }
Ejemplo n.º 4
0
        public IBigCraftable(StardewValley.Object baseObject, IBigCraftableWrapper wrapper)
            : base(
                baseObject.TileLocation,
                baseObject.ParentSheetIndex
                )
        {
            this.baseObject = baseObject;
            this.wrapper    = wrapper;

            this.animate();
        }
Ejemplo n.º 5
0
 public SeedBandit(StardewValley.Object baseObject, IBigCraftableWrapper wrapper)
     : base(baseObject, wrapper)
 {
 }
Ejemplo n.º 6
0
 public SeedBandit() : base()
 {
     this.wrapper = IBigCraftableWrapper.getWrapper("Seed Bandit");
     this.animate();
 }
 public static void addWrapper(IBigCraftableWrapper wrapper)
 {
     wrappers.Add(wrapper.name, wrapper);
 }
Ejemplo n.º 8
0
 public SeedMachine() : base()
 {
     this.wrapper = IBigCraftableWrapper.getWrapper("Seed Machine");
     this.animate();
 }