Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Tiberian Sun building repair and power down indicator palette #7957

Merged
merged 2 commits into from Apr 25, 2015

Conversation

Mailaender
Copy link
Member

Also exposes the required sequences to https://github.com/OpenRA/OpenRA/wiki/Traits documentation.

@@ -19,6 +19,11 @@ public class CanPowerDownInfo : UpgradableTraitInfo, ITraitInfo, Requires<PowerI
[Desc("Restore power when this trait is disabled.")]
public readonly bool CancelWhenDisabled = false;

public readonly string PoweroffImage = "poweroff";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You use a different naming style for each option. Please be consistent! My preference is IndicatorImage, IndicatorSequence, and IndicatorPalette.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

@pchote
Copy link
Member

pchote commented Apr 15, 2015

The repair indicator has the same palette problem, so it would make sense to fix that at the same time.

@Mailaender Mailaender force-pushed the ts-powerdown-indicator-palette branch from 5ddd20f to 18fda23 Compare April 16, 2015 05:18
@Mailaender Mailaender changed the title Fixed Tiberian Sun power down indicator palette Fixed Tiberian Sun buliding repair and power down indicator palette Apr 16, 2015
@Mailaender
Copy link
Member Author

Fixed the repair palette as well.

[Desc("Overrides the IndicatorPalettePrefix.")]
public readonly string IndicatorPalette = "";

[Desc("Suffixed by the interal repairing player name.")]
public readonly string IndicatorPalettePrefix = "player";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to keep feature-creeping, but could we change PalettePrefixPlayerPalette to match what we do in the render traits?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I get away without an update rule?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think about that... lets leave this for a future pr which can include an upgrade rule.

@reaperrr reaperrr changed the title Fixed Tiberian Sun buliding repair and power down indicator palette Fixed Tiberian Sun building repair and power down indicator palette Apr 17, 2015
@Mailaender Mailaender force-pushed the ts-powerdown-indicator-palette branch from 49fbdce to ca30ee4 Compare April 18, 2015 12:14
@Mailaender
Copy link
Member Author

Was forced to rebase this.

@abcdefg30
Copy link
Member

Works ingame. 👍 / ✅

{
this.building = building;
this.palettePrefix = palettePrefix;

rb = building.TraitOrDefault<RepairableBuilding>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be .Trait so that it throws a useful exception instead of NREing below.

@pchote
Copy link
Member

pchote commented Apr 25, 2015

For some additional polish it would be nice if you could fix the indicator offsets, but that's not a blocking issue here.

@Mailaender
Copy link
Member Author

Updated.

int shownPlayer = 0;
PaletteReference palette;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only ever used as a local variable, so it shouldn't be stored as a field.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

@Mailaender Mailaender force-pushed the ts-powerdown-indicator-palette branch from 2abe0c2 to a5f60de Compare April 25, 2015 07:36
@pchote
Copy link
Member

pchote commented Apr 25, 2015

👍

pchote added a commit that referenced this pull request Apr 25, 2015
Fixed Tiberian Sun building repair and power down indicator palette
@pchote pchote merged commit 6b79af4 into OpenRA:bleed Apr 25, 2015
@Mailaender Mailaender deleted the ts-powerdown-indicator-palette branch April 25, 2015 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants