Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (obj.Name == "Chest")
- {
- Microsoft.Xna.Framework.Vector2 chestLocation = new Vector2();
- chestLocation = obj.TileLocation;
- //if (location.Objects.ContainsKey(chestLocation) && location.Objects[chestLocation].Is<ChestAccessor>())
- //{
- try
- {
- Storm.StardewValley.Wrapper.Chest obj2 = location.Objects[chestLocation].As<ChestAccessor, Chest>();
- savedChest.Add(obj2);
- } catch (Exception e)
- {
- Console.WriteLine();
- Console.WriteLine(e);
- Console.WriteLine();
- }
- //Debugger.Break();
- //find locations
- //debugging
- //chestLocation.X = obj.BoundingBox.X;
- //chestLocation.Y = obj.BoundingBox.Y;
- chestLocation.X = obj.BoundingBox.X / 64;
- chestLocation.Y = obj.BoundingBox.Y / 64;
- //debuging
- Console.WriteLine();
- Console.WriteLine(chestCounter1 + 1 + " individual saved chest information");
- try
- {
- Console.WriteLine(savedChest[chestCounter1].Items);
- }
- catch (Exception e)
- {
- Console.WriteLine();
- Console.WriteLine(e);
- Console.WriteLine();
- }
- Console.WriteLine(location.Name);
- //Console.WriteLine("TILELOCATION x is " + obj.TileLocation.X + ". y is " + obj.TileLocation.Y);
- //Console.WriteLine("BOUNDINGBOX x is " + obj.BoundingBox.X + ". y is " + obj.BoundingBox.Y);
- //Console.WriteLine("Width is " + obj.BoundingBox.Width + ". Height is " + obj.BoundingBox.Height);
- //Console.WriteLine();
- //Console.WriteLine("obj location at " + obj.BoundingBox.X + ", " + obj.BoundingBox.Y);
- //Console.WriteLine("obj location at " + obj.BoundingBox.X / 64 + ", " + obj.BoundingBox.Y / 64);
- savedChestLocations.Add(chestLocation);
- Console.WriteLine("----------------");
- Console.WriteLine("Finding chests and saving location at " + chestLocation.X + ", " + chestLocation.Y);
- Console.WriteLine("----------------");
- Console.WriteLine(savedChestLocations.Count + " total chests found");
- ++chestCounter1;
- //Debugger.Break();
- //}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement