Fixed Revitalize to be compilable again so I can extract the code and make it into other smaller mods.

This commit is contained in:
2018-01-16 14:34:10 -08:00
parent 34c3326dd6
commit efe185e76d
21 changed files with 121 additions and 118 deletions

View File

@ -22,6 +22,7 @@ namespace Revitalize.Draw
public static void drawAllObjects() public static void drawAllObjects()
{ {
/*
foreach (var v in Lists.DecorationsToDraw) foreach (var v in Lists.DecorationsToDraw)
{ {
if (Game1.player.currentLocation == v.thisLocation) if (Game1.player.currentLocation == v.thisLocation)
@ -29,7 +30,7 @@ namespace Revitalize.Draw
v.draw(Game1.spriteBatch,(int)v.tileLocation.X,(int)v.tileLocation.Y); v.draw(Game1.spriteBatch,(int)v.tileLocation.X,(int)v.tileLocation.Y);
} }
} }
*/
} }
public static void drawAllFurniture() public static void drawAllFurniture()
@ -38,6 +39,7 @@ namespace Revitalize.Draw
//int i = 0; //int i = 0;
SpriteBatch b = Game1.spriteBatch; SpriteBatch b = Game1.spriteBatch;
b.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, (DepthStencilState)null, (RasterizerState)null); b.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, (DepthStencilState)null, (RasterizerState)null);
/*
foreach (var v in Lists.DecorationsToDraw) foreach (var v in Lists.DecorationsToDraw)
{ {
//Log.Async(i); //Log.Async(i);
@ -48,6 +50,7 @@ namespace Revitalize.Draw
} }
} }
b.End(); b.End();
*/
} }
} }
} }

View File

@ -145,9 +145,9 @@ namespace Revitalize.Menus
} }
else else
{ {
if (this.pixels == null) Log.AsyncC("this pixels null"); if (this.pixels == null) //Log.AsyncC("this pixels null");
if (CanvasObject == null) Log.AsyncC("cnvas object is null"); if (CanvasObject == null) //Log.AsyncC("cnvas object is null");
if (CanvasObject.pixels == null) Log.AsyncC("this canvas object ==null"); if (CanvasObject.pixels == null) //Log.AsyncC("this canvas object ==null");
this.pixels = CanvasObject.pixels; this.pixels = CanvasObject.pixels;
} }

View File

@ -82,9 +82,9 @@ namespace Revitalize
StardewModdingAPI.Events.ControlEvents.KeyPressed += ShopCall; StardewModdingAPI.Events.ControlEvents.KeyPressed += ShopCall;
StardewModdingAPI.Events.ControlEvents.MouseChanged += ControlEvents_MouseChanged; StardewModdingAPI.Events.ControlEvents.MouseChanged += ControlEvents_MouseChanged;
StardewModdingAPI.Events.GameEvents.UpdateTick +=gameMenuCall; StardewModdingAPI.Events.GameEvents.UpdateTick +=gameMenuCall;
StardewModdingAPI.Events.GameEvents.GameLoaded += GameEvents_GameLoaded; StardewModdingAPI.Events.SaveEvents.AfterLoad += GameEvents_GameLoaded;
StardewModdingAPI.Events.GameEvents.OneSecondTick += MapWipe; StardewModdingAPI.Events.GameEvents.OneSecondTick += MapWipe;
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += Util.ResetAllDailyBooleans; StardewModdingAPI.Events.TimeEvents.AfterDayStarted+= Util.ResetAllDailyBooleans;
StardewModdingAPI.Events.SaveEvents.BeforeSave += SaveEvents_BeforeSave; StardewModdingAPI.Events.SaveEvents.BeforeSave += SaveEvents_BeforeSave;
StardewModdingAPI.Events.SaveEvents.AfterSave += SaveEvents_AfterSave; StardewModdingAPI.Events.SaveEvents.AfterSave += SaveEvents_AfterSave;
StardewModdingAPI.Events.SaveEvents.AfterLoad += SaveEvents_AfterSave; StardewModdingAPI.Events.SaveEvents.AfterLoad += SaveEvents_AfterSave;
@ -234,19 +234,19 @@ namespace Revitalize
if (R.name == "Town" || R.name == "town") if (R.name == "Town" || R.name == "town")
{ {
Log.AsyncO("Adding Town"); //Log.AsyncO("Adding Town");
// R = new ModTown(v.Map, v.name); // R = new ModTown(v.Map, v.name);
} }
newLoc.Add(R); newLoc.Add(R);
Log.AsyncC("DONE1"); //Log.AsyncC("DONE1");
} }
Game1.locations.Clear(); Game1.locations.Clear();
foreach (var v in newLoc) foreach (var v in newLoc)
{ {
Game1.locations.Add(v); Game1.locations.Add(v);
Log.AsyncC("DONE2"); //Log.AsyncC("DONE2");
} }
Log.AsyncC("DONE"); //Log.AsyncC("DONE");
mapWipe = false; mapWipe = false;
} }
@ -312,7 +312,7 @@ namespace Revitalize
{ {
if (e.KeyPressed.ToString() == "J") if (e.KeyPressed.ToString() == "J")
{ {
Log.AsyncC("Mouse Position " + Game1.getMousePosition()); //Log.AsyncC("Mouse Position " + Game1.getMousePosition());
} }
if (e.KeyPressed.ToString() == "O") if (e.KeyPressed.ToString() == "O")
@ -337,8 +337,8 @@ namespace Revitalize
objShopList.Add(new TestMachine(3, Vector2.Zero, Util.invertColor(LightColors.White), LightColors.White, false, 9, true)); objShopList.Add(new TestMachine(3, Vector2.Zero, Util.invertColor(LightColors.White), LightColors.White, false, 9, true));
objShopList.Add(new SpriteFontObject(0, Vector2.Zero, font.path, Color.White)); objShopList.Add(new SpriteFontObject(0, Vector2.Zero, font.path, Color.White));
objShopList.Add(new Decoration(1391, Vector2.Zero)); objShopList.Add(new Decoration(1391, Vector2.Zero));
objShopList.Add(new ModularDecoration(1120, Vector2.Zero,"VanillaFurniture")); //objShopList.Add(new ModularDecoration(1120, Vector2.Zero,"VanillaFurniture"));
objShopList.Add(new ModularDecoration(0, Vector2.Zero, "VanillaFurniture")); //objShopList.Add(new ModularDecoration(0, Vector2.Zero, "VanillaFurniture"));
objShopList.Add(new Magic.Alchemy.Objects.BagofHolding(0, Vector2.Zero, new List<List<Item>>() objShopList.Add(new Magic.Alchemy.Objects.BagofHolding(0, Vector2.Zero, new List<List<Item>>()
{ {
new List<Item>() new List<Item>()
@ -394,7 +394,7 @@ namespace Revitalize
} }
foreach(var v in trash) foreach(var v in trash)
{ {
Log.AsyncC("TRASH"); //Log.AsyncC("TRASH");
objShopList.Remove(v); objShopList.Remove(v);
} }
@ -440,8 +440,8 @@ namespace Revitalize
if (e.KeyPressed.ToString() == "J") if (e.KeyPressed.ToString() == "J")
{ {
Log.AsyncC("Player Position " + Game1.player.getTileLocation()); //Log.AsyncC("Player Position " + Game1.player.getTileLocation());
Log.AsyncC("Mouse Position " + Game1.currentCursorTile); //Log.AsyncC("Mouse Position " + Game1.currentCursorTile);
} }
} }

View File

@ -622,11 +622,11 @@ namespace Revitalize
public new bool performAction(string action, StardewValley.Farmer who, Location tileLocation) public new bool performAction(string action, StardewValley.Farmer who, Location tileLocation)
{ {
Log.AsyncG("WHY???"); //Log.AsyncG("WHY???");
Log.AsyncC(action); //Log.AsyncC(action);
Log.AsyncM(who); //Log.AsyncM(who);
Log.AsyncO(tileLocation); //Log.AsyncO(tileLocation);
if (action != null && who.IsMainPlayer) if (action != null && who.IsMainPlayer)
@ -638,7 +638,7 @@ namespace Revitalize
string text = array[0]; string text = array[0];
Log.AsyncG(text); //Log.AsyncG(text);
@ -2280,7 +2280,7 @@ namespace Revitalize
*/ */
public override bool checkAction(Location tileLocation, xTile.Dimensions.Rectangle viewport, StardewValley.Farmer who) public override bool checkAction(Location tileLocation, xTile.Dimensions.Rectangle viewport, StardewValley.Farmer who)
{ {
Log.AsyncG("BASLLS"); //Log.AsyncG("BASLLS");
if (this.currentEvent != null && this.currentEvent.isFestival) if (this.currentEvent != null && this.currentEvent.isFestival)
{ {

View File

@ -76,7 +76,7 @@ namespace Revitalize.Magic.Alchemy.Objects
this.inventory = InventoriesToAdd[0]; this.inventory = InventoriesToAdd[0];
this.inventory.Capacity = InventoriesToAdd[0].Capacity; this.inventory.Capacity = InventoriesToAdd[0].Capacity;
// this.allInventoriesCapacities.Add(this.inventory.Capacity); // this.allInventoriesCapacities.Add(this.inventory.Capacity);
Log.AsyncC("WHT THE SNAG"); //Log.AsyncC("WHT THE SNAG");
foreach (var v in InventoriesToAdd) foreach (var v in InventoriesToAdd)
{ {
// this.allInventories.Add(v); // this.allInventories.Add(v);

View File

@ -353,13 +353,13 @@ namespace Revitalize.Magic.MagicFunctions
} }
catch (Exception e) catch (Exception e)
{ {
Log.AsyncR("BAD Water SPELL"); //Log.AsyncR("BAD Water SPELL");
} }
} }
else else
{ {
Log.AsyncC(Game1.currentCursorTile); //Log.AsyncC(Game1.currentCursorTile);
Log.AsyncC("Cant water here "); //Log.AsyncC("Cant water here ");
} }
} }

View File

@ -146,7 +146,7 @@ namespace Revitalize.Menus
private void optionButtonClick(string name) private void optionButtonClick(string name)
{ {
Log.AsyncC(name); //Log.AsyncC(name);
if (name == "Wilderness") if (name == "Wilderness")
{ {
if (!this.wizardSource) if (!this.wizardSource)
@ -155,9 +155,9 @@ namespace Revitalize.Menus
Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm")); Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm"));
Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g); Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g);
whichFarm = 4; whichFarm = 4;
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g); Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
@ -174,9 +174,9 @@ namespace Revitalize.Menus
string g = Path.Combine("Maps", "Farm"); string g = Path.Combine("Maps", "Farm");
Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm")); Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm"));
Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g); Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g);
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g); Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
@ -192,9 +192,9 @@ namespace Revitalize.Menus
string g = Path.Combine("Maps", "Farm_Fishing"); string g = Path.Combine("Maps", "Farm_Fishing");
Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm")); Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm"));
Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g); Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g);
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g); Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
Game1.whichFarm = 1; Game1.whichFarm = 1;
@ -228,9 +228,9 @@ namespace Revitalize.Menus
string g = Path.Combine("Maps", "Farm_Mining"); string g = Path.Combine("Maps", "Farm_Mining");
Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm")); Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm"));
Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g); Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g);
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g); Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
Game1.whichFarm = 3; Game1.whichFarm = 3;
@ -246,9 +246,9 @@ namespace Revitalize.Menus
string g = Path.Combine("Maps", "Farm_Foraging"); string g = Path.Combine("Maps", "Farm_Foraging");
Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm")); Utilities.MapUtilities.removeAllWaterTilesFromMap(Game1.getLocationFromName("Farm"));
Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g); Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(g);
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g); Class1.persistentMapSwap.mapPath = Path.Combine(Game1.content.RootDirectory, g);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
@ -277,10 +277,10 @@ namespace Revitalize.Menus
c.map = v.map; c.map = v.map;
// //
whichFarm = count; whichFarm = count;
Log.AsyncG("MAP SWAP!"); //Log.AsyncG("MAP SWAP!");
Class1.persistentMapSwap.mapPath= Path.Combine(Game1.content.RootDirectory,"Maps","Farms", v.clicky.name,v.clicky.name); Class1.persistentMapSwap.mapPath= Path.Combine(Game1.content.RootDirectory,"Maps","Farms", v.clicky.name,v.clicky.name);
Class1.persistentMapSwap.folderPath = Path.Combine(Game1.content.RootDirectory, "Maps", "Farms", v.clicky.name); Class1.persistentMapSwap.folderPath = Path.Combine(Game1.content.RootDirectory, "Maps", "Farms", v.clicky.name);
Log.AsyncG(Class1.persistentMapSwap.mapPath); //Log.AsyncG(Class1.persistentMapSwap.mapPath);
//Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(Class1.persistentMapSwap.mapPath); //Game1.getLocationFromName("Farm").map = Game1.game1.xTileContent.Load<Map>(Class1.persistentMapSwap.mapPath);
Serialize.serializeMapSwapData(Class1.persistentMapSwap); Serialize.serializeMapSwapData(Class1.persistentMapSwap);
// Util.removeAllWaterTilesFromMap(c); // Util.removeAllWaterTilesFromMap(c);
@ -658,7 +658,7 @@ namespace Revitalize.Menus
string[] spliiter=v.Split('\\'); string[] spliiter=v.Split('\\');
string fileName = spliiter.ElementAt(spliiter.Length-1); string fileName = spliiter.ElementAt(spliiter.Length-1);
string s = fileName; string s = fileName;
Log.AsyncC(v); //Log.AsyncC(v);
fileName= Path.Combine(v.Remove(0, 8),s); fileName= Path.Combine(v.Remove(0, 8),s);
try try
{ {
@ -672,14 +672,14 @@ namespace Revitalize.Menus
catch(Exception e) catch(Exception e)
{ {
if (e.ToString().Contains("FarmIcons")) continue; if (e.ToString().Contains("FarmIcons")) continue;
Log.AsyncR(e); //Log.AsyncR(e);
} }
} }
foreach (var v in fi) foreach (var v in fi)
{ {
dir2.Add(Path.GetFileNameWithoutExtension(v)); dir2.Add(Path.GetFileNameWithoutExtension(v));
Log.AsyncC(v); //Log.AsyncC(v);
string f=Path.GetDirectoryName(v); string f=Path.GetDirectoryName(v);
string[] spliiter = f.Split('\\'); string[] spliiter = f.Split('\\');
string fileName = spliiter.ElementAt(spliiter.Length-1); string fileName = spliiter.ElementAt(spliiter.Length-1);
@ -694,7 +694,7 @@ namespace Revitalize.Menus
} }
catch(Exception e) catch(Exception e)
{ {
Log.AsyncR(e); //Log.AsyncR(e);
} }
} }
@ -703,7 +703,7 @@ namespace Revitalize.Menus
{ {
// Log.AsyncC("BOO"); // Log.AsyncC("BOO");
farmTypeButtons.Add(k.clicky); farmTypeButtons.Add(k.clicky);
Log.AsyncC(k.clicky.name); //Log.AsyncC(k.clicky.name);
} }
//TODO: CHECK THE DIRECTORY AND ADD ALL DATA NODES TO THIS LIST //TODO: CHECK THE DIRECTORY AND ADD ALL DATA NODES TO THIS LIST
@ -733,7 +733,7 @@ namespace Revitalize.Menus
catch(Exception e) catch(Exception e)
{ {
Log.AsyncO(e); //Log.AsyncO(e);
return Game1.mouseCursors; return Game1.mouseCursors;
} }

View File

@ -358,7 +358,7 @@ namespace Revitalize.Menus
if (current.containsPoint(x, y)) if (current.containsPoint(x, y))
{ {
this.hoverText = current.label; this.hoverText = current.label;
Log.AsyncM(current.value); //Log.AsyncM(current.value);
return; return;
} }
} }

View File

@ -257,7 +257,7 @@ namespace Revitalize.Menus
{ {
this.heldItem = this.ItemsToGrabMenu.leftClick(x, y, this.heldItem, false); this.heldItem = this.ItemsToGrabMenu.leftClick(x, y, this.heldItem, false);
Util.addItemToOtherInventory(this.ItemsToGrabMenu.actualInventory, this.heldItem); Util.addItemToOtherInventory(this.ItemsToGrabMenu.actualInventory, this.heldItem);
Log.AsyncG("not full"); //Log.AsyncG("not full");
} }
else else
{ {
@ -305,7 +305,7 @@ namespace Revitalize.Menus
} }
// j= this.ItemsToGrabMenu.leftClick(x, y, this.heldItem, false); // j= this.ItemsToGrabMenu.leftClick(x, y, this.heldItem, false);
Util.addItemToOtherInventory(this.ItemsToGrabMenu.actualInventory, i); Util.addItemToOtherInventory(this.ItemsToGrabMenu.actualInventory, i);
Log.AsyncG("item swap"); //Log.AsyncG("item swap");
Game1.activeClickableMenu = new ItemGrabMenu(this.ItemsToGrabMenu.actualInventory,this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem); Game1.activeClickableMenu = new ItemGrabMenu(this.ItemsToGrabMenu.actualInventory,this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem);
Game1.playSound("Ship"); Game1.playSound("Ship");
this.heldItem = null; this.heldItem = null;

View File

@ -83,10 +83,10 @@ namespace Revitalize.Menus.Machines
{ {
machine = Machine; machine = Machine;
Rows = rows; Rows = rows;
Log.AsyncC(InputInventory.Capacity); //Log.AsyncC(InputInventory.Capacity);
this.inputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize / 2, this.yPositionOnScreen, false, InputInventory, null, 9, 3, 0, 0, true); this.inputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize / 2, this.yPositionOnScreen, false, InputInventory, null, 9, 3, 0, 0, true);
this.outputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize *8, this.yPositionOnScreen, false, OutputInventory, null, 9, 3, 0, 0, true); this.outputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize *8, this.yPositionOnScreen, false, OutputInventory, null, 9, 3, 0, 0, true);
Log.AsyncM(this.inputInventory.actualInventory.Capacity); //Log.AsyncM(this.inputInventory.actualInventory.Capacity);
this.inputInventory.capacity = 9; this.inputInventory.capacity = 9;
this.outputInventory.capacity = 9; this.outputInventory.capacity = 9;
this.inputInventory.actualInventory.Capacity = 9; this.inputInventory.actualInventory.Capacity = 9;
@ -136,7 +136,7 @@ namespace Revitalize.Menus.Machines
} }
this.inputInventory = new InventoryMenu(this.xPositionOnScreen + Game1.tileSize / 2, this.yPositionOnScreen, false, InputInventory, highlightFunction, 9, 3, 0, 0, true); this.inputInventory = new InventoryMenu(this.xPositionOnScreen + Game1.tileSize / 2, this.yPositionOnScreen, false, InputInventory, highlightFunction, 9, 3, 0, 0, true);
this.outputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize * 8, this.yPositionOnScreen, false, OutputInventory, null, 9, 3, 0, 0, true); this.outputInventory = new StardewValley.Menus.InventoryMenu(this.xPositionOnScreen + Game1.tileSize * 8, this.yPositionOnScreen, false, OutputInventory, null, 9, 3, 0, 0, true);
Log.AsyncM(this.inputInventory.actualInventory.Capacity); //Log.AsyncM(this.inputInventory.actualInventory.Capacity);
this.inputInventory.capacity = 9; this.inputInventory.capacity = 9;
this.inputInventory.capacity = 9; this.inputInventory.capacity = 9;
this.inputInventory.actualInventory.Capacity = 9; this.inputInventory.actualInventory.Capacity = 9;
@ -322,7 +322,7 @@ namespace Revitalize.Menus.Machines
if (this.inputInventory.actualInventory == null) if (this.inputInventory.actualInventory == null)
{ {
Log.AsyncG("WTF HOW IS THIS NULL!?!?!?!?!"); //Log.AsyncG("WTF HOW IS THIS NULL!?!?!?!?!");
} }
bool f = Util.isInventoryFull(this.inputInventory.actualInventory,true); bool f = Util.isInventoryFull(this.inputInventory.actualInventory,true);
if (f == false) if (f == false)
@ -337,9 +337,9 @@ namespace Revitalize.Menus.Machines
Util.addItemToOtherInventory(this.inputInventory.actualInventory, this.heldItem); Util.addItemToOtherInventory(this.inputInventory.actualInventory, this.heldItem);
// Log.AsyncG("item swap"); // Log.AsyncG("item swap");
if (this.machine == null) Log.AsyncC("OK MY MACHINE IS NULL"); if (this.machine == null) //Log.AsyncC("OK MY MACHINE IS NULL");
if (this.inputInventory == null) Log.AsyncG("Input is null"); if (this.inputInventory == null) //Log.AsyncG("Input is null");
if (this.outputInventory == null) Log.AsyncO("output is null"); if (this.outputInventory == null) //Log.AsyncO("output is null");
//Game1.activeClickableMenu = new MachineInventory(this.machine, this.inputInventory.actualInventory,this.outputInventory.actualInventory, this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem); //Game1.activeClickableMenu = new MachineInventory(this.machine, this.inputInventory.actualInventory,this.outputInventory.actualInventory, this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem);
Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this.machine, this.inputInventory.actualInventory, this.outputInventory.actualInventory, 3); Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this.machine, this.inputInventory.actualInventory, this.outputInventory.actualInventory, 3);
// Game1.playSound("Ship"); // Game1.playSound("Ship");
@ -351,7 +351,7 @@ namespace Revitalize.Menus.Machines
} }
else else
{ {
Log.AsyncO("Inventory is full?????"); //Log.AsyncO("Inventory is full?????");
return; return;
} }
// this.inputInventory.inventory.Add(new ClickableComponent(new Rectangle(inputInventory.xPositionOnScreen + inputInventory.actualInventory.Count-1 % (this.capacity / this.inputInventory.rows) * Game1.tileSize + this.inputInventory.horizontalGap * (inputInventory.actualInventory.Count-1 % (this.capacity / this.inputInventory.rows)), inputInventory.yPositionOnScreen + inputInventory.actualInventory.Count-1 / (this.capacity / this.inputInventory.rows) * (Game1.tileSize + this.inputInventory.verticalGap) + (inputInventory.actualInventory.Count-1 / (this.capacity / this.inputInventory.rows) - 1) * Game1.pixelZoom - (Game1.tileSize / 5), Game1.tileSize, Game1.tileSize), string.Concat(inputInventory.actualInventory.Count-1))); // this.inputInventory.inventory.Add(new ClickableComponent(new Rectangle(inputInventory.xPositionOnScreen + inputInventory.actualInventory.Count-1 % (this.capacity / this.inputInventory.rows) * Game1.tileSize + this.inputInventory.horizontalGap * (inputInventory.actualInventory.Count-1 % (this.capacity / this.inputInventory.rows)), inputInventory.yPositionOnScreen + inputInventory.actualInventory.Count-1 / (this.capacity / this.inputInventory.rows) * (Game1.tileSize + this.inputInventory.verticalGap) + (inputInventory.actualInventory.Count-1 / (this.capacity / this.inputInventory.rows) - 1) * Game1.pixelZoom - (Game1.tileSize / 5), Game1.tileSize, Game1.tileSize), string.Concat(inputInventory.actualInventory.Count-1)));
@ -370,7 +370,7 @@ namespace Revitalize.Menus.Machines
//outputInventory.actualInventory.Add(new Decoration(3, Vector2.Zero)); //outputInventory.actualInventory.Add(new Decoration(3, Vector2.Zero));
if (this.outputInventory.actualInventory == null) if (this.outputInventory.actualInventory == null)
{ {
Log.AsyncG("WTF HOW IS THIS NULL!?!?!?!?!"); //Log.AsyncG("WTF HOW IS THIS NULL!?!?!?!?!");
} }
this.heldItem = this.outputInventory.leftClick(x, y, this.heldItem, false); this.heldItem = this.outputInventory.leftClick(x, y, this.heldItem, false);
@ -448,9 +448,9 @@ namespace Revitalize.Menus.Machines
// j= this.inputInventory.leftClick(x, y, this.heldItem, false); // j= this.inputInventory.leftClick(x, y, this.heldItem, false);
// Util.addItemToOtherInventory(this.inputInventory.actualInventory, i); // Util.addItemToOtherInventory(this.inputInventory.actualInventory, i);
// Log.AsyncG("item swap"); // Log.AsyncG("item swap");
if (this.machine == null) Log.AsyncC("OK MY MACHINE IS NULL"); if (this.machine == null) //Log.AsyncC("OK MY MACHINE IS NULL");
if (this.inputInventory == null) Log.AsyncG("Input is null"); if (this.inputInventory == null) //Log.AsyncG("Input is null");
if (this.outputInventory == null) Log.AsyncO("output is null"); if (this.outputInventory == null) //Log.AsyncO("output is null");
//Game1.activeClickableMenu = new MachineInventory(this.machine, this.inputInventory.actualInventory,this.outputInventory.actualInventory, this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem); //Game1.activeClickableMenu = new MachineInventory(this.machine, this.inputInventory.actualInventory,this.outputInventory.actualInventory, this.Rows, false, true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems), this.behaviorFunction, null, this.behaviorOnItemGrab, false, true, true, true, true, this.source, this.sourceItem);
Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this.machine, this.inputInventory.actualInventory, this.outputInventory.actualInventory, 3); Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this.machine, this.inputInventory.actualInventory, this.outputInventory.actualInventory, 3);
// Game1.playSound("Ship"); // Game1.playSound("Ship");

View File

@ -53,7 +53,7 @@ namespace Revitalize.Objects.Machines
bool works= Dictionaries.quarryList.TryGetValue(resourceName, out t); bool works= Dictionaries.quarryList.TryGetValue(resourceName, out t);
if (works == false) if (works == false)
{ {
Log.AsyncR("ERROR, invalid resource type for quarry."); //Log.AsyncR("ERROR, invalid resource type for quarry.");
return; return;
} }
else else
@ -133,7 +133,7 @@ namespace Revitalize.Objects.Machines
bool works = Dictionaries.quarryList.TryGetValue(resourceName, out t); bool works = Dictionaries.quarryList.TryGetValue(resourceName, out t);
if (works == false) if (works == false)
{ {
Log.AsyncR("ERROR, invalid resource type for quarry."); ////Log.AsyncR("ERROR, invalid resource type for quarry.");
return; return;
} }
else else
@ -267,7 +267,7 @@ namespace Revitalize.Objects.Machines
bool works = Dictionaries.quarryList.TryGetValue(ResourceName, out t); bool works = Dictionaries.quarryList.TryGetValue(ResourceName, out t);
if (works == false) if (works == false)
{ {
Log.AsyncR("ERROR, invalid resource type for quarry."); ////Log.AsyncR("ERROR, invalid resource type for quarry.");
return false; return false;
} }
else else
@ -586,7 +586,7 @@ namespace Revitalize.Objects.Machines
// Log.Info(this.Decoration_type); // Log.Info(this.Decoration_type);
if (this.lightSource != null) this.lightSource.color = new Color(0, 255, 255, 255); //THE COLORS ARE REVERSED!!!!!!!!!!!! if (this.lightSource != null) this.lightSource.color = new Color(0, 255, 255, 255); //THE COLORS ARE REVERSED!!!!!!!!!!!!
this.minutesUntilReady = (this.minutesUntilReady - minutes); this.minutesUntilReady = (this.minutesUntilReady - minutes);
Log.Info("minues remaining" + this.minutesUntilReady); ////Log.Info("minues remaining" + this.minutesUntilReady);
// if(this.output!= null) Log.Info("stack size"+this.output.stack); // if(this.output!= null) Log.Info("stack size"+this.output.stack);
if (Game1.isDarkOut()) if (Game1.isDarkOut())

View File

@ -535,10 +535,10 @@ namespace Revitalize.Objects.Machines
if (minutesUntilReady == 0) if (minutesUntilReady == 0)
{ {
Log.AsyncC(this.name + "Is ready!"); // Log.AsyncC(this.name + "Is ready!");
Log.AsyncC(Game1.player.getStandingPosition()); // Log.AsyncC(Game1.player.getStandingPosition());
Vector2 v2 = new Vector2(this.tileLocation.X * Game1.tileSize, this.tileLocation.Y * Game1.tileSize); Vector2 v2 = new Vector2(this.tileLocation.X * Game1.tileSize, this.tileLocation.Y * Game1.tileSize);
Log.AsyncC(v2); //Log.AsyncC(v2);
//Game1.createItemDebris((Item)this.heldObject, v2, Game1.player.getDirection()); //Game1.createItemDebris((Item)this.heldObject, v2, Game1.player.getDirection());
if (this.heldObject != null) if (this.heldObject != null)
{ {
@ -832,9 +832,9 @@ namespace Revitalize.Objects.Machines
} }
} }
this.updateDrawPosition(); this.updateDrawPosition();
Log.AsyncO(this.boundingBox); //Log.AsyncO(this.boundingBox);
Log.AsyncO(x); //Log.AsyncO(x);
Log.AsyncY(y); //Log.AsyncY(y);
for (int i = 0; i <= this.boundingBox.X / Game1.tileSize; i++) for (int i = 0; i <= this.boundingBox.X / Game1.tileSize; i++)
{ {
return Util.placementAction(this, location, x+1, y, who); return Util.placementAction(this, location, x+1, y, who);

View File

@ -260,13 +260,13 @@ namespace Revitalize.Objects.Machines
//Game1.activeClickableMenu = new Revitalize.Menus.LightCustomizer(this); //Game1.activeClickableMenu = new Revitalize.Menus.LightCustomizer(this);
if (this.inputInventory == null) if (this.inputInventory == null)
{ {
Log.AsyncG(">>>>>>>>??????????????????>>>>>>>>>>>>>"); //Log.AsyncG(">>>>>>>>??????????????????>>>>>>>>>>>>>");
} }
if (this.outputInventory == null) if (this.outputInventory == null)
{ {
Log.AsyncC(">??????????????"); //Log.AsyncC(">??????????????");
} }
Log.AsyncM(this.GetType()); //Log.AsyncM(this.GetType());
// this.outputInventory.Add(new Revitalize.Objects.Light(0, Vector2.Zero, LightColors.Azure, LightColors.Azure)); // this.outputInventory.Add(new Revitalize.Objects.Light(0, Vector2.Zero, LightColors.Azure, LightColors.Azure));
Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this, this.inputInventory, this.outputInventory, 3); Game1.activeClickableMenu = new Revitalize.Menus.Machines.MachineInventory(this, this.inputInventory, this.outputInventory, 3);
return false; return false;

View File

@ -16,7 +16,7 @@ namespace Revitalize.Resources
public static List<Revitalize.Resources.DataNodes.TrackedTerrainDummyDataNode> trackedTerrainFeaturesDummyList; public static List<Revitalize.Resources.DataNodes.TrackedTerrainDummyDataNode> trackedTerrainFeaturesDummyList;
public static List<Revitalize.CoreObject> trackedObjectList; public static List<Revitalize.CoreObject> trackedObjectList;
public static List<Revitalize.Objects.ModularDecoration> DecorationsToDraw; //public static List<Revitalize.Objects.ModularDecoration> DecorationsToDraw;
public static List<Type> serializerTypes; public static List<Type> serializerTypes;
public static List<string> saplingNames; public static List<string> saplingNames;
@ -28,7 +28,7 @@ namespace Revitalize.Resources
trackedObjectList = new List<CoreObject>(); trackedObjectList = new List<CoreObject>();
WeatherDebrisSystem.thisWeatherDebris = new List<WeatherDebrisPlus>(); WeatherDebrisSystem.thisWeatherDebris = new List<WeatherDebrisPlus>();
DecorationsToDraw = new List<Objects.ModularDecoration>(); //DecorationsToDraw = new List<Objects.ModularDecoration>();
} }
public static void loadAllListsAfterMovement() public static void loadAllListsAfterMovement()

View File

@ -78,7 +78,7 @@ namespace Revitalize
{ {
idk.Add(d); idk.Add(d);
} }
Log.AsyncC("Progress on saving objects: " + countProcessed + "/" + Lists.trackedObjectList.Count); //Log.AsyncC("Progress on saving objects: " + countProcessed + "/" + Lists.trackedObjectList.Count);
removalList.Add(d); removalList.Add(d);
} }
} }
@ -103,14 +103,14 @@ namespace Revitalize
{ {
t.worldObj.Invoke(v as CoreObject); t.worldObj.Invoke(v as CoreObject);
} }
Log.AsyncG("Progress on saving objects: " + countProcessed + "/" + Lists.trackedObjectList.Count); //Log.AsyncG("Progress on saving objects: " + countProcessed + "/" + Lists.trackedObjectList.Count);
removalList.Add(v as CoreObject); removalList.Add(v as CoreObject);
} }
} }
} }
removalList.Clear(); removalList.Clear();
Log.AsyncM("Revitalize: Done cleaning world for saving."); //Log.AsyncM("Revitalize: Done cleaning world for saving.");
} }
@ -160,7 +160,7 @@ namespace Revitalize
} }
removalList.Clear(); removalList.Clear();
Log.AsyncM("Revitalize: Done cleaning inventory!"); //Log.AsyncM("Revitalize: Done cleaning inventory!");
} }
/// <summary> /// <summary>
@ -247,7 +247,7 @@ namespace Revitalize
string a; string a;
string[] b; string[] b;
string s=""; string s="";
Log.AsyncC(path); //Log.AsyncC(path);
// Log.AsyncC(data); // Log.AsyncC(data);
try try
{ {
@ -287,7 +287,7 @@ namespace Revitalize
} }
} }
Log.AsyncG("attempting to parse from path and value of s is " + s); //Log.AsyncG("attempting to parse from path and value of s is " + s);
} }
// var cObj = parseBagOfHolding(path); //pair.Value.parse.Invoke(path); // var cObj = parseBagOfHolding(path); //pair.Value.parse.Invoke(path);
@ -443,7 +443,7 @@ namespace Revitalize
continue; continue;
} }
} }
Log.AsyncC("CHECK RESULTS " + false); ////Log.AsyncC("CHECK RESULTS " + false);
return false; return false;
// XElement school = doc.Element("School"); // XElement school = doc.Element("School");
// school.Add(new XAttribute("ID", "ID_Value")); // school.Add(new XAttribute("ID", "ID_Value"));
@ -475,12 +475,12 @@ namespace Revitalize
private static void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) private static void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e)
{ {
Log.AsyncR(e); //Log.AsyncR(e);
} }
private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e) private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
{ {
Log.AsyncR(e); //Log.AsyncR(e);
} }
public static void serializeMapSwapData(MapSwapData d) public static void serializeMapSwapData(MapSwapData d)
@ -989,7 +989,7 @@ namespace Revitalize
d.lightsOn = obj.lightsOn; d.lightsOn = obj.lightsOn;
// d.thisLocation = Game1.getLocationFromName(loc); // d.thisLocation = Game1.getLocationFromName(loc);
// d.thisLocation = obj.thisLocation; // d.thisLocation = obj.thisLocation;
Log.AsyncC(d.thisLocation); //Log.AsyncC(d.thisLocation);
d.lightColor = obj.lightColor; d.lightColor = obj.lightColor;
d.thisType = obj.thisType; d.thisType = obj.thisType;
d.removable = obj.removable; d.removable = obj.removable;
@ -1003,7 +1003,7 @@ namespace Revitalize
} }
catch (Exception e) catch (Exception e)
{ {
Log.AsyncM(e); //Log.AsyncM(e);
return null; return null;
} }
@ -1085,7 +1085,7 @@ namespace Revitalize
d.lightsOn = obj.lightsOn; d.lightsOn = obj.lightsOn;
// d.thisLocation = Game1.getLocationFromName(loc); // d.thisLocation = Game1.getLocationFromName(loc);
// d.thisLocation = obj.thisLocation; // d.thisLocation = obj.thisLocation;
Log.AsyncC(d.thisLocation); //Log.AsyncC(d.thisLocation);
d.lightColor = obj.lightColor; d.lightColor = obj.lightColor;
d.thisType = obj.thisType; d.thisType = obj.thisType;
d.removable = obj.removable; d.removable = obj.removable;
@ -1099,7 +1099,7 @@ namespace Revitalize
} }
catch (Exception e) catch (Exception e)
{ {
Log.AsyncM(e); //Log.AsyncM(e);
return null; return null;
} }
@ -1221,7 +1221,7 @@ namespace Revitalize
d.lightsOn = obj.lightsOn; d.lightsOn = obj.lightsOn;
// d.thisLocation = Game1.getLocationFromName(loc); // d.thisLocation = Game1.getLocationFromName(loc);
// d.thisLocation = obj.thisLocation; // d.thisLocation = obj.thisLocation;
Log.AsyncC(d.thisLocation); ////Log.AsyncC(d.thisLocation);
d.lightColor = obj.lightColor; d.lightColor = obj.lightColor;
d.thisType = obj.thisType; d.thisType = obj.thisType;
d.removable = obj.removable; d.removable = obj.removable;
@ -1235,7 +1235,7 @@ namespace Revitalize
} }
catch (Exception e) catch (Exception e)
{ {
Log.AsyncM(e); //Log.AsyncM(e);
return null; return null;
} }
} }
@ -1577,7 +1577,7 @@ namespace Revitalize
{ {
serializer.TypeNameHandling = TypeNameHandling.Auto; serializer.TypeNameHandling = TypeNameHandling.Auto;
serializer.NullValueHandling = NullValueHandling.Ignore; serializer.NullValueHandling = NullValueHandling.Ignore;
Log.AsyncG("DESERIALIZE THE WORLD"); ////Log.AsyncG("DESERIALIZE THE WORLD");
return base.ReadJson(reader, objectType, existingValue, serializer); return base.ReadJson(reader, objectType, existingValue, serializer);
} }
@ -1614,7 +1614,7 @@ namespace Revitalize
TextReader reader = null; TextReader reader = null;
try try
{ {
Log.AsyncC(filePath); ////Log.AsyncC(filePath);
reader = new StreamReader(filePath); reader = new StreamReader(filePath);
var fileContents = reader.ReadToEnd(); var fileContents = reader.ReadToEnd();

View File

@ -27,7 +27,7 @@ namespace Revitalize
PlayerVariables.initializePlayerVariables(); PlayerVariables.initializePlayerVariables();
Log.AsyncG("Revitalize: Running on API Version: " + StardewModdingAPI.Constants.ApiVersion); //Log.AsyncG("Revitalize: Running on API Version: " + StardewModdingAPI.Constants.ApiVersion);
Lists.loadAllListsAtEntry(); Lists.loadAllListsAtEntry();

View File

@ -38,7 +38,7 @@ namespace Revitalize.Settings
} }
catch (Exception e) catch (Exception e)
{ {
Log.AsyncR("Failed to load Machine Settings"); ////Log.AsyncR("Failed to load Machine Settings");
} }
} }

View File

@ -22,12 +22,12 @@ namespace Revitalize.Settings
if (File.Exists(Path.Combine(Class1.path, "xnb_node.cmd"))) if (File.Exists(Path.Combine(Class1.path, "xnb_node.cmd")))
{ {
PaintEnabled = true; PaintEnabled = true;
Log.AsyncG("Revitalize: Paint Module Enabled"); //Log.AsyncG("Revitalize: Paint Module Enabled");
} }
else else
{ {
PaintEnabled = false; PaintEnabled = false;
Log.AsyncG("Revitalize: Paint Module Disabled"); //Log.AsyncG("Revitalize: Paint Module Disabled");
} }
} }

View File

@ -48,7 +48,7 @@ namespace Revitalize.Settings
} }
catch(Exception e) catch(Exception e)
{ {
Log.AsyncR(e); //Log.AsyncR(e);
} }
} }
} }

View File

@ -81,8 +81,8 @@ namespace Revitalize.Utilities
public static void removeAllWaterTilesFromMap(GameLocation c) public static void removeAllWaterTilesFromMap(GameLocation c)
{ {
Log.AsyncM(c.map.Layers[0].LayerWidth); //Log.AsyncM(c.map.Layers[0].LayerWidth);
Log.AsyncM(c.map.Layers[0].LayerHeight); //Log.AsyncM(c.map.Layers[0].LayerHeight);
for (int i = 0; i < c.map.Layers[0].LayerWidth; i++) for (int i = 0; i < c.map.Layers[0].LayerWidth; i++)
{ {
for (int j = 0; j < c.map.Layers[0].LayerHeight; j++) for (int j = 0; j < c.map.Layers[0].LayerHeight; j++)
@ -97,9 +97,9 @@ namespace Revitalize.Utilities
} }
} }
Log.AsyncY("Position: " + i +" of "+ c.map.Layers[0].LayerWidth); //Log.AsyncY("Position: " + i +" of "+ c.map.Layers[0].LayerWidth);
} }
Log.AsyncC("Removed All Water Tiles from " + c.name); //Log.AsyncC("Removed All Water Tiles from " + c.name);
} }
public static Vector2 getMapDimensions(GameLocation loc) public static Vector2 getMapDimensions(GameLocation loc)
@ -131,7 +131,7 @@ namespace Revitalize.Utilities
} }
} }
Log.AsyncY("Position: " + i + " of " + newLoc.map.Layers[0].LayerWidth); //Log.AsyncY("Position: " + i + " of " + newLoc.map.Layers[0].LayerWidth);
} }
newLoc.waterTiles = newWaterTiles; newLoc.waterTiles = newWaterTiles;
return; return;
@ -151,7 +151,7 @@ namespace Revitalize.Utilities
} }
foreach (string file in s) foreach (string file in s)
{ {
Log.AsyncO(file); //Log.AsyncO(file);
string[] reader = File.ReadAllLines(file); string[] reader = File.ReadAllLines(file);
try try
{ {
@ -160,7 +160,7 @@ namespace Revitalize.Utilities
} }
catch (Exception err) catch (Exception err)
{ {
Log.AsyncR(err); //Log.AsyncR(err);
} }
} }
} }

View File

@ -25,7 +25,7 @@ namespace Revitalize
{ {
public static bool hasWateredAllCropsToday; public static bool hasWateredAllCropsToday;
public static void ResetAllDailyBooleans(object sender, EventArgsIntChanged e) public static void ResetAllDailyBooleans(object sender, EventArgs e)
{ {
SetUp.createDirectories(); SetUp.createDirectories();
hasWateredAllCropsToday = false; hasWateredAllCropsToday = false;
@ -100,8 +100,8 @@ namespace Revitalize
{ {
if (logInfo) if (logInfo)
{ {
Log.AsyncG("size " + inventory.Count); //Log.AsyncG("size " + inventory.Count);
Log.AsyncG("max " + inventory.Capacity); //Log.AsyncG("max " + inventory.Capacity);
} }
if (inventory.Count == inventory.Capacity) return true; if (inventory.Count == inventory.Capacity) return true;
@ -757,7 +757,7 @@ namespace Revitalize
else else
{ {
// Game1.showRedMessage("STEP 2"); // Game1.showRedMessage("STEP 2");
Log.Info(vector); //Log.Info(vector);
Vector2 newVec = new Vector2(vector.X, vector.Y); Vector2 newVec = new Vector2(vector.X, vector.Y);
// cObj.boundingBox.Inflate(32, 32); // cObj.boundingBox.Inflate(32, 32);
@ -768,7 +768,7 @@ namespace Revitalize
if(playSound==true) Game1.playSound("woodyStep"); if(playSound==true) Game1.playSound("woodyStep");
else else
{ {
Log.AsyncG("restoring item from file"); //Log.AsyncG("restoring item from file");
} }
//Log.AsyncM("Placed and object"); //Log.AsyncM("Placed and object");
cObj.locationsName = location.name; cObj.locationsName = location.name;
@ -788,10 +788,10 @@ namespace Revitalize
public static void plantCropHere() public static void plantCropHere()
{ {
Log.AsyncY(Game1.player.ActiveObject.name); //Log.AsyncY(Game1.player.ActiveObject.name);
if (Lists.saplingNames.Contains(Game1.player.ActiveObject.name)) if (Lists.saplingNames.Contains(Game1.player.ActiveObject.name))
{ {
Log.AsyncY("PLANT THE SAPLING"); //Log.AsyncY("PLANT THE SAPLING");
bool f = plantSappling(); bool f = plantSappling();
if (f == true) return; if (f == true) return;
@ -907,7 +907,7 @@ namespace Revitalize
Game1.showRedMessage("Can't be planted here."); Game1.showRedMessage("Can't be planted here.");
return false; return false;
} }
Log.AsyncR("MAKES NO SENSE"); //Log.AsyncR("MAKES NO SENSE");
return false; return false;
} }
@ -962,21 +962,21 @@ namespace Revitalize
Class1.persistentMapSwap = Serialize.parseMapSwapData(); Class1.persistentMapSwap = Serialize.parseMapSwapData();
if (Class1.persistentMapSwap == null) if (Class1.persistentMapSwap == null)
{ {
Log.AsyncG("IS NULL"); //Log.AsyncG("IS NULL");
Class1.persistentMapSwap = new MapSwapData(); Class1.persistentMapSwap = new MapSwapData();
} }
else else
{ {
try try
{ {
Log.AsyncM(parseOutContent(Class1.persistentMapSwap.mapPath)); //Log.AsyncM(parseOutContent(Class1.persistentMapSwap.mapPath));
m = Game1.content.Load<Map>(parseOutContent(Class1.persistentMapSwap.mapPath)); m = Game1.content.Load<Map>(parseOutContent(Class1.persistentMapSwap.mapPath));
Log.AsyncG("Successfully loaded custom farm map."); //Log.AsyncG("Successfully loaded custom farm map.");
} }
catch (Exception err) catch (Exception err)
{ {
m = null; m = null;
Log.AsyncM(err); //Log.AsyncM(err);
} }
@ -990,14 +990,14 @@ namespace Revitalize
bool[,] oldWaterTiles = v.waterTiles; bool[,] oldWaterTiles = v.waterTiles;
v.map = m;//change this to v.map =(Game1.content.Load<Map>("Path.Combine("Maps,"Farms",folderName,"Farm"))); v.map = m;//change this to v.map =(Game1.content.Load<Map>("Path.Combine("Maps,"Farms",folderName,"Farm")));
Log.AsyncG("Sucesfully injected custom farm map"); //Log.AsyncG("Sucesfully injected custom farm map");
Utilities.MapUtilities.loadCustomFarmMap(v, oldLocDimensions, oldWaterTiles); Utilities.MapUtilities.loadCustomFarmMap(v, oldLocDimensions, oldWaterTiles);
} }
} }
} }
else else
{ {
Log.AsyncM("WTF"); //Log.AsyncM("WTF");
} }
} }
} }