[A13] LabelBase.CapitalizeFirst() should not be called since LabelBaseCap exists

Started by Alistaire, April 12, 2016, 01:48:46 PM

Previous topic - Next topic

Alistaire

This method exists:
// Verse.Thing
public virtual string LabelBaseCap
{
get
{
return this.LabelBase.CapitalizeFirst();
}
}


.. yet:
// RimWorld.Tradeable
public virtual string Label
{
get
{
return this.AnyThing.LabelBase.CapitalizeFirst();
}
}


.. while it should be called as this.AnyThing.LabelBaseCap:
return this.AnyThing.LabelBaseCap;

If a modded Thing wants to prepend something to any visible label it currently has to override LabelBase which means every other call (not
RimWorld.Tradeable) will be capitalizing the prepended text rather than the LabelBase text.