Merge pull request #5721 from RoosterDragon/stylecop-small-projects
Run StyleCop on the smaller projects.
This commit is contained in:
344
OpenRA.CrashDialog/Settings.StyleCop
Normal file
344
OpenRA.CrashDialog/Settings.StyleCop
Normal file
@@ -0,0 +1,344 @@
|
|||||||
|
<StyleCopSettings Version="105">
|
||||||
|
<Analyzers>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="ElementsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="EnumerationItemsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationMustContainValidXml">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustHaveSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementDocumentationMustHaveSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustHaveSummaryText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParametersMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementReturnValueMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementReturnValueDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="VoidReturnValueMustNotBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParametersMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationTextMustNotBeEmpty">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationTextMustContainWhitespace">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationMustMeetCharacterPercentage">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="IncludedDocumentationXPathDoesNotExist">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileMustHaveHeader">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustShowCopyright">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustHaveCopyrightText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustContainFileName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustHaveValidCompanyText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="TabsMustNotBeUsed">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="StatementMustNotBeOnSingleLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementMustNotBeOnSingleLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="CurlyBracketsMustNotBeOmitted">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustBeSeparatedByBlankLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustAppearInTheCorrectOrder">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustBeOrderedByAccess">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="UseStringEmptyForEmptyStrings">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PrefixLocalCallsWithThis">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PrefixCallsCorrectly">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ParameterMustFollowComma">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="AccessModifierMustBeDeclared">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FieldsMustBePrivate">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileMayOnlyContainASingleClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
</Analyzers>
|
||||||
|
</StyleCopSettings>
|
||||||
344
OpenRA.Irc/Settings.StyleCop
Normal file
344
OpenRA.Irc/Settings.StyleCop
Normal file
@@ -0,0 +1,344 @@
|
|||||||
|
<StyleCopSettings Version="105">
|
||||||
|
<Analyzers>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="ElementsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="EnumerationItemsMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationMustContainValidXml">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustHaveSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementDocumentationMustHaveSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustHaveSummaryText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParametersMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementParameterDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementReturnValueMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementReturnValueDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="VoidReturnValueMustNotBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParametersMustBeDocumented">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationTextMustNotBeEmpty">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationTextMustContainWhitespace">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationMustMeetCharacterPercentage">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="IncludedDocumentationXPathDoesNotExist">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileMustHaveHeader">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustShowCopyright">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustHaveCopyrightText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustContainFileName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderMustHaveValidCompanyText">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="TabsMustNotBeUsed">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="StatementMustNotBeOnSingleLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementMustNotBeOnSingleLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="CurlyBracketsMustNotBeOmitted">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustBeSeparatedByBlankLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustAppearInTheCorrectOrder">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ElementsMustBeOrderedByAccess">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="UseStringEmptyForEmptyStrings">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PrefixLocalCallsWithThis">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="PrefixCallsCorrectly">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ParameterMustFollowComma">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
|
||||||
|
<Rules>
|
||||||
|
<Rule Name="AccessModifierMustBeDeclared">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FieldsMustBePrivate">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="FileMayOnlyContainASingleClass">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
|
||||||
|
<RuleSettings>
|
||||||
|
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||||
|
</RuleSettings>
|
||||||
|
</Rule>
|
||||||
|
</Rules>
|
||||||
|
<AnalyzerSettings />
|
||||||
|
</Analyzer>
|
||||||
|
</Analyzers>
|
||||||
|
</StyleCopSettings>
|
||||||
@@ -64,7 +64,7 @@ namespace OpenRA.Lint
|
|||||||
.Select(m => m.Map);
|
.Select(m => m.Map);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
maps = new [] { new Map(map) };
|
maps = new[] { new Map(map) };
|
||||||
|
|
||||||
foreach (var testMap in maps)
|
foreach (var testMap in maps)
|
||||||
{
|
{
|
||||||
@@ -87,10 +87,10 @@ namespace OpenRA.Lint
|
|||||||
{
|
{
|
||||||
var customPass = (ILintPass)Game.modData.ObjectCreator
|
var customPass = (ILintPass)Game.modData.ObjectCreator
|
||||||
.CreateBasic(customPassType);
|
.CreateBasic(customPassType);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
Console.WriteLine("Pass: {0}".F(customPassType.ToString()));
|
Console.WriteLine("Pass: {0}".F(customPassType.ToString()));
|
||||||
|
|
||||||
customPass.Run(EmitError, EmitWarning, testMap);
|
customPass.Run(EmitError, EmitWarning, testMap);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
{
|
{
|
||||||
public class CncIngameChromeLogic
|
public class CncIngameChromeLogic
|
||||||
{
|
{
|
||||||
Widget ingameRoot;
|
readonly Widget ingameRoot;
|
||||||
readonly World world;
|
readonly World world;
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
powerBar.GetProvided = () => powerManager.PowerProvided;
|
powerBar.GetProvided = () => powerManager.PowerProvided;
|
||||||
powerBar.GetUsed = () => powerManager.PowerDrained;
|
powerBar.GetUsed = () => powerManager.PowerDrained;
|
||||||
powerBar.TooltipFormat = "Power Usage: {0}/{1}";
|
powerBar.TooltipFormat = "Power Usage: {0}/{1}";
|
||||||
powerBar.GetBarColor = () =>
|
powerBar.GetBarColor = () =>
|
||||||
{
|
{
|
||||||
if (powerManager.PowerState == PowerState.Critical)
|
if (powerManager.PowerState == PowerState.Critical)
|
||||||
return Color.Red;
|
return Color.Red;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
|
|
||||||
var lowpower = pm.PowerState != PowerState.Normal;
|
var lowpower = pm.PowerState != PowerState.Normal;
|
||||||
var time = palette.CurrentQueue.GetBuildTime(actor)
|
var time = palette.CurrentQueue.GetBuildTime(actor)
|
||||||
* ((lowpower) ? palette.CurrentQueue.Info.LowPowerSlowdown : 1);
|
* (lowpower ? palette.CurrentQueue.Info.LowPowerSlowdown : 1);
|
||||||
var timeString = "T: {0}".F(WidgetUtils.FormatTime(time));
|
var timeString = "T: {0}".F(WidgetUtils.FormatTime(time));
|
||||||
timeLabel.GetText = () => timeString;
|
timeLabel.GetText = () => timeString;
|
||||||
timeLabel.GetColor = () => lowpower ? Color.Red : Color.White;
|
timeLabel.GetColor = () => lowpower ? Color.Red : Color.White;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
|||||||
|
|
||||||
if (hotkey == Game.Settings.Keys.NextProductionTabKey)
|
if (hotkey == Game.Settings.Keys.NextProductionTabKey)
|
||||||
return SelectNextTab(false);
|
return SelectNextTab(false);
|
||||||
else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey)
|
else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey)
|
||||||
return SelectNextTab(true);
|
return SelectNextTab(true);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ namespace OpenRA.Traits
|
|||||||
BottomRight = 0x80,
|
BottomRight = 0x80,
|
||||||
|
|
||||||
All = 0xFF
|
All = 0xFF
|
||||||
};
|
}
|
||||||
|
|
||||||
static readonly Dictionary<string, int[]> variants = new Dictionary<string, int[]>()
|
static readonly Dictionary<string, int[]> Variants = new Dictionary<string, int[]>()
|
||||||
{
|
{
|
||||||
{ "cleara", new[] { 0, 50 } },
|
{ "cleara", new[] { 0, 50 } },
|
||||||
{ "clearb", new[] { 1, 51 } },
|
{ "clearb", new[] { 1, 51 } },
|
||||||
@@ -43,7 +43,7 @@ namespace OpenRA.Traits
|
|||||||
{ "cleard", new[] { 0, 53 } },
|
{ "cleard", new[] { 0, 53 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
static readonly Dictionary<ClearSides, int> spriteMap = new Dictionary<ClearSides, int>()
|
static readonly Dictionary<ClearSides, int> SpriteMap = new Dictionary<ClearSides, int>()
|
||||||
{
|
{
|
||||||
{ ClearSides.None, 0 },
|
{ ClearSides.None, 0 },
|
||||||
{ ClearSides.Left | ClearSides.Top | ClearSides.TopLeft | ClearSides.TopRight | ClearSides.BottomLeft | ClearSides.BottomRight, 2 },
|
{ ClearSides.Left | ClearSides.Top | ClearSides.TopLeft | ClearSides.TopRight | ClearSides.BottomLeft | ClearSides.BottomRight, 2 },
|
||||||
@@ -111,16 +111,16 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
if (render[p.X - 1, p.Y - 1].Type != t)
|
if (render[p.X - 1, p.Y - 1].Type != t)
|
||||||
ret |= ClearSides.TopLeft;
|
ret |= ClearSides.TopLeft;
|
||||||
|
|
||||||
if (render[p.X + 1, p.Y - 1].Type != t)
|
if (render[p.X + 1, p.Y - 1].Type != t)
|
||||||
ret |= ClearSides.TopRight;
|
ret |= ClearSides.TopRight;
|
||||||
|
|
||||||
if (render[p.X - 1, p.Y + 1].Type != t)
|
if (render[p.X - 1, p.Y + 1].Type != t)
|
||||||
ret |= ClearSides.BottomLeft;
|
ret |= ClearSides.BottomLeft;
|
||||||
|
|
||||||
if (render[p.X + 1, p.Y + 1].Type != t)
|
if (render[p.X + 1, p.Y + 1].Type != t)
|
||||||
ret |= ClearSides.BottomRight;
|
ret |= ClearSides.BottomRight;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,11 +134,11 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
if (clear == ClearSides.None)
|
if (clear == ClearSides.None)
|
||||||
{
|
{
|
||||||
var sprites = variants[t.Variant];
|
var sprites = Variants[t.Variant];
|
||||||
var frame = t.Density > t.Type.Info.MaxDensity / 2 ? 1 : 0;
|
var frame = t.Density > t.Type.Info.MaxDensity / 2 ? 1 : 0;
|
||||||
t.Sprite = t.Type.Variants.First().Value[sprites[frame]];
|
t.Sprite = t.Type.Variants.First().Value[sprites[frame]];
|
||||||
}
|
}
|
||||||
else if (spriteMap.TryGetValue(clear, out index))
|
else if (SpriteMap.TryGetValue(clear, out index))
|
||||||
t.Sprite = t.Type.Variants.First().Value[index];
|
t.Sprite = t.Type.Variants.First().Value[index];
|
||||||
else
|
else
|
||||||
t.Sprite = null;
|
t.Sprite = null;
|
||||||
@@ -165,7 +165,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
protected override string ChooseRandomVariant(ResourceType t)
|
protected override string ChooseRandomVariant(ResourceType t)
|
||||||
{
|
{
|
||||||
return variants.Keys.Random(Game.CosmeticRandom);
|
return Variants.Keys.Random(Game.CosmeticRandom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.D2k
|
|||||||
{
|
{
|
||||||
readonly ThrowsShrapnelInfo info;
|
readonly ThrowsShrapnelInfo info;
|
||||||
|
|
||||||
public ThrowsShrapnel(ThrowsShrapnelInfo info)
|
public ThrowsShrapnel(ThrowsShrapnelInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.D2k
|
|||||||
var args = new ProjectileArgs
|
var args = new ProjectileArgs
|
||||||
{
|
{
|
||||||
Weapon = wep,
|
Weapon = wep,
|
||||||
Facing = self.World.SharedRandom.Next(-1,255),
|
Facing = self.World.SharedRandom.Next(-1, 255),
|
||||||
FirepowerModifier = self.TraitsImplementing<IFirepowerModifier>()
|
FirepowerModifier = self.TraitsImplementing<IFirepowerModifier>()
|
||||||
.Select(a => a.GetFirepowerModifier())
|
.Select(a => a.GetFirepowerModifier())
|
||||||
.Product(),
|
.Product(),
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ namespace OpenRA.Mods.TS.Widgets.Logic
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CheckForDisk()
|
void CheckForDisk()
|
||||||
{
|
{
|
||||||
Func<string, bool> ValidDiskFilter = diskRoot => File.Exists(diskRoot+Path.DirectorySeparatorChar+"multi.mix") &&
|
Func<string, bool> validDiskFilter = diskRoot => File.Exists(diskRoot + Path.DirectorySeparatorChar + "multi.mix") &&
|
||||||
File.Exists(new string[] { diskRoot, "install", "tibsun.mix" }.Aggregate(Path.Combine));
|
File.Exists(new string[] { diskRoot, "install", "tibsun.mix" }.Aggregate(Path.Combine));
|
||||||
|
|
||||||
var path = InstallUtils.GetMountedDisk(ValidDiskFilter);
|
var path = InstallUtils.GetMountedDisk(validDiskFilter);
|
||||||
|
|
||||||
if (path != null)
|
if (path != null)
|
||||||
Install(path);
|
Install(path);
|
||||||
@@ -67,27 +67,27 @@ namespace OpenRA.Mods.TS.Widgets.Logic
|
|||||||
insertDiskContainer.IsVisible = () => false;
|
insertDiskContainer.IsVisible = () => false;
|
||||||
installingContainer.IsVisible = () => true;
|
installingContainer.IsVisible = () => true;
|
||||||
|
|
||||||
var dest = new string[] { Platform.SupportDir, "Content", "ts" }.Aggregate(Path.Combine);
|
var dest = new string[] { Platform.SupportDir, "Content", "ts" }.Aggregate(Path.Combine);
|
||||||
var copyFiles = new string[] { "install/tibsun.mix", "scores.mix", "multi.mix"};
|
var copyFiles = new string[] { "install/tibsun.mix", "scores.mix", "multi.mix" };
|
||||||
|
|
||||||
var installCounter = 0;
|
var installCounter = 0;
|
||||||
var installTotal = copyFiles.Count();
|
var installTotal = copyFiles.Count();
|
||||||
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
progressBar.Percentage = installCounter*100/installTotal;
|
progressBar.Percentage = installCounter * 100 / installTotal;
|
||||||
installCounter++;
|
installCounter++;
|
||||||
|
|
||||||
statusLabel.GetText = () => s;
|
statusLabel.GetText = () => s;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
|
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
statusLabel.GetText = () => "Error: "+s;
|
statusLabel.GetText = () => "Error: " + s;
|
||||||
backButton.IsDisabled = () => false;
|
backButton.IsDisabled = () => false;
|
||||||
retryButton.IsDisabled = () => false;
|
retryButton.IsDisabled = () => false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var t = new Thread( _ =>
|
var t = new Thread(_ =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -108,5 +108,4 @@ namespace OpenRA.Mods.TS.Widgets.Logic
|
|||||||
t.Start();
|
t.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
if (SDL.SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object") == SDL.SDL_bool.SDL_FALSE)
|
if (SDL.SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object") == SDL.SDL_bool.SDL_FALSE)
|
||||||
{
|
{
|
||||||
ErrorHandler.WriteGraphicsLog("OpenRA requires the OpenGL extension GL_EXT_framebuffer_object.\n"
|
ErrorHandler.WriteGraphicsLog("OpenRA requires the OpenGL extension GL_EXT_framebuffer_object.\n"
|
||||||
+"Please try updating your GPU driver to the latest version provided by the manufacturer.");
|
+ "Please try updating your GPU driver to the latest version provided by the manufacturer.");
|
||||||
throw new InvalidProgramException("Missing OpenGL extension GL_EXT_framebuffer_object. See graphics.log for details.");
|
throw new InvalidProgramException("Missing OpenGL extension GL_EXT_framebuffer_object. See graphics.log for details.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,13 +200,13 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GrabWindowMouseFocus()
|
public void GrabWindowMouseFocus()
|
||||||
{
|
{
|
||||||
SDL.SDL_SetWindowGrab(window, SDL.SDL_bool.SDL_TRUE);
|
SDL.SDL_SetWindowGrab(window, SDL.SDL_bool.SDL_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseWindowMouseFocus()
|
public void ReleaseWindowMouseFocus()
|
||||||
{
|
{
|
||||||
SDL.SDL_SetWindowGrab(window, SDL.SDL_bool.SDL_FALSE);
|
SDL.SDL_SetWindowGrab(window, SDL.SDL_bool.SDL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
GL.BufferData(BufferTarget.ArrayBuffer,
|
GL.BufferData(BufferTarget.ArrayBuffer,
|
||||||
new IntPtr(VertexSize * size),
|
new IntPtr(VertexSize * size),
|
||||||
new T[size],
|
new T[size],
|
||||||
BufferUsageHint.DynamicDraw
|
BufferUsageHint.DynamicDraw);
|
||||||
);
|
|
||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,39 +40,39 @@ namespace OpenRA.TilesetBuilder
|
|||||||
{
|
{
|
||||||
this.Show();
|
this.Show();
|
||||||
using (var formNew = new FormNew { })
|
using (var formNew = new FormNew { })
|
||||||
if (DialogResult.OK == formNew.ShowDialog())
|
if (DialogResult.OK == formNew.ShowDialog())
|
||||||
{
|
|
||||||
PaletteFromImage = formNew.PaletteFromImage;
|
|
||||||
PaletteFile = formNew.PaletteFile;
|
|
||||||
ImageFile = formNew.ImageFile;
|
|
||||||
TileSize = formNew.TileSize;
|
|
||||||
|
|
||||||
srcfile = ImageFile;
|
|
||||||
this.size = TileSize;
|
|
||||||
surface1.TileSize = TileSize;
|
|
||||||
|
|
||||||
Bitmap rbitmap;
|
|
||||||
using (var fbitmap = new Bitmap(ImageFile))
|
|
||||||
rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height),
|
|
||||||
fbitmap.PixelFormat);
|
|
||||||
|
|
||||||
int[] shadowIndex = { };
|
|
||||||
|
|
||||||
if (!PaletteFromImage)
|
|
||||||
{
|
{
|
||||||
TerrainPalette = Palette.Load(PaletteFile, shadowIndex);
|
PaletteFromImage = formNew.PaletteFromImage;
|
||||||
rbitmap.Palette = TerrainPalette.AsSystemPalette();
|
PaletteFile = formNew.PaletteFile;
|
||||||
|
ImageFile = formNew.ImageFile;
|
||||||
|
TileSize = formNew.TileSize;
|
||||||
|
|
||||||
|
srcfile = ImageFile;
|
||||||
|
this.size = TileSize;
|
||||||
|
surface1.TileSize = TileSize;
|
||||||
|
|
||||||
|
Bitmap rbitmap;
|
||||||
|
using (var fbitmap = new Bitmap(ImageFile))
|
||||||
|
rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height),
|
||||||
|
fbitmap.PixelFormat);
|
||||||
|
|
||||||
|
int[] shadowIndex = { };
|
||||||
|
|
||||||
|
if (!PaletteFromImage)
|
||||||
|
{
|
||||||
|
TerrainPalette = Palette.Load(PaletteFile, shadowIndex);
|
||||||
|
rbitmap.Palette = TerrainPalette.AsSystemPalette();
|
||||||
|
}
|
||||||
|
|
||||||
|
surface1.Image = (Bitmap)rbitmap;
|
||||||
|
surface1.TilesPerRow = surface1.Image.Size.Width / surface1.TileSize;
|
||||||
|
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
||||||
|
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
||||||
|
surface1.Templates = new List<Template>();
|
||||||
|
surface1.Size = surface1.Image.Size;
|
||||||
|
surface1.Enabled = true;
|
||||||
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
surface1.Image = (Bitmap)rbitmap;
|
|
||||||
surface1.TilesPerRow = surface1.Image.Size.Width / surface1.TileSize;
|
|
||||||
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
|
||||||
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
|
||||||
surface1.Templates = new List<Template>();
|
|
||||||
surface1.Size = surface1.Image.Size;
|
|
||||||
surface1.Enabled = true;
|
|
||||||
Load();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FormBuilder(string src, string tsize, bool autoExport, string outputDir)
|
public FormBuilder(string src, string tsize, bool autoExport, string outputDir)
|
||||||
@@ -89,7 +89,7 @@ namespace OpenRA.TilesetBuilder
|
|||||||
TerrainType = new TerrainTypeInfo[terrainDefinition.Keys.Count];
|
TerrainType = new TerrainTypeInfo[terrainDefinition.Keys.Count];
|
||||||
|
|
||||||
var title = this.Text;
|
var title = this.Text;
|
||||||
surface1.UpdateMouseTilePosition += (x, y, tileNr) =>
|
surface1.UpdateMouseTilePosition += (x, y, tileNr) =>
|
||||||
{
|
{
|
||||||
this.Text = "{0} - {1} ({2,3}, {3,3}) tileNr: {4,3}".F(title, txtTilesetName.Text, x, y, tileNr);
|
this.Text = "{0} - {1} ({2,3}, {3,3}) tileNr: {4,3}".F(title, txtTilesetName.Text, x, y, tileNr);
|
||||||
};
|
};
|
||||||
@@ -104,8 +104,8 @@ namespace OpenRA.TilesetBuilder
|
|||||||
{
|
{
|
||||||
for (var y = 0; y < icon.Height; y++)
|
for (var y = 0; y < icon.Height; y++)
|
||||||
{
|
{
|
||||||
var newColor = deftype.Value.Color;
|
var newColor = deftype.Value.Color;
|
||||||
icon.SetPixel(x, y, newColor);
|
icon.SetPixel(x, y, newColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,17 +149,17 @@ namespace OpenRA.TilesetBuilder
|
|||||||
|
|
||||||
public new void Load()
|
public new void Load()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var doc = new XmlDocument();
|
var doc = new XmlDocument();
|
||||||
doc.Load(Path.ChangeExtension(srcfile, "tsx"));
|
doc.Load(Path.ChangeExtension(srcfile, "tsx"));
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//name").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//name").OfType<XmlElement>())
|
||||||
txtTilesetName.Text = e.GetAttribute("value");
|
txtTilesetName.Text = e.GetAttribute("value");
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//terrain").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//terrain").OfType<XmlElement>())
|
||||||
surface1.TerrainTypes[int.Parse(e.GetAttribute("x")),
|
surface1.TerrainTypes[int.Parse(e.GetAttribute("x")),
|
||||||
int.Parse(e.GetAttribute("y"))] = int.Parse(e.GetAttribute("t"));
|
int.Parse(e.GetAttribute("y"))] = int.Parse(e.GetAttribute("t"));
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//template").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//template").OfType<XmlElement>())
|
||||||
surface1.Templates.Add(new Template
|
surface1.Templates.Add(new Template
|
||||||
@@ -168,13 +168,13 @@ namespace OpenRA.TilesetBuilder
|
|||||||
.Select(f => new int2(int.Parse(f.GetAttribute("x")), int.Parse(f.GetAttribute("y"))))
|
.Select(f => new int2(int.Parse(f.GetAttribute("x")), int.Parse(f.GetAttribute("y"))))
|
||||||
.ToDictionary(a => a, a => true)
|
.ToDictionary(a => a, a => true)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile, "tsx"),
|
using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile, "tsx"),
|
||||||
new XmlWriterSettings { Indent = true, IndentChars = " " }))
|
new XmlWriterSettings { Indent = true, IndentChars = " " }))
|
||||||
{
|
{
|
||||||
var tilesetName = txtTilesetName.Text;
|
var tilesetName = txtTilesetName.Text;
|
||||||
@@ -227,9 +227,9 @@ namespace OpenRA.TilesetBuilder
|
|||||||
innerTsb.Checked = false;
|
innerTsb.Checked = false;
|
||||||
tsb.Checked = true;
|
tsb.Checked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveClicked(object sender, EventArgs e) { Save(); }
|
void SaveClicked(object sender, EventArgs e) { Save(); }
|
||||||
void ShowOverlaysClicked(object sender, EventArgs e)
|
void ShowOverlaysClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
surface1.ShowTerrainTypes = ((ToolStripButton)sender).Checked;
|
surface1.ShowTerrainTypes = ((ToolStripButton)sender).Checked;
|
||||||
surface1.Invalidate();
|
surface1.Invalidate();
|
||||||
@@ -296,7 +296,7 @@ namespace OpenRA.TilesetBuilder
|
|||||||
for (var j = 0; j < tileSize; j++)
|
for (var j = 0; j < tileSize; j++)
|
||||||
for (var i = 0; i < tileSize; i++)
|
for (var i = 0; i < tileSize; i++)
|
||||||
{
|
{
|
||||||
bw.Write(q[i + j * data.Stride]);
|
bw.Write(q[i + j * data.Stride]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -368,8 +368,7 @@ namespace OpenRA.TilesetBuilder
|
|||||||
id: tilesetID.ToUpper(),
|
id: tilesetID.ToUpper(),
|
||||||
palette: tilesetPalette.ToLower(),
|
palette: tilesetPalette.ToLower(),
|
||||||
extensions: new string[] { ext[0], ext[1] },
|
extensions: new string[] { ext[0], ext[1] },
|
||||||
terrainInfo: TerrainType
|
terrainInfo: TerrainType);
|
||||||
);
|
|
||||||
|
|
||||||
// List of files to add to the mix file
|
// List of files to add to the mix file
|
||||||
var fileList = new List<string>();
|
var fileList = new List<string>();
|
||||||
@@ -398,8 +397,7 @@ namespace OpenRA.TilesetBuilder
|
|||||||
id: cur,
|
id: cur,
|
||||||
image: "{0}{1:00}".F(txtTilesetName.Text, cur),
|
image: "{0}{1:00}".F(txtTilesetName.Text, cur),
|
||||||
size: new int2(tp.Width, tp.Height),
|
size: new int2(tp.Width, tp.Height),
|
||||||
tiles: tiles
|
tiles: tiles);
|
||||||
);
|
|
||||||
|
|
||||||
tileset.Templates.Add(cur, template);
|
tileset.Templates.Add(cur, template);
|
||||||
cur++;
|
cur++;
|
||||||
@@ -422,11 +420,11 @@ namespace OpenRA.TilesetBuilder
|
|||||||
var idx = (t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top);
|
var idx = (t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top);
|
||||||
|
|
||||||
// TemplateID CellID tilenr TemplateW TemplateH XinTilesPNG YinTilesPNG
|
// TemplateID CellID tilenr TemplateW TemplateH XinTilesPNG YinTilesPNG
|
||||||
Console.WriteLine("{0} {1} {2} {3} {4} {5} {6}",
|
Console.WriteLine("{0} {1} {2} {3} {4} {5} {6}",
|
||||||
cur,
|
cur,
|
||||||
idx,
|
idx,
|
||||||
((t.Key.Y * surface1.TilesPerRow) + t.Key.X),
|
t.Key.Y * surface1.TilesPerRow + t.Key.X,
|
||||||
tp.Width,
|
tp.Width,
|
||||||
tp.Height,
|
tp.Height,
|
||||||
t.Key.X,
|
t.Key.X,
|
||||||
t.Key.Y);
|
t.Key.Y);
|
||||||
|
|||||||
@@ -90,10 +90,10 @@ namespace OpenRA.Utility
|
|||||||
var shadowIndex = new int[] { };
|
var shadowIndex = new int[] { };
|
||||||
if (args.Contains("--noshadow"))
|
if (args.Contains("--noshadow"))
|
||||||
{
|
{
|
||||||
Array.Resize(ref shadowIndex, shadowIndex.Length + 3);
|
Array.Resize(ref shadowIndex, shadowIndex.Length + 3);
|
||||||
shadowIndex[shadowIndex.Length - 1] = 1;
|
shadowIndex[shadowIndex.Length - 1] = 1;
|
||||||
shadowIndex[shadowIndex.Length - 2] = 3;
|
shadowIndex[shadowIndex.Length - 2] = 3;
|
||||||
shadowIndex[shadowIndex.Length - 3] = 4;
|
shadowIndex[shadowIndex.Length - 3] = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
var palette = Palette.Load(args[2], shadowIndex);
|
var palette = Palette.Load(args[2], shadowIndex);
|
||||||
@@ -356,7 +356,7 @@ namespace OpenRA.Utility
|
|||||||
var inner = outer.SelectMany(i => i.GetGenericArguments()).ToArray();
|
var inner = outer.SelectMany(i => i.GetGenericArguments()).ToArray();
|
||||||
|
|
||||||
// Remove the namespace and the trailing "Info"
|
// Remove the namespace and the trailing "Info"
|
||||||
return inner.Select(i => i.Name.Split(new [] { '.' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault())
|
return inner.Select(i => i.Name.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault())
|
||||||
.Select(s => s.EndsWith("Info") ? s.Remove(s.Length - 4, 4) : s)
|
.Select(s => s.EndsWith("Info") ? s.Remove(s.Length - 4, 4) : s)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,13 +56,12 @@ namespace OpenRA.Utility
|
|||||||
if (translatables.Contains(node.Key) && !alreadyTranslated)
|
if (translatables.Contains(node.Key) && !alreadyTranslated)
|
||||||
{
|
{
|
||||||
var translationKey = "{0}-{1}-{2}".F(container.Replace('_', '-'), parentLabel.Replace('_', '-'), node.Key.ToUpper());
|
var translationKey = "{0}-{1}-{2}".F(container.Replace('_', '-'), parentLabel.Replace('_', '-'), node.Key.ToUpper());
|
||||||
Console.WriteLine("\t{0}: {1}", translationKey , node.Value.Value);
|
Console.WriteLine("\t{0}: {1}", translationKey, node.Value.Value);
|
||||||
node.Value.Value = "@{0}@".F(translationKey);
|
node.Value.Value = "@{0}@".F(translationKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
FromChromeLayout(ref node.Value.Nodes, node, translatables, container);
|
FromChromeLayout(ref node.Value.Nodes, node, translatables, container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ namespace OpenRA.Utility
|
|||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Split using DirectorySeparators but keep the separators
|
// Split using DirectorySeparators but keep the separators
|
||||||
//
|
|
||||||
var parts = new List<string>();
|
var parts = new List<string>();
|
||||||
|
|
||||||
for (var startIndex = 0; startIndex < filePath.Length;)
|
for (var startIndex = 0; startIndex < filePath.Length;)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Utility
|
|||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
static Dictionary<string, Action<string[]>> Actions = new Dictionary<string, Action<string[]>>()
|
static readonly Dictionary<string, Action<string[]>> Actions = new Dictionary<string, Action<string[]>>()
|
||||||
{
|
{
|
||||||
{ "--settings-value", Command.Settings },
|
{ "--settings-value", Command.Settings },
|
||||||
{ "--shp", Command.ConvertPngToShp },
|
{ "--shp", Command.ConvertPngToShp },
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ namespace OpenRA.Utility
|
|||||||
|
|
||||||
if (engineVersion < 20140615)
|
if (engineVersion < 20140615)
|
||||||
{
|
{
|
||||||
if (depth == 2 && parentKey == "Warhead" && node.Key == "Ore" )
|
if (depth == 2 && parentKey == "Warhead" && node.Key == "Ore")
|
||||||
node.Key = "DestroyResources";
|
node.Key = "DestroyResources";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user