diff --git a/Game1/Game1.cs b/Game1/Game1.cs index e12971d..e028e85 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -176,8 +176,9 @@ namespace Game1 } spriteBatch.DrawString(Bold, "Time: ", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkRed); - spriteBatch.DrawString(Bold, Time.getDayNight(), new Vector2(60, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkBlue); - spriteBatch.DrawString(Bold, Time.GetTimeOfDayInt().ToString(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Days " + Time.getDays(), new Vector2(60, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Day Progression: ", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkRed); + spriteBatch.DrawString(Bold, Time.GetTimeOfDayInt().ToString() + "%", new Vector2(140, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkBlue); spriteBatch.DrawString(Bold, "Tractor Properties:", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 62), Color.DarkRed); @@ -194,6 +195,9 @@ namespace Game1 spriteBatch.DrawString(Bold, "Matrix Size: " + input.getSize().X.ToString() + " X " + input.getSize().Y.ToString(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 242), Color.DarkBlue); spriteBatch.DrawString(Bold, "House Position: " + houseUnit.getVector() / input.getSpacingTile(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 262), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Total Weight: ", new Vector2(700, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 182), Color.DarkRed); + spriteBatch.DrawString(Bold, "(" + tractorUnit.getInventory().getWeight() + "/" + tractorUnit.getInventory().getMaxWeight() + ")", new Vector2(800, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 182), Color.DarkBlue); + tractorUnit.drawInventory(input, spriteBatch, Bold, inventory.getPredefinedItems()); InspectTile(); diff --git a/Game1/Sources/Objects/DayNightCycle.cs b/Game1/Sources/Objects/DayNightCycle.cs index 9a96f65..e111ea1 100644 --- a/Game1/Sources/Objects/DayNightCycle.cs +++ b/Game1/Sources/Objects/DayNightCycle.cs @@ -10,8 +10,9 @@ class DayNightCycle private bool Time = true; private int nightTime = 0; private int dayTime = 0; - private int lengthOfDay = 6000; - private int lengthOfNight = 6000; + private int lengthOfDay = 20000; + private int lengthOfNight = 20000; + private int Days; public void updateTime(int Speed) { @@ -33,6 +34,7 @@ class DayNightCycle { Time = true; nightTime = 0; + Days++; } } } @@ -104,11 +106,18 @@ class DayNightCycle { if (Time) { - return dayTime / 60; + return (int)(100 * ((float)(dayTime + nightTime) / (lengthOfDay + lengthOfNight))) + 1; } else { - return nightTime / 60; + return (int)(100 * ((float)(lengthOfDay + nightTime) / (lengthOfDay + lengthOfNight))) + 1; } + + + } + + public int getDays() + { + return Days; } } diff --git a/Game1/Sources/Objects/Tractor.cs b/Game1/Sources/Objects/Tractor.cs index 8680b60..ba899ed 100644 --- a/Game1/Sources/Objects/Tractor.cs +++ b/Game1/Sources/Objects/Tractor.cs @@ -154,4 +154,9 @@ class Tractor { smartTractor.drawInventory(input, spriteBatch, Bold, itemStorageDefined); } + + public Inventory getInventory() + { + return smartTractor.getInventory(); + } } diff --git a/Game1/Sources/Smart/AI.cs b/Game1/Sources/Smart/AI.cs index 8c8e3a5..38410a7 100644 --- a/Game1/Sources/Smart/AI.cs +++ b/Game1/Sources/Smart/AI.cs @@ -72,4 +72,9 @@ class AI } return farm; } + + public Inventory getInventory() + { + return inventory; + } } diff --git a/Game1/Sources/Smart/SmartTractor.cs b/Game1/Sources/Smart/SmartTractor.cs index ace6fa7..74f5dae 100644 --- a/Game1/Sources/Smart/SmartTractor.cs +++ b/Game1/Sources/Smart/SmartTractor.cs @@ -74,4 +74,9 @@ class SmartTractor farm.updateFarm(Size); } } + + public Inventory getInventory() + { + return ai.getInventory(); + } }