polish multiple rows of pips (RA proc)
This commit is contained in:
@@ -109,7 +109,11 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
foreach (var pips in self.TraitsImplementing<IPips>())
|
foreach (var pips in self.TraitsImplementing<IPips>())
|
||||||
{
|
{
|
||||||
foreach (var pip in pips.GetPips(self))
|
var thisRow = pips.GetPips(self);
|
||||||
|
if (thisRow == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (var pip in thisRow)
|
||||||
{
|
{
|
||||||
if (pipxyOffset.X+5 > self.GetBounds(false).Width)
|
if (pipxyOffset.X+5 > self.GetBounds(false).Width)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public IEnumerable<PipType> GetPips (Actor self)
|
public IEnumerable<PipType> GetPips (Actor self)
|
||||||
{
|
{
|
||||||
if (!Info.LocalStorage)
|
if (!Info.LocalStorage)
|
||||||
return new PipType[] { };
|
return null;
|
||||||
|
|
||||||
return Graphics.Util.MakeArray (Info.PipCount, i => (Ore * 1f / Info.Capacity > i * 1f / Info.PipCount) ? Info.PipColor : PipType.Transparent);
|
return Graphics.Util.MakeArray (Info.PipCount, i => (Ore * 1f / Info.Capacity > i * 1f / Info.PipCount) ? Info.PipColor : PipType.Transparent);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user