Fix newlines in C# files.
This commit is contained in:
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
amount = resources.ChangeCash(amount);
|
||||
|
||||
if (info.ShowTicks && amount != 0)
|
||||
if (info.ShowTicks && amount != 0)
|
||||
AddCashTick(self, amount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2018 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
@@ -52,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var resources = newOwner.PlayerActor.Trait<PlayerResources>();
|
||||
|
||||
var amount = resources.ChangeCash(info.Amount);
|
||||
var amount = resources.ChangeCash(info.Amount);
|
||||
|
||||
if (!info.ShowTicks && amount != 0)
|
||||
return;
|
||||
|
||||
@@ -88,16 +88,16 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public int ChangeCash(int amount)
|
||||
{
|
||||
if (amount >= 0)
|
||||
if (amount >= 0)
|
||||
GiveCash(amount);
|
||||
else
|
||||
else
|
||||
{
|
||||
// Don't put the player into negative funds
|
||||
// Don't put the player into negative funds
|
||||
amount = Math.Max(-(Cash + Resources), amount);
|
||||
|
||||
TakeCash(-amount);
|
||||
}
|
||||
|
||||
|
||||
TakeCash(-amount);
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user