Skip to content

Commit

Permalink
Merge pull request #183 from Permafrost-Game/bugfixes-showcase
Browse files Browse the repository at this point in the history
Minor bug fixes
  • Loading branch information
JR-Morgan authored Jul 23, 2020
2 parents a55be7e + 014a860 commit 1e0fed3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public CampFire() : base(Vector2.Zero, Textures.MapSet[TextureSetTypes.CampFire]

[PFSerializable]
public float timeUntilBurntout;
private const float burnoutTime = 15000f;
private const float burnoutTime = 30000f;

public CampFire(Vector2 position, bool heating = true, float timeUntilBurntout = burnoutTime) : base
(
Expand All @@ -59,9 +59,18 @@ public CampFire(Vector2 position, bool heating = true, float timeUntilBurntout =

private void Fuel(Instruction instruction)
{
Heating = true;
TextureGroupIndex = 1;
InstructionTypes.Clear();
if (instruction.ActiveMember.Inventory.ContainsAll(instruction.Type.RequiredResources))
{
foreach (ResourceItem item in instruction.Type.RequiredResources)
{
instruction.ActiveMember.Inventory.RemoveItem(item);
}

Heating = true;
TextureGroupIndex = 1;
InstructionTypes.Clear();

}
}

public override void Update(GameTime gameTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static IInteractable MakeInteractable(Interactable interactable, Vector2
case Interactable.Colonist:
Inventory i = new Inventory(Colonist.COLONIST_DEFAULT_INVENTORY_SIZE);
i.AddItem(new ResourceItem(Resource.Food, 10));
i.AddItem(new ResourceItem(Resource.Wood, 10));
return new Colonist(position, i);
case Interactable.Merchant:
return new Merchant(position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ private static void UpdateTemperature(Vector2 gameHover, Vector2 screenHover)

if (t != null && !view.Hovering)
{
int temperature = MathHelper.Clamp((int)Math.Round(t.Temperature.Value), -50, +50);
int temperature = MathHelper.Clamp((int)Math.Round(t.Temperature.Value), -50, +50) - 30;
if (temperature == 0)
temp = "±";
else if (temperature > 0)
Expand Down
2 changes: 1 addition & 1 deletion TeamProject/GlobalWarmingGame/ZoneGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace GlobalWarmingGame
{
static class ZoneGenerator
{
private static readonly int towerDistance = 7;
private static readonly int towerDistance = 3;
private static readonly int towerSpan = 100;

/// <summary>
Expand Down

0 comments on commit 1e0fed3

Please sign in to comment.