[
  {
    "path": ".editorconfig",
    "content": "; Top-most https://editorconfig.org/ file\nroot = true\ncharset=utf-8\n\n; Unix-style newlines\n[*]\nend_of_line = LF\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n; 4-column tab indentation\n[*.{cs,csproj,yaml,lua,sh,ps1}]\nindent_style = tab\nindent_size = 4\n\n; .NET coding conventions\n#### Code Style Rules\n#### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/\n\n# Severity Levels: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-options#severity-level\n# Below we enable specific rules by setting severity to warning.\n# Rules are disabled by setting severity to silent (to still allow use in IDE) or none (to prevent all use).\n# Rules are listed below with any options available.\n# Options are commented out if they match the defaults.\n\n### Language and Unnecessary Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/language-rules\n\n## 'using' directive preferences\n\n# IDE0073 Require file header\n#file_header_template = unset\n# This rule does not allow us to enforce our desired header, as it prefixes the header lines with // comments, meaning we can't apply a region.\ndotnet_diagnostic.IDE0073.severity = none\n\n# IDE0005 Remove unnecessary import\n# No options\n# IDE0005 is only enabled in the IDE by default. https://github.com/dotnet/roslyn/issues/41640\n# To enable it for builds outside the IDE the 'GenerateDocumentationFile' property must be enabled on the build.\n# GenerateDocumentationFile generates additional warnings about XML docs, so disable any we don't care about.\ndotnet_diagnostic.CS1591.severity = none # Missing XML comment for publicly visible type or member\ndotnet_diagnostic.IDE0005.severity = warning\n\n# IDE0065 'using' directive placement\n#csharp_using_directive_placement = outside_namespace\ndotnet_diagnostic.IDE0065.severity = silent\n\n## Code-block preferences\n\n# IDE0011 Add braces\n#csharp_prefer_braces = true\n# No options match the style used in OpenRA.\ndotnet_diagnostic.IDE0011.severity = none\n\n# IDE0063 Use simple 'using' statement\n#csharp_prefer_simple_using_statement = true\ndotnet_diagnostic.IDE0063.severity = silent\n\n# IDE0160/IDE0161 Use block-scoped namespace/Use file-scoped namespace\n#csharp_style_namespace_declarations = block_scoped\ndotnet_diagnostic.IDE0160.severity = warning\ndotnet_diagnostic.IDE0161.severity = warning\n\n# IDE0200 Remove unnecessary lambda expression\n#csharp_style_prefer_method_group_conversion = true\ndotnet_diagnostic.IDE0200.severity = silent # Requires C# 11\n\n# IDE0210 Convert to top-level statements/IDE0211 Convert to 'Program.Main' style program\ncsharp_style_prefer_top_level_statements = false\ndotnet_diagnostic.IDE0210.severity = warning\ndotnet_diagnostic.IDE0211.severity = warning\n\n# IDE0290 Use primary constructor\n#csharp_style_prefer_primary_constructors = true\ndotnet_diagnostic.IDE0200.severity = silent # Requires C# 12\n\n# IDE0330 Prefer 'System.Threading.Lock'\n#csharp_prefer_system_threading_lock = true\ndotnet_diagnostic.IDE0330.severity = silent # Requires C# 13\n\n## Expression-bodied members\n\n# IDE0021 Use expression body for constructors\n#csharp_style_expression_bodied_constructors = false\ndotnet_diagnostic.IDE0021.severity = silent\n\n# IDE0022 Use expression body for methods\n#csharp_style_expression_bodied_methods = false\ndotnet_diagnostic.IDE0022.severity = silent\n\n# IDE0023/IDE0024 Use expression body for conversion operators/Use expression body for operators\n#csharp_style_expression_bodied_operators = false\ndotnet_diagnostic.IDE0023.severity = silent\ndotnet_diagnostic.IDE0024.severity = silent\n\n# IDE0025 Use expression body for properties\n#csharp_style_expression_bodied_properties = true\ndotnet_diagnostic.IDE0025.severity = silent\n\n# IDE0026 Use expression body for indexers\n#csharp_style_expression_bodied_indexers = true\ndotnet_diagnostic.IDE0026.severity = silent\n\n# IDE0027 Use expression body for accessors\n#csharp_style_expression_bodied_accessors = true\ndotnet_diagnostic.IDE0027.severity = warning\n\n# IDE0053 Use expression body for lambdas\n# This rule is buggy and not enforced for builds. ':warning' will at least enforce it in the IDE.\ncsharp_style_expression_bodied_lambdas = when_on_single_line:warning\ndotnet_diagnostic.IDE0053.severity = warning\n\n# IDE0061 Use expression body for local functions\ncsharp_style_expression_bodied_local_functions = when_on_single_line\ndotnet_diagnostic.IDE0061.severity = warning\n\n## Expression-level preferences\n\n# IDE0001 Simplify name\n# No options\ndotnet_diagnostic.IDE0001.severity = warning\n\n# IDE0002 Simplify member access\n# No options\ndotnet_diagnostic.IDE0002.severity = warning\n\n# IDE0004 Remove unnecessary cast\n# No options\ndotnet_diagnostic.IDE0004.severity = warning\n\n# IDE0010 Add missing cases to switch statement\n# No options\ndotnet_diagnostic.IDE0010.severity = silent\n\n# IDE0017 Use object initializers\n#dotnet_style_object_initializer = true\ndotnet_diagnostic.IDE0017.severity = warning\n\n# IDE0028 Use collection initializers\n#dotnet_style_collection_initializer = true\ndotnet_diagnostic.IDE0028.severity = warning\n\n# IDE0029/IDE0030/IDE0270 Use coalesce expression (non-nullable types)/Use coalesce expression (nullable types)/Use coalesce expression (if null)\n#dotnet_style_coalesce_expression = true\ndotnet_diagnostic.IDE0029.severity = warning\ndotnet_diagnostic.IDE0030.severity = warning\ndotnet_diagnostic.IDE0270.severity = silent\n\n# IDE0031 Use null propagation\n#dotnet_style_null_propagation = true\ndotnet_diagnostic.IDE0031.severity = warning\n\n# IDE0032 Use auto-implemented property\n#dotnet_style_prefer_auto_properties = true\ndotnet_diagnostic.IDE0032.severity = warning\n\n# IDE0033 Use explicitly provided tuple name\n#dotnet_style_explicit_tuple_names = true\ndotnet_diagnostic.IDE0033.severity = warning\n\n# IDE0035 Remove unreachable code\n# No options\n# Duplicates compiler warning CS0162\ndotnet_diagnostic.IDE0035.severity = none\n\n# IDE0037 Use inferred member name\n#dotnet_style_prefer_inferred_tuple_names = true\n#dotnet_style_prefer_inferred_anonymous_type_member_names = true\ndotnet_diagnostic.IDE0037.severity = silent\n\n# IDE0041 Use 'is null' check\n#dotnet_style_prefer_is_null_check_over_reference_equality_method = true\ndotnet_diagnostic.IDE0041.severity = warning\n\n# IDE0045 Use conditional expression for assignment\n#dotnet_style_prefer_conditional_expression_over_assignment = true\ndotnet_diagnostic.IDE0045.severity = silent\n\n# IDE0046 Use conditional expression for return\n#dotnet_style_prefer_conditional_expression_over_return = true\ndotnet_diagnostic.IDE0046.severity = silent\n\n# IDE0050 Convert anonymous type to tuple\n# No options\ndotnet_diagnostic.IDE0050.severity = silent\n\n# IDE0051 Remove unused private member\n# No options\ndotnet_diagnostic.IDE0051.severity = warning\n\n# IDE0052 Remove unread private member\n# No options\ndotnet_diagnostic.IDE0052.severity = warning\n\n# IDE0054/IDE0074 Use compound assignment/Use coalesce compound assignment\n#dotnet_style_prefer_compound_assignment = true\ndotnet_diagnostic.IDE0054.severity = warning\ndotnet_diagnostic.IDE0074.severity = warning\n\n# IDE0058 Remove unnecessary expression value\n#csharp_style_unused_value_expression_statement_preference = discard_variable\ndotnet_diagnostic.IDE0058.severity = silent\n\n# IDE0059 Remove unnecessary value assignment\n#csharp_style_unused_value_assignment_preference = discard_variable\ndotnet_diagnostic.IDE0059.severity = warning\n\n# IDE0070 Use 'System.HashCode.Combine'\n# No options\ndotnet_diagnostic.IDE0070.severity = warning\n\n# IDE0071 Simplify interpolation\n#dotnet_style_prefer_simplified_interpolation = true\ndotnet_diagnostic.IDE0071.severity = warning\n\n# IDE0075 Simplify conditional expression\n#dotnet_style_prefer_simplified_boolean_expressions = true\ndotnet_diagnostic.IDE0075.severity = warning\n\n# IDE0082 Convert 'typeof' to 'nameof'\n# No options\ndotnet_diagnostic.IDE0082.severity = warning\n\n# IDE0100 Remove unnecessary equality operator\n# No options\ndotnet_diagnostic.IDE0100.severity = warning\n\n# IDE0120 Simplify LINQ expression\n# No options\ndotnet_diagnostic.IDE0120.severity = warning\n\n# IDE0130 Namespace does not match folder structure\n#dotnet_style_namespace_match_folder = true\n# This rule doesn't appear to work (never reports violations)\ndotnet_diagnostic.IDE0130.severity = none\n\n# IDE0016 Use throw expression\n#csharp_style_throw_expression = true\ndotnet_diagnostic.IDE0016.severity = silent\n\n# IDE0018 Inline variable declaration\n#csharp_style_inlined_variable_declaration = true\ndotnet_diagnostic.IDE0018.severity = warning\n\n# IDE0034 Simplify 'default' expression\n#csharp_prefer_simple_default_expression = true\ndotnet_diagnostic.IDE0034.severity = warning\n\n# IDE0039 Use local function instead of lambda\n#csharp_style_prefer_local_over_anonymous_function = true\ndotnet_diagnostic.IDE0039.severity = warning\n\n# IDE0042 Deconstruct variable declaration\n#csharp_style_deconstructed_variable_declaration = true\ndotnet_diagnostic.IDE0042.severity = warning\n\n# IDE0056 Use index operator\n#csharp_style_prefer_index_operator = true\ndotnet_diagnostic.IDE0056.severity = warning\n\n# IDE0057 Use range operator\n#csharp_style_prefer_range_operator = true\ndotnet_diagnostic.IDE0057.severity = warning\n\n# IDE0072 Add missing cases to switch expression\n# No options\ndotnet_diagnostic.IDE0072.severity = silent\n\n# IDE0080 Remove unnecessary suppression operator\n# No options\ndotnet_diagnostic.IDE0080.severity = warning\n\n# IDE0090 Simplify 'new' expression\n#csharp_style_implicit_object_creation_when_type_is_apparent = true\ndotnet_diagnostic.IDE0090.severity = warning\n\n# IDE0110 Remove unnecessary discard\n# No options\ndotnet_diagnostic.IDE0110.severity = warning\n\n# IDE0150 Prefer 'null' check over type check\n#csharp_style_prefer_null_check_over_type_check = true\ndotnet_diagnostic.IDE0150.severity = warning\n\n# IDE0180 Use tuple to swap values\n#csharp_style_prefer_tuple_swap = true\ndotnet_diagnostic.IDE0180.severity = warning\n\n# IDE0220 Add explicit cast in foreach loop\n#dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed\ndotnet_diagnostic.IDE0220.severity = warning\n\n# IDE0230 Use UTF-8 string literal\n#csharp_style_prefer_utf8_string_literals = true\ndotnet_diagnostic.IDE0230.severity = silent # Requires C# 11\n\n# IDE0240 Nullable directive is redundant\n# No options\ndotnet_diagnostic.IDE0240.severity = warning\n\n# IDE0241 Nullable directive is unnecessary\n# No options\ndotnet_diagnostic.IDE0241.severity = warning\n\n# This option applies to the collection expression rules below\n# .NET 8 defaults to true/when_types_exactly_match, .NET 9+ defaults to when_types_loosely_match\n#dotnet_style_prefer_collection_expression = true\n\n# IDE0300 Use collection expression for array\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0300.severity = silent # Requires C# 12\n\n# IDE0301 Use collection expression for empty\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0301.severity = silent # Requires C# 12\n\n# IDE0302 Use collection expression for stackalloc\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0302.severity = silent # Requires C# 12\n\n# IDE0303 Use collection expression for 'Create()'\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0303.severity = silent # Requires C# 12\n\n# IDE0304 Use collection expression for builder\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0304.severity = silent # Requires C# 12\n\n# IDE0305 Use collection expression for fluent\n# From above, uses dotnet_style_prefer_collection_expression\ndotnet_diagnostic.IDE0305.severity = silent # Requires C# 12\n\n## Field preferences\n\n# IDE0044 Add readonly modifier\n#dotnet_style_readonly_field = true\ndotnet_diagnostic.IDE0044.severity = warning\n\n## Language keyword vs. framework types preferences\n\n# IDE0049 Use language keywords instead of framework type names for type references\n#dotnet_style_predefined_type_for_locals_parameters_members = true\n#dotnet_style_predefined_type_for_member_access = true\ndotnet_diagnostic.IDE0049.severity = warning\n\n## Modifier preferences\n\n# IDE0036 Order modifiers\n#csharp_preferred_modifier_order = public, private, protected, internal, file, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, required, volatile, async\ndotnet_diagnostic.IDE0036.severity = warning\n\n# IDE0040 Add accessibility modifiers\ndotnet_style_require_accessibility_modifiers = omit_if_default\ndotnet_diagnostic.IDE0040.severity = warning\n\n# IDE0062 Make local function static\n#csharp_prefer_static_local_function = true\ndotnet_diagnostic.IDE0062.severity = warning\n\n# IDE0064 Make struct fields writable\n# No options\ndotnet_diagnostic.IDE0064.severity = warning\n\n# IDE0250 Struct can be made 'readonly'\n#csharp_style_prefer_readonly_struct = true\ndotnet_diagnostic.IDE0250.severity = warning\n\n# IDE0251 Member can be made 'readonly'\n#csharp_style_prefer_readonly_struct_member = true\ndotnet_diagnostic.IDE0251.severity = warning\n\n# IDE0320 Make anonymous function static\n#csharp_prefer_static_anonymous_function = true\ndotnet_diagnostic.IDE0320.severity = warning\n\n## Null-checking preferences\n\n# IDE1005 Use conditional delegate call\ncsharp_style_conditional_delegate_call = true # true is the default, but the rule is not triggered if this is not specified.\ndotnet_diagnostic.IDE1005.severity = warning\n\n## Parameter preferences\n\n# IDE0060 Remove unused parameter\ndotnet_code_quality_unused_parameters = non_public\ndotnet_diagnostic.IDE0060.severity = warning\n\n# IDE0280 Use 'nameof'\n# No options\ndotnet_diagnostic.IDE0280.severity = silent # Requires C# 11\n\n## Parentheses preferences\n\n# IDE0047/IDE0048 Remove unnecessary parentheses/Add parentheses for clarity\ndotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary\ndotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary\n#dotnet_style_parentheses_in_other_binary_operators = always_for_clarity\n#dotnet_style_parentheses_in_other_operators = never_if_unnecessary\ndotnet_diagnostic.IDE0047.severity = warning\ndotnet_diagnostic.IDE0048.severity = warning\n\n## Pattern-matching preferences\n\n# IDE0019 Use pattern matching to avoid 'as' followed by a 'null' check\n#csharp_style_pattern_matching_over_as_with_null_check = true\ndotnet_diagnostic.IDE0019.severity = warning\n\n# IDE0020/IDE0038 Use pattern matching to avoid 'is' check followed by a cast (with variable)/Use pattern matching to avoid 'is' check followed by a cast (without variable)\n#csharp_style_pattern_matching_over_is_with_cast_check = true\ndotnet_diagnostic.IDE0020.severity = warning\ndotnet_diagnostic.IDE0038.severity = warning\n\n# IDE0066 Use switch expression\n#csharp_style_prefer_switch_expression = true\ndotnet_diagnostic.IDE0066.severity = silent\n\n# IDE0078/IDE0260 Use pattern matching\n#csharp_style_prefer_pattern_matching = true\n#csharp_style_pattern_matching_over_as_with_null_check = true\ndotnet_diagnostic.IDE0078.severity = silent\ndotnet_diagnostic.IDE0260.severity = silent\n\n# IDE0083 Use pattern matching ('not' operator)\n#csharp_style_prefer_not_pattern = true\ndotnet_diagnostic.IDE0083.severity = warning\n\n# IDE0170 Simplify property pattern\n#csharp_style_prefer_extended_property_pattern = true\ndotnet_diagnostic.IDE0170.severity = silent # Requires C# 10\n\n## Suppression preferences\n\n# IDE0079 Remove unnecessary suppression\n#dotnet_remove_unnecessary_suppression_exclusions = none\ndotnet_diagnostic.IDE0079.severity = warning\n\n## 'this' and 'Me' preferences\n\n# IDE0003/IDE0009 Remove 'this' or 'Me' qualification/Add 'this' or 'Me' qualification\n#dotnet_style_qualification_for_field = false\n#dotnet_style_qualification_for_property = false\n#dotnet_style_qualification_for_method = false\n#dotnet_style_qualification_for_event = false\ndotnet_diagnostic.IDE0003.severity = warning\ndotnet_diagnostic.IDE0009.severity = warning\n\n## 'var' preferences\n\n# IDE0007/IDE0008 Use 'var' instead of explicit type/Use explicit type instead of 'var'\ncsharp_style_var_for_built_in_types = true\ncsharp_style_var_when_type_is_apparent = true\ncsharp_style_var_elsewhere = true\ndotnet_diagnostic.IDE0007.severity = warning\ndotnet_diagnostic.IDE0008.severity = warning\n\n\n### Miscellaneous Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/miscellaneous-rules\n\n# IDE0076 Remove invalid global 'SuppressMessageAttribute'\n# No options\ndotnet_diagnostic.IDE0076.severity = warning\n\n# IDE0077 Avoid legacy format target in global 'SuppressMessageAttribute'\n# No options\ndotnet_diagnostic.IDE0077.severity = warning\n\n### Formatting Rules (IDE0055)\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0055\ndotnet_diagnostic.IDE0055.severity = warning\n\n#dotnet_sort_system_directives_first = true\n#dotnet_separate_import_directive_groups = false\n\n#csharp_new_line_before_open_brace = all\n#csharp_new_line_before_else = true\n#csharp_new_line_before_catch = true\n#csharp_new_line_before_finally = true\n#csharp_new_line_before_members_in_object_initializers = true\n#csharp_new_line_before_members_in_anonymous_types = true\n#csharp_new_line_between_query_expression_clauses = true\n\n#csharp_indent_case_contents = true\n#csharp_indent_switch_labels = true\n#csharp_indent_labels = one_less_than_current\n#csharp_indent_block_contents = true\n#csharp_indent_braces = false\ncsharp_indent_case_contents_when_block = false\n\n#csharp_space_after_cast = false\n#csharp_space_after_keywords_in_control_flow_statements = true\n#csharp_space_between_parentheses =\n#csharp_space_before_colon_in_inheritance_clause = true\n#csharp_space_after_colon_in_inheritance_clause = true\n#csharp_space_around_binary_operators = before_and_after\n#csharp_space_between_method_declaration_parameter_list_parentheses = false\n#csharp_space_between_method_declaration_empty_parameter_list_parentheses = false\n#csharp_space_between_method_declaration_name_and_open_parenthesis = false\n#csharp_space_between_method_call_parameter_list_parentheses = false\n#csharp_space_between_method_call_empty_parameter_list_parentheses = false\n#csharp_space_between_method_call_name_and_opening_parenthesis = false\n#csharp_space_after_comma = true\n#csharp_space_before_comma = false\n#csharp_space_after_dot = false\n#csharp_space_before_dot = false\n#csharp_space_after_semicolon_in_for_statement = true\n#csharp_space_before_semicolon_in_for_statement = false\n#csharp_space_around_declaration_statements = false\n#csharp_space_before_open_square_brackets = false\n#csharp_space_between_empty_square_brackets = false\n#csharp_space_between_square_brackets = false\n\n#csharp_preserve_single_line_statements = true\n#csharp_preserve_single_line_blocks = true\n\n\n### Naming Rules (IDE1006)\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules\ndotnet_diagnostic.IDE1006.severity = warning\n\n## Naming styles\n\ndotnet_naming_style.camel_case.capitalization = camel_case\n\ndotnet_naming_style.pascal_case.capitalization = pascal_case\n\ndotnet_naming_style.i_prefix_pascal_case.capitalization = pascal_case\ndotnet_naming_style.i_prefix_pascal_case.required_prefix = I\n\n## Naming Symbols\n\ndotnet_naming_symbols.const_locals.applicable_kinds = local\ndotnet_naming_symbols.const_locals.applicable_accessibilities = *\ndotnet_naming_symbols.const_locals.required_modifiers = const\n\ndotnet_naming_symbols.const_fields.applicable_kinds = field\ndotnet_naming_symbols.const_fields.applicable_accessibilities = *\ndotnet_naming_symbols.const_fields.required_modifiers = const\n\ndotnet_naming_symbols.static_readonly_fields.applicable_kinds = field\ndotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = *\ndotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly\n\ndotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field\ndotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, internal, protected, protected_internal, private_protected\ndotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly\n\ndotnet_naming_symbols.private_or_protected_fields.applicable_kinds = field\ndotnet_naming_symbols.private_or_protected_fields.applicable_accessibilities = private, protected, private_protected\n\ndotnet_naming_symbols.interfaces.applicable_kinds = interface\ndotnet_naming_symbols.interfaces.applicable_accessibilities = *\n\ndotnet_naming_symbols.parameters_and_locals.applicable_kinds = parameter, local\ndotnet_naming_symbols.parameters_and_locals.applicable_accessibilities = *\n\ndotnet_naming_symbols.most_symbols.applicable_kinds = namespace, class, struct, enum, field, property, method, local_function, event, delegate, type_parameter\ndotnet_naming_symbols.most_symbols.applicable_accessibilities = *\n\n## Naming Rules\n\ndotnet_naming_rule.const_locals_should_be_pascal_case.symbols = const_locals\ndotnet_naming_rule.const_locals_should_be_pascal_case.style = pascal_case\ndotnet_naming_rule.const_locals_should_be_pascal_case.severity = warning\n\ndotnet_naming_rule.const_fields_should_be_pascal_case.symbols = const_fields\ndotnet_naming_rule.const_fields_should_be_pascal_case.style = pascal_case\ndotnet_naming_rule.const_fields_should_be_pascal_case.severity = warning\n\ndotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols = static_readonly_fields\ndotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style = pascal_case\ndotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = warning\n\ndotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields\ndotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = pascal_case\ndotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = warning\n\ndotnet_naming_rule.private_or_protected_fields_should_be_camel_case.symbols = private_or_protected_fields\ndotnet_naming_rule.private_or_protected_fields_should_be_camel_case.style = camel_case\ndotnet_naming_rule.private_or_protected_fields_should_be_camel_case.severity = warning\n\ndotnet_naming_rule.interfaces_should_be_i_prefix_pascal_case.symbols = interfaces\ndotnet_naming_rule.interfaces_should_be_i_prefix_pascal_case.style = i_prefix_pascal_case\ndotnet_naming_rule.interfaces_should_be_i_prefix_pascal_case.severity = warning\n\ndotnet_naming_rule.parameters_and_locals_should_be_camel_case.symbols = parameters_and_locals\ndotnet_naming_rule.parameters_and_locals_should_be_camel_case.style = camel_case\ndotnet_naming_rule.parameters_and_locals_should_be_camel_case.severity = warning\n\ndotnet_naming_rule.most_symbols_should_be_pascal_case.symbols = most_symbols\ndotnet_naming_rule.most_symbols_should_be_pascal_case.style = pascal_case\ndotnet_naming_rule.most_symbols_should_be_pascal_case.severity = warning\n\n\n### StyleCop.Analyzers\n### https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/DOCUMENTATION.md\n\n# Below we enable rule categories by setting severity to warning.\n# We'll only list rules to disable.\n# Individual rules we wish to disable are typically set to none severity.\n\n# Covers SAxxxx and SXxxxx rules\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.DocumentationRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.MaintainabilityRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.OrderingRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.ReadabilityRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = warning\ndotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpecialRules.severity = warning\n\n# Rules that are covered by IDE0001 Simplify name\ndotnet_diagnostic.SA1125.severity = none # UseShorthandForNullableTypes\n\n# Rules that are covered by IDE0047 Remove unnecessary parentheses\ndotnet_diagnostic.SA1119.severity = none # StatementMustNotUseUnnecessaryParenthesis\n\n# Rules that are covered by IDE0055 Formatting Rules\ndotnet_diagnostic.SA1027.severity = none # UseTabsCorrectly\n\n# Rules that are covered by IDE1006 Naming Rules\ndotnet_diagnostic.SA1300.severity = none # ElementMustBeginWithUpperCaseLetter\ndotnet_diagnostic.SA1302.severity = none # InterfaceNamesMustBeginWithI\ndotnet_diagnostic.SA1303.severity = none # ConstFieldNamesMustBeginWithUpperCaseLetter\ndotnet_diagnostic.SA1304.severity = none # NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter\ndotnet_diagnostic.SA1306.severity = none # FieldNamesMustBeginWithLowerCaseLetter\ndotnet_diagnostic.SA1307.severity = none # AccessibleFieldsMustBeginWithUpperCaseLetter\ndotnet_diagnostic.SA1311.severity = none # StaticReadonlyFieldsMustBeginWithUpperCaseLetter\ndotnet_diagnostic.SA1312.severity = none # VariableNamesMustBeginWithLowerCaseLetter\ndotnet_diagnostic.SA1313.severity = none # ParameterNamesMustBeginWithLowerCaseLetter\n\n# Rules that conflict with OpenRA project style conventions\ndotnet_diagnostic.SA1101.severity = none # PrefixLocalCallsWithThis\ndotnet_diagnostic.SA1107.severity = none # CodeMustNotContainMultipleStatementsOnOneLine\ndotnet_diagnostic.SA1116.severity = none # SplitParametersMustStartOnLineAfterDeclaration\ndotnet_diagnostic.SA1117.severity = none # ParametersMustBeOnSameLineOrSeparateLines\ndotnet_diagnostic.SA1118.severity = none # ParameterMustNotSpanMultipleLines\ndotnet_diagnostic.SA1122.severity = none # UseStringEmptyForEmptyStrings\ndotnet_diagnostic.SA1124.severity = none # DoNotUseRegions\ndotnet_diagnostic.SA1127.severity = none # GenericTypeConstraintsMustBeOnOwnLine\ndotnet_diagnostic.SA1132.severity = none # DoNotCombineFields\ndotnet_diagnostic.SA1135.severity = none # UsingDirectivesMustBeQualified\ndotnet_diagnostic.SA1136.severity = none # EnumValuesShouldBeOnSeparateLines\ndotnet_diagnostic.SA1200.severity = none # UsingDirectivesMustBePlacedCorrectly\ndotnet_diagnostic.SA1201.severity = none # ElementsMustAppearInTheCorrectOrder\ndotnet_diagnostic.SA1202.severity = none # ElementsMustBeOrderedByAccess\ndotnet_diagnostic.SA1204.severity = none # StaticElementsMustAppearBeforeInstanceElements\ndotnet_diagnostic.SA1214.severity = none # ReadonlyElementsMustAppearBeforeNonReadonlyElements\ndotnet_diagnostic.SX1309.severity = none # FieldNamesMustBeginWithUnderscore\ndotnet_diagnostic.SX1309S.severity = none # StaticFieldNamesMustBeginWithUnderscore\ndotnet_diagnostic.SA1314.severity = none # TypeParameterNamesMustBeginWithT\ndotnet_diagnostic.SA1400.severity = none # AccessModifierMustBeDeclared\ndotnet_diagnostic.SA1401.severity = none # FieldsMustBePrivate\ndotnet_diagnostic.SA1402.severity = none # FileMayOnlyContainASingleType\ndotnet_diagnostic.SA1407.severity = none # ArithmeticExpressionsMustDeclarePrecedence\ndotnet_diagnostic.SA1413.severity = none # UseTrailingCommasInMultiLineInitializers\ndotnet_diagnostic.SA1501.severity = none # StatementMustNotBeOnSingleLine\ndotnet_diagnostic.SA1502.severity = none # ElementMustNotBeOnSingleLine\ndotnet_diagnostic.SA1503.severity = none # BracesMustNotBeOmitted\ndotnet_diagnostic.SA1516.severity = none # ElementsMustBeSeparatedByBlankLine\ndotnet_diagnostic.SA1519.severity = none # BracesMustNotBeOmittedFromMultiLineChildStatement\ndotnet_diagnostic.SA1520.severity = none # UseBracesConsistently\ndotnet_diagnostic.SA1600.severity = none # ElementsMustBeDocumented\ndotnet_diagnostic.SA1601.severity = none # PartialElementsMustBeDocumented\ndotnet_diagnostic.SA1602.severity = none # EnumerationItemsMustBeDocumented\ndotnet_diagnostic.SA1611.severity = none # ElementParametersShouldBeDocumented\ndotnet_diagnostic.SA1615.severity = none # ElementReturnValueShouldBeDocumented\ndotnet_diagnostic.SA1618.severity = none # GenericTypeParametersShouldBeDocumented\ndotnet_diagnostic.SA1623.severity = none # PropertySummaryDocumentationShouldMatchAccessors\ndotnet_diagnostic.SA1633.severity = none # FileMustHaveHeader\ndotnet_diagnostic.SA1642.severity = none # ConstructorSummaryDocumentationShouldBeginWithStandardText\ndotnet_diagnostic.SA1649.severity = none # FileNameMustMatchTypeName\n\n#### Code Quality Rules\n#### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/\n\n# Below we enable specific rules by setting severity to warning.\n# Rules are disabled by setting severity to silent (to still allow use in IDE) or none (to prevent all use).\n# Rules are listed below with any options available.\n# Options are commented out if they match the defaults.\n\n# Rule options that apply over multiple rules are set here.\n# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-quality-rule-options\ndotnet_code_quality.api_surface = all\n\n### Design Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/design-warnings\n\n# Collections should implement generic interface.\n#dotnet_code_quality.CA1010.additional_required_generic_interfaces =\ndotnet_diagnostic.CA1010.severity = warning\n\n# Abstract types should not have public constructors.\ndotnet_diagnostic.CA1012.severity = warning\n\n# Mark attributes with 'AttributeUsageAttribute'.\ndotnet_diagnostic.CA1018.severity = warning\n\n# Override methods on comparable types.\ndotnet_diagnostic.CA1036.severity = warning\n\n# Provide ObsoleteAttribute message.\ndotnet_diagnostic.CA1041.severity = warning\n\n# Do not declare protected members in sealed types.\ndotnet_diagnostic.CA1047.severity = warning\n\n# Declare types in namespaces.\ndotnet_diagnostic.CA1050.severity = warning\n\n# Static holder types should be 'Static' or 'NotInheritable'.\ndotnet_diagnostic.CA1052.severity = warning\n\n# Do not hide base class methods.\ndotnet_diagnostic.CA1061.severity = warning\n\n# Exceptions should be public.\ndotnet_diagnostic.CA1064.severity = warning\n\n# Implement 'IEquatable' when overriding 'Equals'.\ndotnet_diagnostic.CA1066.severity = warning\n\n# Override 'Equals' when implementing 'IEquatable'.\ndotnet_diagnostic.CA1067.severity = warning\n\n# 'CancellationToken' parameters must come last.\ndotnet_diagnostic.CA1068.severity = warning\n\n# Do not declare event fields as virtual.\ndotnet_diagnostic.CA1070.severity = warning\n\n### Documentation Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/documentation-warnings\n\n# Avoid using 'cref' tags with a prefix.\ndotnet_diagnostic.CA1200.severity = warning\n\n### Globalization Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/globalization-warnings\n\n# Specify 'CultureInfo'.\ndotnet_diagnostic.CA1304.severity = warning\n\n# Specify 'IFormatProvider'.\ndotnet_diagnostic.CA1305.severity = warning\n\n# Specify 'StringComparison' for correctness.\ndotnet_diagnostic.CA1310.severity = warning\n\n# Specify a culture or use an invariant version.\ndotnet_diagnostic.CA1311.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n### Portability and Interoperability Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/interoperability-warnings\n\n# Do not use 'OutAttribute' on string parameters for P/Invokes.\ndotnet_diagnostic.CA1417.severity = warning\n\n### Maintainability Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings\n\n# Use 'nameof' in place of string.\ndotnet_diagnostic.CA1507.severity = warning\n\n# Use ArgumentNullException throw helper.\ndotnet_diagnostic.CA1510.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Use ArgumentException throw helper.\ndotnet_diagnostic.CA1511.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Use ArgumentOutOfRangeException throw helper.\ndotnet_diagnostic.CA1512.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Use ObjectDisposedException throw helper.\ndotnet_diagnostic.CA1513.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Avoid redundant length argument.\ndotnet_diagnostic.CA1514.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n### Naming Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/naming-warnings\n\n# Do not prefix enum values with type name.\ndotnet_code_quality.CA1712.enum_values_prefix_trigger = AnyEnumValue\ndotnet_diagnostic.CA1712.severity = warning\n\n# Flags enums should have plural names.\ndotnet_diagnostic.CA1714.severity = warning\n\n# Only 'FlagsAttribute' enums should have plural names.\ndotnet_diagnostic.CA1717.severity = warning\n\n### Performance Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings\n\n# Use Literals Where Appropriate.\n#dotnet_code_quality.CA1802.required_modifiers = static\ndotnet_diagnostic.CA1802.severity = warning\n\n# Remove empty finalizers.\ndotnet_diagnostic.CA1821.severity = warning\n\n# Mark members as static.\ndotnet_code_quality.CA1822.api_surface = private,internal\ndotnet_diagnostic.CA1822.severity = warning\n\n# Avoid unused private fields.\ndotnet_diagnostic.CA1823.severity = warning\n\n# Avoid zero-length array allocations.\ndotnet_diagnostic.CA1825.severity = warning\n\n# Use property instead of Linq Enumerable method.\n#dotnet_code_quality.CA1826.exclude_ordefault_methods = false\ndotnet_diagnostic.CA1826.severity = warning\n\n# Do not use Count/LongCount when Any can be used.\ndotnet_diagnostic.CA1827.severity = warning\n\n# Do not use CountAsync/LongCountAsync when AnyAsync can be used.\ndotnet_diagnostic.CA1828.severity = warning\n\n# Use Length/Count property instead of Enumerable.Count method.\ndotnet_diagnostic.CA1829.severity = warning\n\n# Prefer strongly-typed Append and Insert method overloads on StringBuilder.\ndotnet_diagnostic.CA1830.severity = warning\n\n# Use AsSpan instead of Range-based indexers for string when appropriate.\ndotnet_diagnostic.CA1831.severity = warning\n\n# Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array.\ndotnet_diagnostic.CA1832.severity = warning\n\n# Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array.\ndotnet_diagnostic.CA1833.severity = warning\n\n# Use StringBuilder.Append(char) for single character strings.\ndotnet_diagnostic.CA1834.severity = warning\n\n# Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes.\ndotnet_diagnostic.CA1835.severity = warning\n\n# Prefer IsEmpty over Count when available.\ndotnet_diagnostic.CA1836.severity = warning\n\n# Use Environment.ProcessId instead of Process.GetCurrentProcess().Id.\ndotnet_diagnostic.CA1837.severity = warning\n\n# Avoid StringBuilder parameters for P/Invokes.\ndotnet_diagnostic.CA1838.severity = warning\n\n# Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName.\ndotnet_diagnostic.CA1839.severity = warning\n\n# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId.\ndotnet_diagnostic.CA1840.severity = warning\n\n# Prefer Dictionary Contains methods.\ndotnet_diagnostic.CA1841.severity = warning\n\n# Do not use 'WhenAll' with a single task.\ndotnet_diagnostic.CA1842.severity = warning\n\n# Do not use 'WaitAll' with a single task.\ndotnet_diagnostic.CA1843.severity = warning\n\n# Provide memory-based overrides of async methods when subclassing 'Stream'.\ndotnet_diagnostic.CA1844.severity = warning\n\n# Use span-based 'string.Concat'. (Not available on mono)\ndotnet_diagnostic.CA1845.severity = none\n\n# Prefer AsSpan over Substring.\ndotnet_diagnostic.CA1846.severity = warning\n\n# Use string.Contains(char) instead of string.Contains(string) with single characters.\ndotnet_diagnostic.CA1847.severity = warning\n\n# Call async methods when in an async method.\ndotnet_diagnostic.CA1849.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Prefer static HashData method over ComputeHash. (Not available on mono)\ndotnet_diagnostic.CA1850.severity = none # TODO: Change to warning once using .NET 7 or later AND once supported by mono.\n\n# Possible multiple enumerations of IEnumerable collection.\n#dotnet_code_quality.CA1851.enumeration_methods =\ndotnet_code_quality.CA1851.linq_chain_methods = M:OpenRA.Traits.IRenderModifier.Modify*\ndotnet_code_quality.CA1851.assume_method_enumerates_parameters = true\ndotnet_diagnostic.CA1851.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Seal internal types.\ndotnet_diagnostic.CA1852.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Unnecessary call to 'Dictionary.ContainsKey(key)'.\ndotnet_diagnostic.CA1853.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Prefer the IDictionary.TryGetValue(TKey, out TValue) method.\ndotnet_diagnostic.CA1854.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Use Span<T>.Clear() instead of Span<T>.Fill().\ndotnet_diagnostic.CA1855.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Incorrect usage of ConstantExpected attribute.\ndotnet_diagnostic.CA1856.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# The parameter expects a constant for optimal performance.\ndotnet_diagnostic.CA1857.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Use StartsWith instead of IndexOf.\ndotnet_diagnostic.CA1858.severity = warning\n\n# Avoid using 'Enumerable.Any()' extension method.\ndotnet_diagnostic.CA1860.severity = warning\n\n# Use the 'StringComparison' method overloads to perform case-insensitive string comparisons.\ndotnet_diagnostic.CA1862.severity = warning\n\n# Use 'CompositeFormat'.\ndotnet_diagnostic.CA1863.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Prefer the 'IDictionary.TryAdd(TKey, TValue)' method.\ndotnet_diagnostic.CA1864.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char.\ndotnet_diagnostic.CA1865.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\ndotnet_diagnostic.CA1866.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\ndotnet_diagnostic.CA1867.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Unnecessary call to 'Contains' for sets.\ndotnet_diagnostic.CA1868.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Cache and reuse 'JsonSerializerOptions' instances.\ndotnet_diagnostic.CA1869.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Use a cached 'SearchValues' instance.\ndotnet_diagnostic.CA1870.severity = suggestion # TODO: Change to warning once using .NET 8 or later.\n\n# Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'.\ndotnet_diagnostic.CA1871.severity = warning\n\n# Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'.\ndotnet_diagnostic.CA1872.severity = warning\n\n### Reliability Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/reliability-warnings\n\n# Do not assign property within its setter.\ndotnet_diagnostic.CA2011.severity = warning\n\n# Use ValueTasks correctly.\ndotnet_diagnostic.CA2012.severity = warning\n\n# Do not use ReferenceEquals with value types.\ndotnet_diagnostic.CA2013.severity = warning\n\n# Do not use stackalloc in loops.\ndotnet_diagnostic.CA2014.severity = warning\n\n# Forward the CancellationToken parameter to methods that take one.\ndotnet_diagnostic.CA2016.severity = warning\n\n# The 'count' argument to Buffer.BlockCopy should specify the number of bytes to copy.\ndotnet_diagnostic.CA2018.severity = warning\n\n# ThreadStatic fields should not use inline initialization.\ndotnet_diagnostic.CA2019.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Don't call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types.\ndotnet_diagnostic.CA2021.severity = warning\n\n# Avoid inexact read with Stream.Read.\ndotnet_diagnostic.CA2022.severity = warning\n\n### Security Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/security-warnings\n\n# Do Not Use Broken Cryptographic Algorithms.\ndotnet_diagnostic.CA5351.severity = warning\n\n### Usage Rules\n### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/usage-warnings\n\n# Call GC.SuppressFinalize correctly.\ndotnet_diagnostic.CA1816.severity = warning\n\n# Rethrow to preserve stack details.\ndotnet_diagnostic.CA2200.severity = warning\n\n# Initialize value type static fields inline.\ndotnet_diagnostic.CA2207.severity = warning\n\n# Instantiate argument exceptions correctly.\ndotnet_diagnostic.CA2208.severity = warning\n\n# Non-constant fields should not be visible.\ndotnet_diagnostic.CA2211.severity = silent\n\n# Dispose methods should call base class dispose.\ndotnet_diagnostic.CA2215.severity = warning\n\n# Disposable types should declare finalizer.\ndotnet_diagnostic.CA2216.severity = warning\n\n# Override GetHashCode on overriding Equals.\ndotnet_diagnostic.CA2218.severity = warning\n\n# Overload operator equals on overriding ValueType.Equals.\ndotnet_diagnostic.CA2231.severity = warning\n\n# Provide correct arguments to formatting methods.\n#dotnet_code_quality.CA2241.additional_string_formatting_methods =\n#dotnet_code_quality.CA2241.try_determine_additional_string_formatting_methods_automatically = false\ndotnet_diagnostic.CA2241.severity = warning\n\n# Test for NaN correctly.\ndotnet_diagnostic.CA2242.severity = warning\n\n# Attribute string literals should parse correctly.\ndotnet_diagnostic.CA2243.severity = warning\n\n# Do not duplicate indexed element initializations.\ndotnet_diagnostic.CA2244.severity = warning\n\n# Do not assign a property to itself.\ndotnet_diagnostic.CA2245.severity = warning\n\n# Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum.\ndotnet_diagnostic.CA2247.severity = warning\n\n# Provide correct enum argument to Enum.HasFlag.\ndotnet_diagnostic.CA2248.severity = warning\n\n# Consider using String.Contains instead of String.IndexOf.\ndotnet_diagnostic.CA2249.severity = warning\n\n# Use ThrowIfCancellationRequested.\ndotnet_diagnostic.CA2250.severity = warning\n\n# Use String.Equals over String.Compare.\ndotnet_diagnostic.CA2251.severity = warning\n\n# Ensure ThreadStatic is only used with static fields.\ndotnet_diagnostic.CA2259.severity = suggestion # TODO: Change to warning once using .NET 7 or later.\n\n# Prefer generic overload when type is known.\ndotnet_diagnostic.CA2263.severity = none # TODO: Change to warning once mono is dropped.\n\n# Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'.\ndotnet_diagnostic.CA2264.severity = warning\n\n# Do not compare 'Span<T>' to 'null' or 'default'.\ndotnet_diagnostic.CA2265.severity = warning\n\n### Roslynator.Analyzers\n### https://josefpihrt.github.io/docs/roslynator/analyzers\n\n# We disable the rule category by setting severity to none.\n# Below we enable specific rules by setting severity to warning.\n# Rules are listed below with any options available.\n# Options are commented out if they match the defaults.\ndotnet_analyzer_diagnostic.category-roslynator.severity = none\n\n# A line is too long.\ndotnet_diagnostic.RCS0056.severity = warning\nroslynator_max_line_length = 160 #140\n#roslynator_tab_length = 4\n\n# Remove redundant 'sealed' modifier.\ndotnet_diagnostic.RCS1034.severity = warning\n\n# Remove argument list from attribute.\ndotnet_diagnostic.RCS1039.severity = warning\n\n# Remove empty initializer.\ndotnet_diagnostic.RCS1041.severity = warning\n\n# Remove enum default underlying type.\ndotnet_diagnostic.RCS1042.severity = warning\n\n# Remove 'partial' modifier from type with a single part.\ndotnet_diagnostic.RCS1043.severity = warning\n\n# Use lambda expression instead of anonymous method.\ndotnet_diagnostic.RCS1048.severity = warning\n\n# Simplify boolean comparison.\ndotnet_diagnostic.RCS1049.severity = warning\n\n# Use compound assignment.\ndotnet_diagnostic.RCS1058.severity = warning\n\n# Avoid locking on publicly accessible instance.\ndotnet_diagnostic.RCS1059.severity = warning\n\n# Merge 'if' with nested 'if'.\ndotnet_diagnostic.RCS1061.severity = warning\n\n# Remove empty 'finally' clause.\ndotnet_diagnostic.RCS1066.severity = warning\n\n# Simplify logical negation.\ndotnet_diagnostic.RCS1068.severity = warning\n\n# Remove redundant base constructor call.\ndotnet_diagnostic.RCS1071.severity = warning\n\n# Remove empty namespace declaration.\ndotnet_diagnostic.RCS1072.severity = warning\n\n# Remove redundant constructor.\ndotnet_diagnostic.RCS1074.severity = warning\n\n# Optimize LINQ method call.\ndotnet_diagnostic.RCS1077.severity = warning\n\n# Use 'Count' property instead of 'Any' method.\ndotnet_diagnostic.RCS1080.severity = warning\n\n# Use coalesce expression instead of conditional expression.\ndotnet_diagnostic.RCS1084.severity = warning\n\n# Use --/++ operator instead of assignment.\ndotnet_diagnostic.RCS1089.severity = warning\n\n# Remove empty region.\ndotnet_diagnostic.RCS1091.severity = warning\n\n# Default label should be the last label in a switch section.\ndotnet_diagnostic.RCS1099.severity = warning\n\n# Unnecessary interpolation.\ndotnet_diagnostic.RCS1105.severity = warning\n\n# Remove redundant 'ToCharArray' call.\ndotnet_diagnostic.RCS1107.severity = warning\n\n# Add 'static' modifier to all partial class declarations.\ndotnet_diagnostic.RCS1108.severity = warning\n\n# Combine 'Enumerable.Where' method chain.\ndotnet_diagnostic.RCS1112.severity = warning\n\n# Use 'string.IsNullOrEmpty' method.\ndotnet_diagnostic.RCS1113.severity = warning\n\n# Mark local variable as const.\ndotnet_diagnostic.RCS1118.severity = warning\n\n# Bitwise operation on enum without Flags attribute.\ndotnet_diagnostic.RCS1130.severity = warning\n\n# Remove redundant overriding member.\ndotnet_diagnostic.RCS1132.severity = warning\n\n# Remove redundant Dispose/Close call.\ndotnet_diagnostic.RCS1133.severity = warning\n\n# Remove redundant statement.\ndotnet_diagnostic.RCS1134.severity = warning\n\n# Merge switch sections with equivalent content.\ndotnet_diagnostic.RCS1136.severity = warning\n\n# Simplify coalesce expression.\ndotnet_diagnostic.RCS1143.severity = warning\n\n# Remove redundant cast.\ndotnet_diagnostic.RCS1151.severity = warning\n\n# Use StringComparison when comparing strings.\ndotnet_diagnostic.RCS1155.severity = warning\n\n# Use EventHandler<T>.\ndotnet_diagnostic.RCS1159.severity = warning\n\n# Unused type parameter.\ndotnet_diagnostic.RCS1164.severity = warning\n\n# Use read-only auto-implemented property.\ndotnet_diagnostic.RCS1170.severity = warning\n\n# Use 'is' operator instead of 'as' operator.\ndotnet_diagnostic.RCS1172.severity = warning\n\n# Unused 'this' parameter.\ndotnet_diagnostic.RCS1175.severity = warning\n\n# Unnecessary assignment.\ndotnet_diagnostic.RCS1179.severity = warning\n\n# Use constant instead of field.\ndotnet_diagnostic.RCS1187.severity = warning\n\n# Join string expressions.\ndotnet_diagnostic.RCS1190.severity = warning\n\n# Declare enum value as combination of names.\ndotnet_diagnostic.RCS1191.severity = warning\n\n# Unnecessary usage of verbatim string literal.\ndotnet_diagnostic.RCS1192.severity = warning\n\n# Overriding member should not change 'params' modifier.\ndotnet_diagnostic.RCS1193.severity = warning\n\n# Use ^ operator.\ndotnet_diagnostic.RCS1195.severity = warning\n\n# Unnecessary null check.\ndotnet_diagnostic.RCS1199.severity = warning\n\n# Use EventArgs.Empty.\ndotnet_diagnostic.RCS1204.severity = warning\n\n# Order named arguments according to the order of parameters.\ndotnet_diagnostic.RCS1205.severity = warning\n\n# Order type parameter constraints.\ndotnet_diagnostic.RCS1209.severity = warning\n\n# Unnecessary interpolated string.\ndotnet_diagnostic.RCS1214.severity = warning\n\n# Expression is always equal to 'true'.\ndotnet_diagnostic.RCS1215.severity = warning\n\n# Unnecessary unsafe context.\ndotnet_diagnostic.RCS1216.severity = warning\n\n# Simplify code branching.\ndotnet_diagnostic.RCS1218.severity = warning\n\n# Use pattern matching instead of combination of 'is' operator and cast operator.\ndotnet_diagnostic.RCS1220.severity = warning\n\n# Make class sealed.\ndotnet_diagnostic.RCS1225.severity = warning\n\n# Add paragraph to documentation comment.\ndotnet_diagnostic.RCS1226.severity = warning\n\n# Validate arguments correctly.\ndotnet_diagnostic.RCS1227.severity = warning\n\n# Unnecessary explicit use of enumerator.\ndotnet_diagnostic.RCS1230.severity = warning\n\n# Use short-circuiting operator.\ndotnet_diagnostic.RCS1233.severity = warning\n\n# Optimize method call.\ndotnet_diagnostic.RCS1235.severity = warning\n\n# Use exception filter.\ndotnet_diagnostic.RCS1236.severity = warning\n\n# Use 'for' statement instead of 'while' statement.\ndotnet_diagnostic.RCS1239.severity = warning\n\n# Use element access.\ndotnet_diagnostic.RCS1246.severity = warning\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Enforce LF normalization on Windows\n*.yaml eol=lf\n*.lua eol=lf\n*.cs eol=lf\n*.csproj eol=lf\n*.sln eol=lf\n* text=lf\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: github-actions\n  directory: \"/\"\n  schedule:\n    interval: daily\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: Continuous Integration\n\non:\n  push:\n  pull_request:\n\npermissions:\n  contents: read  #  to fetch code (actions/checkout)\n\njobs:\n  linux:\n    name: Linux (.NET 6.0)\n    runs-on: ubuntu-22.04\n\n    steps:\n      - name: Remove System .NET\n        run: sudo apt-get remove -y dotnet*\n\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Install .NET 6.0\n        uses: actions/setup-dotnet@v5\n        with:\n          dotnet-version: '6.0.x'\n\n      - name: Prepare Environment\n        run: |\n          . mod.config;\n          awk '/\\r$$/ { exit(1); }' mod.config || (printf \"Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\\n\"; exit 1);\n\n      - name: Check Code\n        run: |\n          make check\n          make check-packaging-scripts\n\n      - name: Check Mod\n        run: |\n          sudo apt-get install lua5.1\n          make check-scripts\n          make TREAT_WARNINGS_AS_ERRORS=true test\n\n  linux-mono:\n    name: Linux (mono)\n    runs-on: ubuntu-22.04\n\n    steps:\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Prepare Environment\n        run: |\n          . mod.config;\n          awk '/\\r$$/ { exit(1); }' mod.config || (printf \"Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\\n\"; exit 1);\n\n      - name: Check Code\n        run: |\n          # check-packaging-scripts does not depend on .net/mono, so is not needed here\n          mono --version\n          make RUNTIME=mono check\n\n      - name: Check Mod\n        run: |\n          # check-scripts does not depend on .net/mono, so is not needed here\n          make RUNTIME=mono TREAT_WARNINGS_AS_ERRORS=true test\n\n  windows:\n    name: Windows (.NET 6.0)\n    runs-on: windows-2022\n\n    steps:\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Install .NET 6.0\n        uses: actions/setup-dotnet@v5\n        with:\n          dotnet-version: '6.0.x'\n\n      - name: Check Code\n        shell: powershell\n        run: |\n          # Work around runtime failures on the GH Actions runner\n          dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org\n          .\\make.ps1 check\n\n      - name: Check Mods\n        run: |\n          choco install lua --version 5.1.5.52\n          $ENV:Path = $ENV:Path + \";C:\\Program Files (x86)\\Lua\\5.1\\\"\n          $ENV:TREAT_WARNINGS_AS_ERRORS = \"true\"\n          .\\make.ps1 check-scripts\n          .\\make.ps1 test\n"
  },
  {
    "path": ".github/workflows/packaging.yml",
    "content": "name: Release Packaging\n\non:\n  push:\n    tags:\n    - '*'\n\npermissions:\n  contents: write  #  for release creation (svenstaro/upload-release-action)\n\njobs:\n  linux:\n    name: Linux AppImages\n    runs-on: ubuntu-22.04\n    steps:\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Install .NET 6.0\n        uses: actions/setup-dotnet@v5\n        with:\n          dotnet-version: '6.0.x'\n\n      - name: Prepare Environment\n        run: echo \"GIT_TAG=${GITHUB_REF#refs/tags/}\" >> ${GITHUB_ENV}\n\n      - name: Package AppImage\n        run: |\n          make engine\n          mkdir -p build/linux\n          sudo apt-get install -y desktop-file-utils\n          ./packaging/linux/buildpackage.sh \"${GIT_TAG}\" \"${PWD}/build/linux\"\n\n      - name: Upload Packages\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          gh release upload ${{ github.ref_name }} build/linux/*\n\n  macos:\n    name: macOS Disk Image\n    runs-on: macos-13\n    steps:\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Install .NET 6.0\n        uses: actions/setup-dotnet@v5\n        with:\n          dotnet-version: '6.0.x'\n\n      - name: Prepare Environment\n        run: echo \"GIT_TAG=${GITHUB_REF#refs/tags/}\" >> ${GITHUB_ENV}\n\n      - name: Package Disk Image\n        env:\n          MACOS_DEVELOPER_IDENTITY: ${{ secrets.MACOS_DEVELOPER_IDENTITY }}\n          MACOS_DEVELOPER_CERTIFICATE_BASE64: ${{ secrets.MACOS_DEVELOPER_CERTIFICATE_BASE64 }}\n          MACOS_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_DEVELOPER_CERTIFICATE_PASSWORD }}\n          MACOS_DEVELOPER_USERNAME: ${{ secrets.MACOS_DEVELOPER_USERNAME }}\n          MACOS_DEVELOPER_PASSWORD: ${{ secrets.MACOS_DEVELOPER_PASSWORD }}\n        run: |\n          make engine\n          mkdir -p build/macos\n          ./packaging/macos/buildpackage.sh \"${GIT_TAG}\" \"${PWD}/build/macos\"\n\n      - name: Upload Package\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          gh release upload ${{ github.ref_name }} build/macos/*\n\n  windows:\n    name: Windows Installers\n    runs-on: ubuntu-22.04\n    steps:\n      - name: Clone Repository\n        uses: actions/checkout@v6\n\n      - name: Install .NET 6.0\n        uses: actions/setup-dotnet@v5\n        with:\n          dotnet-version: '6.0.x'\n\n      - name: Prepare Environment\n        run: |\n          echo \"GIT_TAG=${GITHUB_REF#refs/tags/}\" >> ${GITHUB_ENV}\n          sudo apt-get update\n          sudo apt-get install nsis wine64\n\n      - name: Package Installers\n        run: |\n          make engine\n          mkdir -p build/windows\n          ./packaging/windows/buildpackage.sh \"${GIT_TAG}\" \"${PWD}/build/windows\"\n\n      - name: Upload Packages\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          gh release upload ${{ github.ref_name }} build/windows/*\n"
  },
  {
    "path": ".gitignore",
    "content": "user.config\nengine\n\n# Visual Studio\nRelease\nbin\nobj\n*.ncb\n*.vcproj*\n*.suo\n*.user\n*.sln.cache\n*.manifest\n*.CodeAnalysisLog.xml\n*.lastcodeanalysissucceeded\n_ReSharper.*/\n/.vs\n\n# Visual Studio Code\n/.vscode/settings.json\n\n# backup files by various editors\n*~\n*.orig\n\\#*\n.*.sw?\n\n# Monodevelop\n*.pidb\n*.userprefs\n\n# Mac OS X\n.DS_Store\n\n# SublimeText\n*.sublime-project\n*.sublime-workspace\n\n# NUnit\n/TestResult.xml\n/lib/\n\n# Support directory\n/Support\n\n# IntelliJ files\n.idea\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n\t\"recommendations\": [\n\t\t\"EditorConfig.EditorConfig\",\n\t\t\"ms-dotnettools.csharp\",\n\t\t\"openra.oraide-vscode\",\n\t\t\"openra.vscode-openra-lua\",\n\t\t\"macabeus.vscode-fluent\",\n\t]\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n\t\"version\": \"0.2.0\",\n\t\"configurations\": [\n\t\t{\n\t\t\t\"name\": \"Launch (Example)\",\n\t\t\t\"type\": \"coreclr\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"program\": \"${workspaceRoot}/engine/bin/OpenRA.dll\",\n\t\t\t\"args\": [\n\t\t\t\t\"Game.Mod=example\",\n\t\t\t\t\"Engine.EngineDir=${workspaceRoot}/engine\",\n\t\t\t\t\"Engine.ModSearchPaths=${workspaceRoot}/mods, ${workspaceRoot}/engine/mods\",\n\t\t\t\t\"Debug.DisplayDeveloperSettings=true\",\n\t\t\t],\n\t\t\t\"preLaunchTask\": \"build\",\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Launch Utility\",\n\t\t\t\"type\": \"coreclr\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"program\": \"${workspaceRoot}/engine/bin/OpenRA.Utility.dll\",\n\t\t\t\"args\": [\"example\", \"--check-yaml\"],\n\t\t\t\"env\": {\n\t\t\t\t\"ENGINE_DIR\": \"${workspaceRoot}/engine\",\n\t\t\t\t\"MOD_SEARCH_PATHS\": \"${workspaceRoot}/mods, ${workspaceRoot}/engine/mods\"\n\t\t\t},\n\t\t\t\"preLaunchTask\": \"build\",\n\t\t},\n\t],\n}\n"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "{\n\t\"version\": \"2.0.0\",\n\t\"tasks\": [\n\t\t{\n\t\t\t\"label\": \"build\",\n\t\t\t\"command\": \"make\",\n\t\t\t\"args\": [\"all\", \"CONFIGURATION=Debug\"],\n\t\t\t\"windows\": {\n\t\t\t\t\"command\": \"make.cmd\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"label\": \"Run Utility\",\n\t\t\t\"command\": \"dotnet ${workspaceRoot}/engine/bin/OpenRA.Utility.dll ${input:modId} ${input:command}\",\n\t\t\t\"type\": \"shell\",\n\t\t\t\"options\": {\n\t\t\t\t\"env\": {\n\t\t\t\t\t\"ENGINE_DIR\": \"${workspaceRoot}/engine\",\n\t\t\t\t\t\"MOD_SEARCH_PATHS\": \"${workspaceRoot}/mods,${workspaceRoot}/engine/mods\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t],\n\t\"inputs\": [\n\t\t{\n\t\t\t\"id\": \"modId\",\n\t\t\t\"description\": \"ID of the mod to run\",\n\t\t\t\"default\": \"all\",\n\t\t\t\"type\": \"promptString\"\n\t\t}, {\n\t\t\t\"id\": \"command\",\n\t\t\t\"description\": \"Name of the command + parameters\",\n\t\t\t\"default\": \"\",\n\t\t\t\"type\": \"promptString\"\n\t\t},\n\t]\n}\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\nnationality, personal appearance, race, religion, or sexual identity and\norientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\nadvances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by private-messaging a project team member (users with a + in front\nof their name) via our IRC channel (#openra on Libera –\n[webchat](https://web.libera.chat/#openra)). All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at [https://contributor-covenant.org/version/1/4][version]\n\n[homepage]: https://contributor-covenant.org\n[version]: https://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# OpenRA Mod SDK Contributing Guidelines\n\nThank you for your interest in OpenRA, OpenRA modding, and the OpenRA Mod SDK.  OpenRA is an open source project, and our community members – you – are the driving force behind it.  There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into OpenRA, the Mod SDK, or our other sub-projects.\n\nPlease note that this repository is specifically for the scripts and infrastructure used to develop and build mods; bugs and feature requests against OpenRA itself should be directed to [the main OpenRA/OpenRA repository](https://github.com/OpenRA/OpenRA).  If you do come across a bug with the Mod SDK, or would like to request a new feature, then please take a look at the issue tracker first to see if it has already been reported.\n\nWhen developing new features, it is important to make sure that they work on all our supported platforms.  Right now, this means Windows >= 7 (with PowerShell >= 3), macOS >= 10.7, and Linux.  We would like to also support *BSD, but do not currently have a means to test this.\n\nSome issues to be aware of include:\n* Use https://www.shellcheck.net/ to confirm POSIX compatibility of *.sh scripts.\n* Avoid non-standard gnu extensions to common Unix tools (e.g. the `-f` flag from GNU `readlink`)\n\nWhile your pull-request is in review it will be helpful if you join IRC to discuss the changes.\n\nSee also the in-depth guide on [contributing](https://github.com/OpenRA/OpenRA/wiki/Contributing) on the main OpenRA project wiki.  Most of the content on this page also applies to the Mod SDK.\n"
  },
  {
    "path": "COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "ExampleMod.sln",
    "content": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OpenRA.Mods.Example\", \"OpenRA.Mods.Example\\OpenRA.Mods.Example.csproj\", \"{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OpenRA.Game\", \"engine\\OpenRA.Game\\OpenRA.Game.csproj\", \"{0DFB103F-2962-400F-8C6D-E2C28CCBA633}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"OpenRA.Mods.Common\", \"engine\\OpenRA.Mods.Common\\OpenRA.Mods.Common.csproj\", \"{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease-x86|Any CPU = Release-x86|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.Build.0 = Release|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU\n\t\t{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "Makefile",
    "content": "############################# INSTRUCTIONS #############################\n#\n# to compile, run:\n#   make\n#\n# to compile using Mono (version 6.12 or greater) instead of .NET 6, run:\n#   make RUNTIME=mono\n#\n# to compile using system libraries for native dependencies, run:\n#   make [RUNTIME=net6] TARGETPLATFORM=unix-generic\n#\n# to remove the files created by compiling, run:\n#   make clean\n#\n# to set the mods version, run:\n#   make version [VERSION=\"custom-version\"]\n#\n# to check lua scripts for syntax errors, run:\n#   make check-scripts\n#\n# to check the engine and your mod dlls for StyleCop violations, run:\n#   make [RUNTIME=net6] check\n#\n# to check your mod yaml for errors, run:\n#   make [RUNTIME=net6] [TREAT_WARNINGS_AS_ERRORS=false] test\n#\n# the following are internal sdk helpers that are not intended to be run directly:\n#   make check-variables\n#   make check-sdk-scripts\n#   make check-packaging-scripts\n\n.PHONY: check-sdk-scripts check-packaging-scripts check-variables engine all clean version check-scripts check test\n.DEFAULT_GOAL := all\n\nPYTHON = $(shell command -v python3 2> /dev/null)\nifeq ($(PYTHON),)\nPYTHON = $(shell command -v python 2> /dev/null)\nendif\nifeq ($(PYTHON),)\n$(error \"The OpenRA mod SDK requires python.\")\nendif\n\nVERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)\nMOD_ID = $(shell cat user.config mod.config 2> /dev/null | awk -F= '/MOD_ID/ { print $$2; exit }')\nENGINE_DIRECTORY = $(shell cat user.config mod.config 2> /dev/null | awk -F= '/ENGINE_DIRECTORY/ { print $$2; exit }')\nMOD_SEARCH_PATHS = \"$(shell $(PYTHON) -c \"import os; print(os.path.realpath('.'))\")/mods,./mods\"\n\nMANIFEST_PATH = \"mods/$(MOD_ID)/mod.yaml\"\nHAS_LUAC = $(shell command -v luac 2> /dev/null)\nLUA_FILES = $(shell find mods/*/maps/* -iname '*.lua' 2> /dev/null)\nMOD_SOLUTION_FILES = $(shell find . -maxdepth 1 -iname '*.sln' 2> /dev/null)\n\nMSBUILD = msbuild -verbosity:m -nologo\nDOTNET = dotnet\n\nRUNTIME ?= net6\nCONFIGURATION ?= Release\nDOTNET_RID = $(shell ${DOTNET} --info | grep RID: | cut -w -f3)\nARCH_X64 = $(shell echo ${DOTNET_RID} | grep x64)\n\nifndef TARGETPLATFORM\nUNAME_S := $(shell uname -s)\nUNAME_M := $(shell uname -m)\nifeq ($(UNAME_S),Darwin)\nifeq ($(ARCH_X64),)\nTARGETPLATFORM = osx-arm64\nelse\nTARGETPLATFORM = osx-x64\nendif\nelse\nifeq ($(UNAME_M),x86_64)\nTARGETPLATFORM = linux-x64\nelse\nifeq ($(UNAME_M),aarch64)\nTARGETPLATFORM = linux-arm64\nelse\nTARGETPLATFORM = unix-generic\nendif\nendif\nendif\nendif\n\ncheck-sdk-scripts:\n\t@awk '/\\r$$/ { exit(1); }' mod.config || (printf \"Invalid mod.config format: file must be saved using unix-style (CR, not CRLF) line endings.\\n\"; exit 1)\n\t@if [ ! -x \"fetch-engine.sh\" ] || [ ! -x \"launch-dedicated.sh\" ] || [ ! -x \"launch-game.sh\" ] || [ ! -x \"utility.sh\" ]; then \\\n\t\techo \"Required SDK scripts are not executable:\"; \\\n\t\tif [ ! -x \"fetch-engine.sh\" ]; then \\\n\t\t\techo \"   fetch-engine.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"launch-dedicated.sh\" ]; then \\\n\t\t\techo \"   launch-dedicated.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"launch-game.sh\" ]; then \\\n\t\t\techo \"   launch-game.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"utility.sh\" ]; then \\\n\t\t\techo \"   utility.sh\"; \\\n\t\tfi; \\\n\t\techo \"Repair their permissions and try again.\"; \\\n\t\techo \"If you are using git you can repair these permissions by running\"; \\\n\t\techo \"   git update-index --chmod=+x *.sh\"; \\\n\t\techo \"and commiting the changed files to your repository.\"; \\\n\t\texit 1; \\\n\tfi\n\ncheck-packaging-scripts:\n\t@if [ ! -x \"packaging/package-all.sh\" ] || [ ! -x \"packaging/linux/buildpackage.sh\" ] || [ ! -x \"packaging/macos/buildpackage.sh\" ] || [ ! -x \"packaging/windows/buildpackage.sh\" ]; then \\\n\t\techo \"Required SDK scripts are not executable:\"; \\\n\t\tif [ ! -x \"packaging/package-all.sh\" ]; then \\\n\t\t\techo \"   packaging/package-all.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"packaging/linux/buildpackage.sh\" ]; then \\\n\t\t\techo \"   packaging/linux/buildpackage.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"packaging/macos/buildpackage.sh\" ]; then \\\n\t\t\techo \"   packaging/macos/buildpackage.sh\"; \\\n\t\tfi; \\\n\t\tif [ ! -x \"packaging/windows/buildpackage.sh\" ]; then \\\n\t\t\techo \"   packaging/windows/buildpackage.sh\"; \\\n\t\tfi; \\\n\t\techo \"Repair their permissions and try again.\"; \\\n\t\techo \"If you are using git you can repair these permissions by running\"; \\\n\t\techo \"   git update-index --chmod=+x *.sh\"; \\\n\t\techo \"in the directories containing the affected files\"; \\\n\t\techo \"and commiting the changed files to your repository.\"; \\\n\t\texit 1; \\\n\tfi\n\ncheck-variables:\n\t@if [ -z \"$(MOD_ID)\" ] || [ -z \"$(ENGINE_DIRECTORY)\" ]; then \\\n\t\techo \"Required mod.config variables are missing:\"; \\\n\t\tif [ -z \"$(MOD_ID)\" ]; then \\\n\t\t\techo \"   MOD_ID\"; \\\n\t\tfi; \\\n\t\tif [ -z \"$(ENGINE_DIRECTORY)\" ]; then \\\n\t\t\techo \"   ENGINE_DIRECTORY\"; \\\n\t\tfi; \\\n\t\techo \"Repair your mod.config (or user.config) and try again.\"; \\\n\t\texit 1; \\\n\tfi\n\nengine: check-variables check-sdk-scripts\n\t@./fetch-engine.sh || (printf \"Unable to continue without engine files\\n\"; exit 1)\n\t@cd $(ENGINE_DIRECTORY) && make RUNTIME=$(RUNTIME) TARGETPLATFORM=$(TARGETPLATFORM) all\n\nall: engine\nifeq ($(RUNTIME), mono)\n\t@command -v $(MSBUILD) >/dev/null || (echo \"OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 6.12.\"; exit 1)\nifneq (\"$(MOD_SOLUTION_FILES)\",\"\")\n\t@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:Build -restore -p:Configuration=${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true \\;\nendif\nelse\n\t@find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) build -c ${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) \\;\nendif\n\nclean: engine\nifneq (\"$(MOD_SOLUTION_FILES)\",\"\")\nifeq ($(RUNTIME), mono)\n\t@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:clean \\;\nelse\n\t@find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) clean \\;\nendif\nendif\n\t@cd $(ENGINE_DIRECTORY) && make clean\n\nversion: check-variables\n\t@sh -c '. $(ENGINE_DIRECTORY)/packaging/functions.sh; set_mod_version $(VERSION) $(MANIFEST_PATH)'\n\t@printf \"Version changed to $(VERSION).\\n\"\n\ncheck-scripts: check-variables\nifeq (\"$(HAS_LUAC)\",\"\")\n\t@printf \"'luac' not found.\\n\" && exit 1\nendif\n\t@echo\n\t@echo \"Checking for Lua syntax errors...\"\nifneq (\"$(LUA_FILES)\",\"\")\n\t@luac -p $(LUA_FILES)\nendif\n\ncheck: engine\nifneq (\"$(MOD_SOLUTION_FILES)\",\"\")\n\t@echo \"Compiling in Debug mode...\"\nifeq ($(RUNTIME), mono)\n\t@$(MSBUILD) -t:clean\\;build -restore -p:Configuration=Debug -warnaserror -p:TargetPlatform=$(TARGETPLATFORM)\nelse\n\t@$(DOTNET) clean -c Debug --nologo --verbosity minimal\n\t@$(DOTNET) build -c Debug -nologo -warnaserror -p:TargetPlatform=$(TARGETPLATFORM)\nendif\nendif\n\t@echo \"Checking for explicit interface violations...\"\n\t@./utility.sh --check-explicit-interfaces\n\t@echo \"Checking for incorrect conditional trait interface overrides...\"\n\t@./utility.sh --check-conditional-trait-interface-overrides\n\ntest: all\n\t@echo \"Testing $(MOD_ID) mod MiniYAML...\"\n\t@./utility.sh --check-yaml\n"
  },
  {
    "path": "OpenRA.Mods.Example/OpenRA.Mods.Example.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<EngineRootPath>../engine</EngineRootPath>\n\t</PropertyGroup>\n\n\t<Import Project=\"$(EngineRootPath)/Directory.Build.props\" />\n\n\t<ItemGroup>\n\t\t<ProjectReference Include=\"$(EngineRootPath)/OpenRA.Game/OpenRA.Game.csproj\">\n\t\t\t<Private>False</Private>\n\t\t</ProjectReference>\n\n\t\t<ProjectReference Include=\"$(EngineRootPath)/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj\">\n\t\t\t<Private>False</Private>\n\t\t</ProjectReference>\n\t</ItemGroup>\n\n\t<ItemGroup>\n\t\t<None Include=\"$(EngineRootPath)/AUTHORS\">\n\t\t\t<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n\t\t</None>\n\t</ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "OpenRA.Mods.Example/Properties/launchSettings.json",
    "content": "{\n    \"profiles\": {\n        \"OpenRA.Mods.Example\": {\n            \"commandName\": \"Executable\",\n            \"executablePath\": \"..\\\\..\\\\engine\\\\bin\\\\OpenRA.exe\",\n            \"commandLineArgs\": \"Game.Mod=example Engine.EngineDir=..\\\\..\\\\engine Engine.LaunchPath=..\\\\..\\\\engine\\\\bin Engine.ModSearchPaths=..\\\\..\\\\mods,..\\\\..\\\\engine\\\\mods Debug.DisplayDeveloperSettings=true\"\n        },\n        \"Utility\": {\n            \"commandName\": \"Executable\",\n            \"executablePath\": \"..\\\\..\\\\engine\\\\bin\\\\OpenRA.Utility.exe\",\n            \"commandLineArgs\": \"example --check-yaml\",\n            \"environmentVariables\": {\n                \"ENGINE_DIR\": \"..\\\\..\\\\engine\",\n                \"MOD_SEARCH_PATHS\": \"..\\\\..\\\\mods,..\\\\..\\\\engine\\\\mods\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "OpenRA.Mods.Example/Rendering/ColorPickerColorShift.cs",
    "content": "﻿#region Copyright & License Information\n/*\n * Copyright (c) The OpenRA Developers and Contributors\n * This file is part of OpenRA, which is free software. It is made\n * available to you under the terms of the GNU General Public License\n * as published by the Free Software Foundation, either version 3 of\n * the License, or (at your option) any later version. For more\n * information, see COPYING.\n */\n#endregion\n\nusing OpenRA.Graphics;\nusing OpenRA.Mods.Common.Traits;\nusing OpenRA.Primitives;\nusing OpenRA.Traits;\n\nnamespace OpenRA.Mods.Example.Rendering\n{\n\t[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]\n\t[Desc(\"Create a color picker palette from another palette.\")]\n\tpublic class ColorPickerColorShiftInfo : TraitInfo\n\t{\n\t\t[PaletteReference]\n\t\t[FieldLoader.Require]\n\t\t[Desc(\"The name of the palette to base off.\")]\n\t\tpublic readonly string BasePalette = \"\";\n\n\t\t[Desc(\"Hues between this and MaxHue will be shifted.\")]\n\t\tpublic readonly float MinHue = 0.83f;\n\n\t\t[Desc(\"Hues between MinHue and this will be shifted.\")]\n\t\tpublic readonly float MaxHue = 0.84f;\n\n\t\t[Desc(\"Hue reference for the color shift.\")]\n\t\tpublic readonly float ReferenceHue = 0.835f;\n\n\t\t[Desc(\"Saturation reference for the color shift.\")]\n\t\tpublic readonly float ReferenceSaturation = 1;\n\n\t\t[Desc(\"Value reference for the color shift.\")]\n\t\tpublic readonly float ReferenceValue = 0.95f;\n\n\t\tpublic override object Create(ActorInitializer init) { return new ColorPickerColorShift(this); }\n\t}\n\n\tpublic class ColorPickerColorShift : ILoadsPalettes, ITickRender\n\t{\n\t\treadonly ColorPickerColorShiftInfo info;\n\t\tColor color;\n\t\tColor preferredColor;\n\n\t\tpublic ColorPickerColorShift(ColorPickerColorShiftInfo info)\n\t\t{\n\t\t\t// All users need to use the same TraitInfo instance, chosen as the default mod rules\n\t\t\tvar colorManager = Game.ModData.DefaultRules.Actors[SystemActors.World].TraitInfo<IColorPickerManagerInfo>();\n\t\t\tcolorManager.OnColorPickerColorUpdate += c => preferredColor = c;\n\t\t\tpreferredColor = Game.Settings.Player.Color;\n\n\t\t\tthis.info = info;\n\t\t}\n\n\t\tvoid ILoadsPalettes.LoadPalettes(WorldRenderer worldRenderer)\n\t\t{\n\t\t\tcolor = preferredColor;\n\t\t\tvar (r, g, b) = color.ToLinear();\n\t\t\tvar (hue, saturation, value) = Color.RgbToHsv(r, g, b);\n\n\t\t\tworldRenderer.SetPaletteColorShift(\n\t\t\t\tinfo.BasePalette,\n\t\t\t\thue - info.ReferenceHue,\n\t\t\t\tsaturation - info.ReferenceSaturation,\n\t\t\t\tvalue / info.ReferenceValue,\n\t\t\t\tinfo.MinHue,\n\t\t\t\tinfo.MaxHue);\n\t\t}\n\n\t\tvoid ITickRender.TickRender(WorldRenderer worldRenderer, Actor self)\n\t\t{\n\t\t\tif (color == preferredColor)\n\t\t\t\treturn;\n\n\t\t\tcolor = preferredColor;\n\t\t\tvar (r, g, b) = color.ToLinear();\n\t\t\tvar (hue, saturation, value) = Color.RgbToHsv(r, g, b);\n\n\t\t\tworldRenderer.SetPaletteColorShift(\n\t\t\t\tinfo.BasePalette,\n\t\t\t\thue - info.ReferenceHue,\n\t\t\t\tsaturation - info.ReferenceSaturation,\n\t\t\t\tvalue / info.ReferenceValue,\n\t\t\t\tinfo.MinHue,\n\t\t\t\tinfo.MaxHue);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "OpenRA.Mods.Example/Rendering/PlayerColorShift.cs",
    "content": "﻿#region Copyright & License Information\n/*\n * Copyright (c) The OpenRA Developers and Contributors\n * This file is part of OpenRA, which is free software. It is made\n * available to you under the terms of the GNU General Public License\n * as published by the Free Software Foundation, either version 3 of\n * the License, or (at your option) any later version. For more\n * information, see COPYING.\n */\n#endregion\n\nusing OpenRA.Graphics;\nusing OpenRA.Primitives;\nusing OpenRA.Traits;\n\nnamespace OpenRA.Mods.Example.Rendering\n{\n\t[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]\n\t[Desc(\"Add color shifts to player palettes. Use to add RGBA compatibility to PlayerColorPalette.\")]\n\tpublic class PlayerColorShiftInfo : TraitInfo\n\t{\n\t\t[PaletteReference(true)]\n\t\t[FieldLoader.Require]\n\t\t[Desc(\"The name of the palette to base off.\")]\n\t\tpublic readonly string BasePalette = \"\";\n\n\t\t[Desc(\"Hues between this and MaxHue will be shifted.\")]\n\t\tpublic readonly float MinHue = 0.83f;\n\n\t\t[Desc(\"Hues between MinHue and this will be shifted.\")]\n\t\tpublic readonly float MaxHue = 0.84f;\n\n\t\t[Desc(\"Hue reference for the color shift.\")]\n\t\tpublic readonly float ReferenceHue = 0.835f;\n\n\t\t[Desc(\"Saturation reference for the color shift.\")]\n\t\tpublic readonly float ReferenceSaturation = 1;\n\n\t\t[Desc(\"Value reference for the color shift.\")]\n\t\tpublic readonly float ReferenceValue = 0.95f;\n\n\t\tpublic override object Create(ActorInitializer init) { return new PlayerColorShift(this); }\n\t}\n\n\tpublic class PlayerColorShift : ILoadsPlayerPalettes\n\t{\n\t\treadonly PlayerColorShiftInfo info;\n\n\t\tpublic PlayerColorShift(PlayerColorShiftInfo info)\n\t\t{\n\t\t\tthis.info = info;\n\t\t}\n\n\t\tvoid ILoadsPlayerPalettes.LoadPlayerPalettes(WorldRenderer worldRenderer, string playerName, Color color, bool replaceExisting)\n\t\t{\n\t\t\tvar (r, g, b) = color.ToLinear();\n\t\t\tvar (hue, saturation, value) = Color.RgbToHsv(r, g, b);\n\n\t\t\tworldRenderer.SetPaletteColorShift(\n\t\t\t\tinfo.BasePalette + playerName,\n\t\t\t\thue - info.ReferenceHue,\n\t\t\t\tsaturation - info.ReferenceSaturation,\n\t\t\t\tvalue / info.ReferenceValue,\n\t\t\t\tinfo.MinHue,\n\t\t\t\tinfo.MaxHue);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "README.md",
    "content": "This repository contains a bare development environment for creating a new mod/game on the [OpenRA](https://github.com/OpenRA/OpenRA) engine.\n\nThese scripts and support files wrap and automatically manage a copy of the OpenRA game engine and common files during development, and generates Windows installers, macOS .app bundles, and Linux [AppImages](https://appimage.org/) for distribution.\n\nThe key scripts in this SDK are:\n\n| Windows               | Linux / macOS            | Purpose\n| --------------------- | ------------------------ | ------------- |\n| make.cmd              | Makefile                 | Compiles your project and fetches dependencies (including the OpenRA engine).\n| launch-game.cmd       | launch-game.sh           | Launches your project from the SDK directory.\n| launch-server.cmd     | launch-server.sh         | Launches a dedicated server for your project from the SDK directory.\n| utility.cmd           | utility.sh         | Launches the OpenRA Utility for your project.\n| &lt;not available&gt; | packaging/package-all.sh | Generates release installers for your project.\n\nTo launch your project from the development environment you must first compile the project by running `make.cmd` (Windows), or opening a terminal in the SDK directory and running `make` (Linux / macOS).  You can then run `launch-game.cmd` (Windows) or `launch-game.sh` (Linux / macOS) to run your game.\n\nThe `example` mod included in this repository provides the bare minimum structure to launch to the in-game main menu for the sole purpose of demonstrating the SDK.  See [Getting Started](https://github.com/OpenRA/OpenRAModTemplate/wiki/Getting-Started) on the Wiki for instructions on how to adapt this template for your own projects.  For common questions, please see the [FAQ](https://github.com/OpenRA/OpenRAModSDK/wiki/FAQ).  See [Updating to a new SDK or Engine version](https://github.com/OpenRA/OpenRAModSDK/wiki/Updating-to-a-new-SDK-or-Engine-version) for a guide on updating your mod a newer OpenRA release.\n\nThe OpenRA engine and SDK scripts are made available under the [GPLv3](https://github.com/OpenRA/OpenRA/blob/bleed/COPYING) license, and any executable code developed by a mod and loaded by the engine (i.e. custom mod DLLs, lua scripts) must be released under a compatible license.  Your mod data files (artwork, sound files, yaml, etc) are not part of your mod's source code, so you are free to distribute these assets under different terms (e.g. allowing redistribution in unmodified form, but not for use in other works).\n"
  },
  {
    "path": "fetch-engine.sh",
    "content": "#!/bin/sh\n# Helper script used to check and update engine dependencies\n# This should not be called manually\n\ncommand -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires curl or wget.\"; exit 1; }\nif command -v python3 >/dev/null 2>&1; then\n\tPYTHON=\"python3\"\nelse\n\tcommand -v python >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires python.\"; exit 1; }\n\tPYTHON=\"python\"\nfi\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ ! -z \"${missing}\" ]; then\n\t\techo \"Required mod.config variables are missing:\\n${missing}Repair your mod.config (or user.config) and try again.\"\n\t\texit 1\n\tfi\n}\n\nTEMPLATE_LAUNCHER=$(${PYTHON} -c \"import os; print(os.path.realpath('$0'))\")\nTEMPLATE_ROOT=$(dirname \"${TEMPLATE_LAUNCHER}\")\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_VERSION\" \"ENGINE_DIRECTORY\"\n\nCURRENT_ENGINE_VERSION=$(cat \"${ENGINE_DIRECTORY}/VERSION\" 2> /dev/null)\n\nif [ -f \"${ENGINE_DIRECTORY}/VERSION\" ] && [ \"${CURRENT_ENGINE_VERSION}\" = \"${ENGINE_VERSION}\" ]; then\n\texit 0\nfi\n\nif [ \"${AUTOMATIC_ENGINE_MANAGEMENT}\" = \"True\" ]; then\n\trequire_variables \"AUTOMATIC_ENGINE_SOURCE\" \"AUTOMATIC_ENGINE_EXTRACT_DIRECTORY\" \"AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME\"\n\n\techo \"OpenRA engine version ${ENGINE_VERSION} is required.\"\n\n\tif [ -d \"${ENGINE_DIRECTORY}\" ]; then\n\t\tif [ \"${CURRENT_ENGINE_VERSION}\" != \"\" ]; then\n\t\t\techo \"Deleting engine version ${CURRENT_ENGINE_VERSION}.\"\n\t\telse\n\t\t\techo \"Deleting existing engine (unknown version).\"\n\t\tfi\n\n\t\trm -rf \"${ENGINE_DIRECTORY}\"\n\tfi\n\n\techo \"Downloading engine...\"\n\tif command -v curl > /dev/null 2>&1; then\n\t\tcurl -s -L -o \"${AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME}\" -O \"${AUTOMATIC_ENGINE_SOURCE}\" || exit 3\n\telse\n\t\twget -cq \"${AUTOMATIC_ENGINE_SOURCE}\" -O \"${AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME}\" || exit 3\n\tfi\n\n\t# Github zipballs package code with a top level directory named based on the refspec\n\t# Extract to a temporary directory and then move the subdir to our target location\n\tREFNAME=$(unzip -qql \"${AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME}\" | head -n1 | tr -s ' ' | cut -d' ' -f5-)\n\n\trm -rf \"${AUTOMATIC_ENGINE_EXTRACT_DIRECTORY}\"\n\tmkdir \"${AUTOMATIC_ENGINE_EXTRACT_DIRECTORY}\"\n\tunzip -qq -d \"${AUTOMATIC_ENGINE_EXTRACT_DIRECTORY}\" \"${AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME}\"\n\tmv \"${AUTOMATIC_ENGINE_EXTRACT_DIRECTORY}/${REFNAME}\" \"${ENGINE_DIRECTORY}\"\n\trmdir \"${AUTOMATIC_ENGINE_EXTRACT_DIRECTORY}\"\n\trm \"${AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME}\"\n\n\t# HACK: Remove bogus lint check that the Example mod can't possibly pass\n\t# because to do so it would need to define a lot of excess things surrounding resources.\n\trm ${ENGINE_DIRECTORY}/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs\n\n\techo \"Compiling engine...\"\n\tcd \"${ENGINE_DIRECTORY}\" || exit 1\n\tmake version VERSION=\"${ENGINE_VERSION}\"\n\texit 0\nfi\n\necho \"Automatic engine management is disabled.\"\necho \"Please manually update the engine to version ${ENGINE_VERSION}.\"\nexit 1\n\n"
  },
  {
    "path": "launch-dedicated.cmd",
    "content": ":: example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated-Server for details\n\n@echo on\n\nset Name=\"Dedicated Server\"\nset Map=\"\"\nset ListenPort=1234\nset AdvertiseOnline=True\nset Password=\"\"\nset RecordReplays=False\n\nset RequireAuthentication=False\nset ProfileIDBlacklist=\"\"\nset ProfileIDWhitelist=\"\"\n\nset EnableSingleplayer=False\nset EnableSyncReports=False\nset EnableGeoIP=True\nset EnableLintChecks=True\nset ShareAnonymizedIPs=True\n\nset FloodLimitJoinCooldown=5000\n\n@echo off\nsetlocal EnableDelayedExpansion\n\ntitle %Name%\nFOR /F \"tokens=1,2 delims==\" %%A IN (mod.config) DO (set %%A=%%B)\nif exist user.config (FOR /F \"tokens=1,2 delims==\" %%A IN (user.config) DO (set %%A=%%B))\nset MOD_SEARCH_PATHS=%~dp0mods,./mods\n\nif \"!MOD_ID!\" == \"\" goto badconfig\nif \"!ENGINE_VERSION!\" == \"\" goto badconfig\nif \"!ENGINE_DIRECTORY!\" == \"\" goto badconfig\n\nif not exist %ENGINE_DIRECTORY%\\bin\\OpenRA.exe goto noengine\n>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\\VERSION || goto noengine\ncd %ENGINE_DIRECTORY%\n\n:loop\nbin\\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=\"..\" Server.Name=%Name% Server.Map=%Map% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.RecordReplays=%RecordReplays% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Server.EnableLintChecks=%EnableLintChecks% Engine.SupportDir=%SupportDir% Server.FloodLimitJoinCooldown=%FloodLimitJoinCooldown%\ngoto loop\n\n:noengine\necho Required engine files not found.\necho Run `make all` in the mod directory to fetch and build the required files, then try again.\npause\nexit /b\n\n:badconfig\necho Required mod.config variables are missing.\necho Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are\necho defined in your mod.config (or user.config) and try again.\npause\nexit /b\n"
  },
  {
    "path": "launch-dedicated.sh",
    "content": "#!/bin/sh\n# Usage:\n#  $ ./launch-dedicated.sh # Launch a dedicated server with default settings\n#  $ Mod=\"<mod id>\" ./launch-dedicated.sh # Launch a dedicated server with default settings but override the Mod\n#  Read the file to see which settings you can override\n\nset -e\nif ! command -v mono >/dev/null 2>&1; then\n\tcommand -v dotnet >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires dotnet or mono.\"; exit 1; }\nfi\n\nif command -v python3 >/dev/null 2>&1; then\n\tPYTHON=\"python3\"\nelse\n\tcommand -v python >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires python.\"; exit 1; }\n\tPYTHON=\"python\"\nfi\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ ! -z \"${missing}\" ]; then\n\t\techo \"Required mod.config variables are missing:\\n${missing}Repair your mod.config (or user.config) and try again.\"\n\t\texit 1\n\tfi\n}\n\nTEMPLATE_LAUNCHER=$(${PYTHON} -c \"import os; print(os.path.realpath('$0'))\")\nTEMPLATE_ROOT=$(dirname \"${TEMPLATE_LAUNCHER}\")\nMOD_SEARCH_PATHS=\"${TEMPLATE_ROOT}/mods,./mods\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_VERSION\" \"ENGINE_DIRECTORY\"\n\nif command -v mono >/dev/null 2>&1 && [ \"$(grep -c .NETCoreApp,Version= ${ENGINE_DIRECTORY}/bin/OpenRA.Server.dll)\" = \"0\" ]; then\n\tRUNTIME_LAUNCHER=\"mono --debug\"\nelse\n\tRUNTIME_LAUNCHER=\"dotnet\"\nfi\n\nNAME=\"${Name:-\"Dedicated Server\"}\"\nLAUNCH_MOD=\"${Mod:-\"${MOD_ID}\"}\"\nMAP=\"${Map:-\"\"}\"\nLISTEN_PORT=\"${ListenPort:-\"1234\"}\"\nADVERTISE_ONLINE=\"${AdvertiseOnline:-\"True\"}\"\nPASSWORD=\"${Password:-\"\"}\"\nRECORD_REPLAYS=\"${RecordReplays:-\"False\"}\"\n\nREQUIRE_AUTHENTICATION=\"${RequireAuthentication:-\"False\"}\"\nPROFILE_ID_BLACKLIST=\"${ProfileIDBlacklist:-\"\"}\"\nPROFILE_ID_WHITELIST=\"${ProfileIDWhitelist:-\"\"}\"\n\nENABLE_SINGLE_PLAYER=\"${EnableSingleplayer:-\"False\"}\"\nENABLE_SYNC_REPORTS=\"${EnableSyncReports:-\"False\"}\"\nENABLE_GEOIP=\"${EnableGeoIP:-\"True\"}\"\nENABLE_LINT_CHECKS=\"${EnableLintChecks:-\"True\"}\"\nSHARE_ANONYMISED_IPS=\"${ShareAnonymizedIPs:-\"True\"}\"\n\nFLOOD_LIMIT_JOIN_COOLDOWN=\"${FloodLimitJoinCooldown:-\"5000\"}\"\n\nSUPPORT_DIR=\"${SupportDir:-\"\"}\"\n\ncd \"${TEMPLATE_ROOT}\"\nif [ ! -f \"${ENGINE_DIRECTORY}/bin/OpenRA.Server.dll\" ] || [ \"$(cat \"${ENGINE_DIRECTORY}/VERSION\")\" != \"${ENGINE_VERSION}\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\ncd \"${ENGINE_DIRECTORY}\"\n\nwhile true; do\n\tMOD_SEARCH_PATHS=\"${MOD_SEARCH_PATHS}\" \\\n\t${RUNTIME_LAUNCHER} bin/OpenRA.Server.dll Engine.EngineDir=\"..\" Game.Mod=\"${LAUNCH_MOD}\" \\\n\tServer.Name=\"${NAME}\" \\\n\tServer.Map=\"${MAP}\" \\\n\tServer.ListenPort=\"${LISTEN_PORT}\" \\\n\tServer.AdvertiseOnline=\"${ADVERTISE_ONLINE}\" \\\n\tServer.Password=\"${PASSWORD}\" \\\n\tServer.RecordReplays=\"${RECORD_REPLAYS}\" \\\n\tServer.RequireAuthentication=\"${REQUIRE_AUTHENTICATION}\" \\\n\tServer.ProfileIDBlacklist=\"${PROFILE_ID_BLACKLIST}\" \\\n\tServer.ProfileIDWhitelist=\"${PROFILE_ID_WHITELIST}\" \\\n\tServer.EnableSingleplayer=\"${ENABLE_SINGLE_PLAYER}\" \\\n\tServer.EnableSyncReports=\"${ENABLE_SYNC_REPORTS}\" \\\n\tServer.EnableGeoIP=\"${ENABLE_GEOIP}\" \\\n\tServer.EnableLintChecks=\"${ENABLE_LINT_CHECKS}\" \\\n\tServer.ShareAnonymizedIPs=\"${SHARE_ANONYMISED_IPS}\" \\\n\tServer.FloodLimitJoinCooldown=\"${FLOOD_LIMIT_JOIN_COOLDOWN}\" \\\n\tEngine.SupportDir=\"${SUPPORT_DIR}\"\ndone\n"
  },
  {
    "path": "launch-game.cmd",
    "content": "@echo off\nsetlocal EnableDelayedExpansion\ntitle OpenRA\n\nFOR /F \"tokens=1,2 delims==\" %%A IN (mod.config) DO (set %%A=%%B)\nif exist user.config (FOR /F \"tokens=1,2 delims==\" %%A IN (user.config) DO (set %%A=%%B))\nset TEMPLATE_LAUNCHER=%0\nset MOD_SEARCH_PATHS=%~dp0mods,./mods\n\nif \"!MOD_ID!\" == \"\" goto badconfig\nif \"!ENGINE_VERSION!\" == \"\" goto badconfig\nif \"!ENGINE_DIRECTORY!\" == \"\" goto badconfig\n\nset TEMPLATE_DIR=%CD%\nif not exist %ENGINE_DIRECTORY%\\bin\\OpenRA.exe goto noengine\n>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\\VERSION || goto noengine\ncd %ENGINE_DIRECTORY%\n\nbin\\OpenRA.exe Game.Mod=%MOD_ID% Engine.EngineDir=\"..\" Engine.LaunchPath=\"%TEMPLATE_LAUNCHER%\" Engine.ModSearchPaths=\"%MOD_SEARCH_PATHS%\"  \"%*\"\nset ERROR=%errorlevel%\ncd %TEMPLATE_DIR%\n\nif %ERROR% neq 0 goto crashdialog\nexit /b\n\n:noengine\necho Required engine files not found.\necho Run `make all` in the mod directory to fetch and build the required files, then try again.\npause\nexit /b\n\n:badconfig\necho Required mod.config variables are missing.\necho Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are\necho defined in your mod.config (or user.config) and try again.\npause\nexit /b\n\n:crashdialog\necho ----------------------------------------\necho OpenRA has encountered a fatal error.\necho   * Log Files are available in Documents\\OpenRA\\Logs\necho   * FAQ is available at https://github.com/OpenRA/OpenRA/wiki/FAQ\necho ----------------------------------------\npause\n"
  },
  {
    "path": "launch-game.sh",
    "content": "#!/bin/sh\n\nset -e\nif ! command -v mono >/dev/null 2>&1; then\n\tcommand -v dotnet >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires dotnet or mono.\"; exit 1; }\nfi\n\nif command -v python3 >/dev/null 2>&1; then\n\tPYTHON=\"python3\"\nelse\n\tcommand -v python >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires python.\"; exit 1; }\n\tPYTHON=\"python\"\nfi\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ ! -z \"${missing}\" ]; then\n\t\techo \"Required mod.config variables are missing:\\n${missing}Repair your mod.config (or user.config) and try again.\"\n\t\texit 1\n\tfi\n}\n\nTEMPLATE_LAUNCHER=$(${PYTHON} -c \"import os; print(os.path.realpath('$0'))\")\nTEMPLATE_ROOT=$(dirname \"${TEMPLATE_LAUNCHER}\")\nMOD_SEARCH_PATHS=\"${TEMPLATE_ROOT}/mods,./mods\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_VERSION\" \"ENGINE_DIRECTORY\"\n\ncd \"${TEMPLATE_ROOT}\"\nif [ ! -f \"${ENGINE_DIRECTORY}/bin/OpenRA.dll\" ] || [ \"$(cat \"${ENGINE_DIRECTORY}/VERSION\")\" != \"${ENGINE_VERSION}\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\nif command -v mono >/dev/null 2>&1 && [ \"$(grep -c .NETCoreApp,Version= ${ENGINE_DIRECTORY}/bin/OpenRA.dll)\" = \"0\" ]; then\n\tRUNTIME_LAUNCHER=\"mono --debug\"\nelse\n\tRUNTIME_LAUNCHER=\"dotnet\"\nfi\n\ncd \"${ENGINE_DIRECTORY}\"\n${RUNTIME_LAUNCHER} bin/OpenRA.dll Game.Mod=\"${MOD_ID}\" Engine.EngineDir=\"..\" Engine.LaunchPath=\"${TEMPLATE_LAUNCHER}\" Engine.ModSearchPaths=\"${MOD_SEARCH_PATHS}\" \"$@\"\n"
  },
  {
    "path": "make.cmd",
    "content": "@powershell -NoProfile -ExecutionPolicy Bypass -File make.ps1 %*\n"
  },
  {
    "path": "make.ps1",
    "content": "####### The starting point for the script is the bottom #######\n\n###############################################################\n########################## FUNCTIONS ##########################\n###############################################################\nfunction All-Command\n{\n\tIf (!(Test-Path \"*.sln\"))\n\t{\n\t\tWrite-Host \"No custom solution file found. Aborting.\" -ForegroundColor Red\n\t\treturn\n\t}\n\n\tif ((CheckForDotnet) -eq 1)\n\t{\n\t\treturn\n\t}\n\n\tWrite-Host \"Building $modID in\" $configuration \"configuration...\" -ForegroundColor Cyan\n\tdotnet build -c $configuration --nologo -p:TargetPlatform=win-x64\n\n\tif ($lastexitcode -ne 0)\n\t{\n\t\tWrite-Host \"Build failed. If just the development tools failed to build, try installing Visual Studio. You may also still be able to run the game.\" -ForegroundColor Red\n\t}\n\telse\n\t{\n\t\tWrite-Host \"Build succeeded.\" -ForegroundColor Green\n\t}\n}\n\nfunction Clean-Command\n{\n\tIf (!(Test-Path \"*.sln\"))\n\t{\n\t\tWrite-Host \"No custom solution file found - nothing to clean. Aborting.\" -ForegroundColor Red\n\t\treturn\n\t}\n\n\tif ((CheckForDotnet) -eq 1)\n\t{\n\t\treturn\n\t}\n\n\tWrite-Host \"Cleaning $modID...\" -ForegroundColor Cyan\n\n\tdotnet clean /nologo\n\tRemove-Item ./*/obj -Recurse -ErrorAction Ignore\n\tRemove-Item env:ENGINE_DIRECTORY/bin -Recurse -ErrorAction Ignore\n\tRemove-Item env:ENGINE_DIRECTORY/*/obj -Recurse -ErrorAction Ignore\n\n\tWrite-Host \"Clean complete.\" -ForegroundColor Green\n}\n\nfunction Version-Command\n{\n\tif ($command.Length -gt 1)\n\t{\n\t\t$version = $command[1]\n\t}\n\telseif (Get-Command 'git' -ErrorAction SilentlyContinue)\n\t{\n\t\t$gitRepo = git rev-parse --is-inside-work-tree\n\t\tif ($gitRepo)\n\t\t{\n\t\t\t$version = git name-rev --name-only --tags --no-undefined HEAD 2>$null\n\t\t\tif ($version -eq $null)\n\t\t\t{\n\t\t\t\t$version = \"git-\" + (git rev-parse --short HEAD)\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tWrite-Host \"Not a git repository. The version will remain unchanged.\" -ForegroundColor Red\n\t\t}\n\t}\n\telse\n\t{\n\t\tWrite-Host \"Unable to locate Git. The version will remain unchanged.\" -ForegroundColor Red\n\t}\n\n\tif ($version -ne $null)\n\t{\n\t\t$mod = \"mods/\" + $modID + \"/mod.yaml\"\n\t\t$replacement = (gc $mod) -Replace \"Version:.*\", (\"Version: {0}\" -f $version)\n\t\tsc $mod $replacement\n\n\t\t$prefix = $(gc $mod) | Where { $_.ToString().EndsWith(\": User\") }\n\t\tif ($prefix -and $prefix.LastIndexOf(\"/\") -ne -1)\n\t\t{\n\t\t\t$prefix = $prefix.Substring(0, $prefix.LastIndexOf(\"/\"))\n\t\t}\n\t\t$replacement = (gc $mod) -Replace \".*: User\", (\"{0}/{1}: User\" -f $prefix, $version)\n\t\tsc $mod $replacement\n\n\t\tWrite-Host (\"Version strings set to '{0}'.\" -f $version)\n\t}\n}\n\nfunction Test-Command\n{\n\tif ((CheckForUtility) -eq 1)\n\t{\n\t\treturn\n\t}\n\n\tWrite-Host \"Testing $modID mod MiniYAML...\" -ForegroundColor Cyan\n\tInvokeCommand \"$utilityPath $modID --check-yaml\"\n}\n\nfunction Check-Command\n{\n\tIf (!(Test-Path \"*.sln\"))\n\t{\n\t\tWrite-Host \"No custom solution file found. Skipping static code checks.\" -ForegroundColor Cyan\n\t\treturn\n\t}\n\n\tWrite-Host \"Compiling $modID in Debug configuration...\" -ForegroundColor Cyan\n\n\tdotnet clean -c Debug --nologo --verbosity minimal\n\tdotnet build -c Debug --nologo -warnaserror -p:TargetPlatform=win-x64\n\n\tif ($lastexitcode -ne 0)\n\t{\n\t\tWrite-Host \"Build failed.\" -ForegroundColor Red\n\t}\n\n\tif ((CheckForUtility) -eq 0)\n\t{\n\t\tWrite-Host \"Checking $modID for explicit interface violations...\" -ForegroundColor Cyan\n\t\tInvokeCommand \"$utilityPath $modID --check-explicit-interfaces\"\n\n\t\tWrite-Host \"Checking $modID for incorrect conditional trait interface overrides...\" -ForegroundColor Cyan\n\t\tInvokeCommand \"$utilityPath $modID --check-conditional-trait-interface-overrides\"\n\t}\n}\n\nfunction Check-Scripts-Command\n{\n\tif ((Get-Command \"luac.exe\" -ErrorAction SilentlyContinue) -ne $null)\n\t{\n\t\tWrite-Host \"Testing Lua scripts...\" -ForegroundColor Cyan\n\t\tforeach ($script in ls \"mods/*/maps/*/*.lua\")\n\t\t{\n\t\t\tluac -p $script\n\t\t}\n\t\tWrite-Host \"Check completed!\" -ForegroundColor Green\n\t}\n\telse\n\t{\n\t\tWrite-Host \"luac.exe could not be found. Please install Lua.\" -ForegroundColor Red\n\t}\n}\n\nfunction CheckForUtility\n{\n\tif (Test-Path $utilityPath)\n\t{\n\t\treturn 0\n\t}\n\n\tWrite-Host \"OpenRA.Utility.exe could not be found. Build the project first using the `\"all`\" command.\" -ForegroundColor Red\n\treturn 1\n}\n\nfunction CheckForDotnet\n{\n\tif ((Get-Command \"dotnet\" -ErrorAction SilentlyContinue) -eq $null)\n\t{\n\t\tWrite-Host \"The 'dotnet' tool is required to compile OpenRA. Please install the .NET 6.0 SDK and try again. https://dotnet.microsoft.com/download/dotnet/6.0\" -ForegroundColor Red\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n\nfunction WaitForInput\n{\n\tWrite-Host \"Press enter to continue.\"\n\twhile ($true)\n\t{\n\t\tif ([System.Console]::KeyAvailable)\n\t\t{\n\t\t\texit\n\t\t}\n\t\tStart-Sleep -Milliseconds 50\n\t}\n}\n\nfunction ReadConfigLine($line, $name)\n{\n\t$prefix = $name + '='\n\tif ($line.StartsWith($prefix))\n\t{\n\t\t[Environment]::SetEnvironmentVariable($name, $line.Replace($prefix, '').Replace('\"', ''))\n\t}\n}\n\nfunction ParseConfigFile($fileName)\n{\n\t$names = @(\"MOD_ID\", \"ENGINE_VERSION\", \"AUTOMATIC_ENGINE_MANAGEMENT\", \"AUTOMATIC_ENGINE_SOURCE\",\n\t\t\"AUTOMATIC_ENGINE_EXTRACT_DIRECTORY\", \"AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME\", \"ENGINE_DIRECTORY\")\n\n\t$reader = [System.IO.File]::OpenText($fileName)\n\twhile($null -ne ($line = $reader.ReadLine()))\n\t{\n\t\tforeach ($name in $names)\n\t\t{\n\t\t\tReadConfigLine $line $name\n\t\t}\n\t}\n\t$reader.Close()\n\n\t$missing = @()\n\tforeach ($name in $names)\n\t{\n\t\tif (!([System.Environment]::GetEnvironmentVariable($name)))\n\t\t{\n\t\t\t$missing += $name\n\t\t}\n\t}\n\n\tif ($missing)\n\t{\n\t\tWrite-Host \"Required mod.config variables are missing:\"\n\t\tforeach ($m in $missing)\n\t\t{\n\t\t\tWrite-Host \"   $m\"\n\t\t}\n\t\tWrite-Host \"Repair your mod.config (or user.config) and try again.\"\n\t\tWaitForInput\n\t\texit\n\t}\n}\n\nfunction InvokeCommand\n{\n\tparam($expression)\n\t# $? is the return value of the called expression\n\t# Invoke-Expression itself will always succeed, even if the invoked expression fails\n\t# So temporarily store the return value in $success\n\t$expression += '; $success = $?'\n\tInvoke-Expression $expression\n\tif ($success -eq $False)\n\t{\n\t\texit 1\n\t}\n}\n\n###############################################################\n############################ Main #############################\n###############################################################\nif ($PSVersionTable.PSVersion.Major -clt 3)\n{\n    Write-Host \"The makefile requires PowerShell version 3 or higher.\" -ForegroundColor Red\n    Write-Host \"Please download and install the latest Windows Management Framework version from Microsoft.\" -ForegroundColor Red\n    WaitForInput\n}\n\nif ($args.Length -eq 0)\n{\n\tWrite-Host \"Command list:\"\n\tWrite-Host \"\"\n\tWrite-Host \"  all             Builds the game, its development tools and the mod dlls.\"\n\tWrite-Host \"  version         Sets the version strings for all mods to the latest\"\n\tWrite-Host \"                  version for the current Git branch.\"\n\tWrite-Host \"  clean           Removes all built and copied files.\"\n\tWrite-Host \"                  from the mods and the engine directories.\"\n\tWrite-Host \"  test            Tests the mod's MiniYAML for errors.\"\n\tWrite-Host \"  check           Checks .cs files for StyleCop violations.\"\n\tWrite-Host \"  check-scripts   Checks .lua files for syntax errors.\"\n\tWrite-Host \"\"\n\t$command = (Read-Host \"Enter command\").Split(' ', 2)\n}\nelse\n{\n\t$command = $args\n}\n\n# Set the working directory for our IO methods\n$templateDir = $pwd.Path\n[System.IO.Directory]::SetCurrentDirectory($templateDir)\n\n# Load the environment variables from the config file\n# and get the mod ID from the local environment variable\nParseConfigFile \"mod.config\"\n\nif (Test-Path \"user.config\")\n{\n\tParseConfigFile \"user.config\"\n}\n\n$modID = $env:MOD_ID\n\n$env:MOD_SEARCH_PATHS = \"./mods,$env:ENGINE_DIRECTORY/mods\"\n$env:ENGINE_DIR = \"..\" # Set to potentially be used by the Utility and different than $env:ENGINE_DIRECTORY, which is for the script.\n\n# Fetch the engine if required\nif ($command -eq \"all\" -or $command -eq \"clean\" -or $command -eq \"check\")\n{\n\t$versionFile = $env:ENGINE_DIRECTORY + \"/VERSION\"\n\t$currentEngine = \"\"\n\tif (Test-Path $versionFile)\n\t{\n\t\t$reader = [System.IO.File]::OpenText($versionFile)\n\t\t$currentEngine = $reader.ReadLine()\n\t\t$reader.Close()\n\t}\n\n\tif ($currentEngine -ne \"\" -and $currentEngine -eq $env:ENGINE_VERSION)\n\t{\n\t\tcd $env:ENGINE_DIRECTORY\n\t\tInvoke-Expression \".\\make.cmd $command\"\n\t\tWrite-Host \"\"\n\t\tcd $templateDir\n\t}\n\telseif ($env:AUTOMATIC_ENGINE_MANAGEMENT -ne \"True\")\n\t{\n\t\tWrite-Host \"Automatic engine management is disabled.\"\n\t\tWrite-Host \"Please manually update the engine to version $env:ENGINE_VERSION.\"\n\t\tWaitForInput\n\t}\n\telse\n\t{\n\t\tWrite-Host \"OpenRA engine version $env:ENGINE_VERSION is required.\"\n\n\t\tif (Test-Path $env:ENGINE_DIRECTORY)\n\t\t{\n\t\t\tif ($currentEngine -ne \"\")\n\t\t\t{\n\t\t\t\tWrite-Host \"Deleting engine version $currentEngine.\"\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tWrite-Host \"Deleting existing engine (unknown version).\"\n\t\t\t}\n\n\t\t\trm $env:ENGINE_DIRECTORY -r\n\t\t}\n\n\t\tWrite-Host \"Downloading engine...\"\n\n\t\tif (Test-Path $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY)\n\t\t{\n\t\t\trm $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY -r\n\t\t}\n\n\t\t$url = $env:AUTOMATIC_ENGINE_SOURCE\n\t\t$url = $url.Replace(\"$\", \"\").Replace(\"{ENGINE_VERSION}\", $env:ENGINE_VERSION)\n\n\t\tmkdir $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY > $null\n\t\t$dlPath = Join-Path $pwd (Split-Path -leaf $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY)\n\t\t$dlPath = Join-Path $dlPath (Split-Path -leaf $env:AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME)\n\n\t\t$client = new-object System.Net.WebClient\n\t\t[Net.ServicePointManager]::SecurityProtocol = 'Tls12'\n\t\t$client.DownloadFile($url, $dlPath)\n\n\t\tAdd-Type -assembly \"system.io.compression.filesystem\"\n\t\t[io.compression.zipfile]::ExtractToDirectory($dlPath, $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY)\n\t\trm $dlPath\n\n\t\t$extractedDir = Get-ChildItem $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY -Recurse | ?{ $_.PSIsContainer } | Select-Object -First 1\n\t\tMove-Item $extractedDir.FullName -Destination $templateDir\n\t\tRename-Item $extractedDir.Name (Split-Path -leaf $env:ENGINE_DIRECTORY)\n\n\t\trm $env:AUTOMATIC_ENGINE_EXTRACT_DIRECTORY -r\n\n\t\t# HACK: Remove bogus lint check that the Example mod can't possibly pass\n\t\t# because to do so it would need to define a lot of excess things surrounding resources.\n\t\trm $env:ENGINE_DIRECTORY/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs\n\n\t\tcd $env:ENGINE_DIRECTORY\n\t\tInvoke-Expression \".\\make.cmd version $env:ENGINE_VERSION\"\n\t\tInvoke-Expression \".\\make.cmd $command\"\n\t\tWrite-Host \"\"\n\t\tcd $templateDir\n\t}\n}\n\n$utilityPath = $env:ENGINE_DIRECTORY + \"/bin/OpenRA.Utility.exe\"\n\n$configuration = \"Release\"\nif ($args.Contains(\"CONFIGURATION=Debug\"))\n{\n\t$configuration = \"Debug\"\n}\n\n$execute = $command\nif ($command.Length -gt 1)\n{\n\t$execute = $command[0]\n}\n\nswitch ($execute)\n{\n\t\"all\" { All-Command }\n\t\"version\" { Version-Command }\n\t\"clean\" { Clean-Command }\n\t\"test\" { Test-Command }\n\t\"check\" { Check-Command }\n\t\"check-scripts\" { Check-Scripts-Command }\n\tDefault { Write-Host (\"Invalid command '{0}'\" -f $command) }\n}\n\n# In case the script was called without any parameters we keep the window open\nif ($args.Length -eq 0)\n{\n\tWaitForInput\n}\n"
  },
  {
    "path": "mod.config",
    "content": "##############################################################################\n# Core Configuration\n#\n# Basic settings that should be changed by all projects.\n##############################################################################\n\n# The id of the mod packaged by this project.\n# This must exist as a directory in the mods directory and should not contain spaces.\nMOD_ID=\"example\"\n\n# The OpenRA engine version to use for this project.\nENGINE_VERSION=\"release-20250330\"\n\n##############################################################################\n# Packaging\n#\n# Settings controlling the creation of installers.\n##############################################################################\n\n# The prefix used for the installer filenames.\n#  - Windows installers will be named as {PACKAGING_INSTALLER_NAME}-{TAG}.exe\n#  - macOS installers will be named as {PACKAGING_INSTALLER_NAME}-{TAG}.dmg\n#  - Linux .appimages will be named as {PACKAGING_INSTALLER_NAME}-${TAG}.AppImage\nPACKAGING_INSTALLER_NAME=\"ExampleMod\"\n\n# The human-readable name for this project.\n# This is used in:\n#  - Crash dialogs (all platforms)\n#  - macOS .app bundle name\n#  - macOS menu bar\n#  - macOS \"About\" window\n#  - macOS disk image title\n#  - Windows installer\n#  - Windows start menu\n#  - Windows desktop shortcut\n#  - Windows \"Programs and Features\" list\n#  - Linux launcher shortcut\nPACKAGING_DISPLAY_NAME=\"Example Mod\"\n\n# The URL for the project homepage.\n# This is used in:\n#  - Windows \"Add/Remove Programs\" list\nPACKAGING_WEBSITE_URL=\"https://openra.net\"\n\n# The URL that is displayed in the crash dialog.\nPACKAGING_FAQ_URL=\"https://wiki.openra.net/FAQ\"\n\n# The human-readable project authors.\n# This is used in:\n#  - Windows \"Add/Remove Programs\" list\nPACKAGING_AUTHORS=\"Example Mod authors\"\n\n# If your mod depends on OpenRA.Mods.Cnc.dll from the engine set\n# this to \"True\" to package the dll in your installers.\n# Accepts values \"True\" or \"False\".\nPACKAGING_COPY_CNC_DLL=\"False\"\n\n# If your mod depends on OpenRA.Mods.D2k.dll from the engine set\n# this to \"True\" to package the dll in your installers.\n# Accepts values \"True\" or \"False\".\nPACKAGING_COPY_D2K_DLL=\"False\"\n\n# If you wish to enable Discord integration, register an\n# application at https://discord.com/developers/applications\n# and define the client id here and in your mod.yaml\nPACKAGING_DISCORD_APPID=\"\"\n\n# The macOS disk image icon positions, matched to the background artwork\nPACKAGING_OSX_DMG_MOD_ICON_POSITION=\"190, 210\"\nPACKAGING_OSX_DMG_APPLICATION_ICON_POSITION=\"410, 210\"\nPACKAGING_OSX_DMG_HIDDEN_ICON_POSITION=\"190, 350\"\n\n# Filename to use for the launcher executable on Windows.\nPACKAGING_WINDOWS_LAUNCHER_NAME=\"ExampleMod\"\n\n# The name of the Windows Program Files directory to install the project files to.\nPACKAGING_WINDOWS_INSTALL_DIR_NAME=\"OpenRA Example Mod\"\n\n# The key prefix used for Windows registry metadata.\n# This should not contain spaces or special characters.\nPACKAGING_WINDOWS_REGISTRY_KEY=\"OpenRAExampleMod\"\n\n# Path to the file containing the text to show in the Windows installer license dialog\nPACKAGING_WINDOWS_LICENSE_FILE=\"./COPYING\"\n\n# Space delimited list of additional files/directories to copy from the engine directory\n# when packaging your mod. e.g. \"./mods/common-content\"\nPACKAGING_COPY_ENGINE_FILES=\"\"\n\n# Overwrite the version in mod.yaml with the tag used for the SDK release\n# Accepts values \"True\" or \"False\".\nPACKAGING_OVERWRITE_MOD_VERSION=\"True\"\n\n##############################################################################\n# Advanced Configuration\n#\n# Most projects will not need to modify these\n##############################################################################\n\n# Automatic engine managment will treat the OpenRA engine files like a read-only dependency.\n# Disable this if you would like to modify or manager your own engine files.\nAUTOMATIC_ENGINE_MANAGEMENT=\"True\"\n\n# The URL to download the engine files from when AUTOMATIC_ENGINE_MANAGEMENT is enabled.\nAUTOMATIC_ENGINE_SOURCE=\"https://github.com/OpenRA/OpenRA/archive/${ENGINE_VERSION}.zip\"\n\n# Temporary file/directory names used by automatic engine management.\n# Paths outside the SDK directory are not officially supported.\nAUTOMATIC_ENGINE_EXTRACT_DIRECTORY=\"./engine_temp\"\nAUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME=\"engine.zip\"\nENGINE_DIRECTORY=\"./engine\"\n"
  },
  {
    "path": "mods/example/chrome/chrome.yaml",
    "content": "^Dialog:\n\tImage: chrome/assets/dialog.png\n\n^Glyphs:\n\tImage: chrome/assets/glyphs.png\n\n^LoadScreen:\n\tImage: chrome/assets/loadscreen.png\n\nobserver-scrollpanel-button:\n\tInherits: ^Dialog\n\tPanelRegion: 769, 257, 2, 2, 122, 122, 2, 2\n\nobserver-scrollpanel-button-hover:\n\tInherits: observer-scrollpanel-button\n\nobserver-scrollpanel-button-pressed:\n\tInherits: ^Dialog\n\tPanelRegion: 897, 257, 2, 2, 122, 122, 2, 2\n\nobserver-scrollpanel-button-disabled:\n\tInherits: ^Dialog\n\tPanelRegion: 769, 385, 2, 2, 122, 122, 2, 2\n\nobserver-scrollheader:\n\tInherits: observer-scrollpanel-button-disabled\n\nobserver-scrollheader-highlighted:\n\tInherits: observer-scrollpanel-button-disabled\n\nobserver-scrollitem:\n\nobserver-scrollitem-hover:\n\tInherits: observer-scrollpanel-button\n\nobserver-scrollitem-pressed:\n\tInherits: observer-scrollpanel-button\n\nobserver-scrollitem-highlighted:\n\tInherits: observer-scrollpanel-button-pressed\n\n# Used for the main menu frame\ndialog:\n\tInherits: ^Dialog\n\tRegions:\n\t\tbackground: 1, 1, 480, 480\n\t\tborder-r: 492, 1, 9, 190\n\t\tborder-l: 483, 1, 9, 190\n\t\tborder-b: 1, 492, 189, 9\n\t\tborder-t: 1, 483, 189, 9\n\t\tcorner-tl: 192, 483, 9, 9\n\t\tcorner-tr: 201, 483, 9, 9\n\t\tcorner-bl: 192, 492, 9, 9\n\t\tcorner-br: 201, 492, 9, 9\n\n# Used for Music and Map selection (normal button)\ndialog2:\n\tInherits: button\n\n# It's a Container, used in various places, like Hotkeys, ColorPicker, Asset Browser frames (looks like a pressed button)\ndialog3:\n\tInherits: button-pressed\n\n# Used for tooltips and the video player\ndialog4:\n\tInherits: ^Dialog\n\tPanelRegion: 512, 387, 6, 6, 52, 52, 6, 6\n\n# completely black tile\ndialog5:\n\tInherits: ^Dialog\n\tPanelRegion: 580, 388, 0, 0, 62, 62, 0, 0\n\tPanelSides: Center\n\nlobby-bits:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tspawn-claimed: 68, 119, 22, 22\n\t\tspawn-unclaimed: 91, 119, 22, 22\n\t\tspawn-disabled: 114, 119, 22, 22\n\t\tadmin: 170, 0, 6, 5\n\t\tcolorpicker: 68, 119, 22, 22\n\t\thuepicker: 136, 0, 7, 15\n\t\tkick: 153, 0, 11, 11\n\t\tprotected: 0, 17, 12, 13\n\t\tprotected-disabled: 17, 17, 12, 13\n\t\tauthentication: 34, 17, 12, 13\n\t\tauthentication-disabled: 51, 17, 12, 13\n\t\tadmin-registered: 0, 51, 16, 16\n\t\tadmin-anonymous: 34, 51, 16, 16\n\t\tplayer-registered: 17, 51, 16, 16\n\t\tplayer-anonymous: 51, 51, 16, 16\n\nreload-icon:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tenabled: 0, 34, 16, 16\n\t\tdisabled-0: 17, 34, 16, 16\n\t\tdisabled-1: 34, 34, 16, 16\n\t\tdisabled-2: 51, 34, 16, 16\n\t\tdisabled-3: 68, 34, 16, 16\n\t\tdisabled-4: 85, 34, 16, 16\n\t\tdisabled-5: 102, 34, 16, 16\n\t\tdisabled-6: 119, 34, 16, 16\n\t\tdisabled-7: 136, 34, 16, 16\n\t\tdisabled-8: 153, 34, 16, 16\n\t\tdisabled-9: 170, 34, 16, 16\n\t\tdisabled-10: 187, 34, 16, 16\n\t\tdisabled-11: 204, 34, 16, 16\n\nstrategic:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tunowned: 68, 119, 22, 22\n\t\tcritical_unowned: 137, 119, 22, 22\n\t\tenemy_owned: 160, 119, 22, 22\n\t\tplayer_owned: 160, 142, 22, 22\n\nflags:\n\tInherits: ^Glyphs\n\tRegions:\n\t\texample: 226, 241, 30, 15\n\t\tRandom: 226, 241, 30, 15\n\t\tspectator: 226, 241, 30, 15\n\nmusic:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tpause: 0, 0, 16, 16\n\t\tstop: 17, 0, 16, 16\n\t\tplay: 34, 0, 16, 16\n\t\tnext: 51, 0, 16, 16\n\t\tprev: 68, 0, 16, 16\n\t\tfastforward: 85, 0, 16, 16\n\nprogressbar-bg:\n\tInherits: button-pressed\n\nprogressbar-thumb:\n\tInherits: button\n\nbutton:\n\tInherits: ^Dialog\n\tPanelRegion: 513, 1, 2, 2, 122, 122, 2, 2\n\n# 5% lighter than a normal button (mouseover)\nbutton-hover:\n\tInherits: ^Dialog\n\tPanelRegion: 513, 129, 2, 2, 122, 122, 2, 2\n\nbutton-pressed:\n\tInherits: ^Dialog\n\tPanelRegion: 641, 1, 2, 2, 122, 122, 2, 2\n\n# 50% grey (disabled button)\nbutton-disabled:\n\tInherits: ^Dialog\n\tPanelRegion: 513, 257, 2, 2, 122, 122, 2, 2\n\nbutton-highlighted:\n\tInherits: ^Dialog\n\tPanelRegion: 769, 129, 2, 2, 122, 122, 2, 2\n\nbutton-highlighted-hover:\n\tInherits: button-highlighted\n\nbutton-highlighted-pressed:\n\tInherits: ^Dialog\n\tPanelRegion: 897, 129, 2, 2, 122, 122, 2, 2\n\nbutton-highlighted-disabled:\n\tInherits: button-highlighted\n\nnewsbutton:\n\tInherits: button\n\nnewsbutton-hover:\n\tInherits: button\n\nnewsbutton-highlighted:\n\tInherits: ^Dialog\n\tPanelRegion: 769, 1, 2, 2, 122, 122, 2, 2\n\nnewsbutton-highlighted-hover:\n\tInherits: newsbutton-highlighted\n\nnewsbutton-highlighted-pressed:\n\tInherits: button-pressed\n\nnewsbutton-pressed:\n\tInherits: button-pressed\n\ntextfield:\n\tInherits: button-pressed\n\ntextfield-hover:\n\tInherits: checkbox-hover\n\ntextfield-disabled:\n\tInherits: checkbox-disabled\n\ntextfield-focused:\n\tInherits: button-pressed\n\nscrollpanel-bg:\n\tInherits: button-pressed\n\nscrollpanel-button:\n\tInherits: button\n\nscrollpanel-button-hover:\n\tInherits: button-hover\n\nscrollpanel-button-pressed:\n\tInherits: button-pressed\n\nscrollpanel-button-disabled:\n\tInherits: button\n\nslider:\n\tInherits: ^Dialog\n\tRegions:\n\t\ttick: 513, 2, 2, 4\n\nslider-track:\n\tInherits: button\n\nslider-thumb:\n\tInherits: button\n\nslider-thumb-hover:\n\tInherits: button-hover\n\nslider-thumb-pressed:\n\tInherits: button-pressed\n\nslider-thumb-disabled:\n\tInherits: button-disabled\n\ncheckbox:\n\tInherits: button-pressed\n\ncheckmark-tick:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tchecked: 187, 0, 16, 16\n\t\tchecked-pressed: 204, 0, 16, 16\n\t\tunchecked: 0, 0, 0, 0\n\t\tunchecked-pressed: 204, 0, 16, 16\n\ncheckmark-tick-highlighted:\n\tInherits: checkmark-tick\n\ncheckmark-cross:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tchecked: 221, 0, 16, 16\n\t\tchecked-pressed: 238, 0, 16, 16\n\t\tunchecked: 0, 0, 0, 0\n\t\tunchecked-pressed: 238, 0, 16, 16\n\ncheckmark-cross-highlighted:\n\tInherits: checkmark-cross\n\ncheckmark-mute:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tunchecked: 0, 170, 16, 16\n\t\tunchecked-pressed: 17, 170, 16, 16\n\t\tchecked: 17, 170, 16, 16\n\t\tchecked-pressed: 0, 170, 16, 16\n\ncheckmark-mute-highlighted:\n\tInherits: checkmark-mute\n\ncheckbox-hover:\n\tInherits: ^Dialog\n\tPanelRegion: 641, 129, 2, 2, 122, 122, 2, 2\n\ncheckbox-pressed:\n\tInherits: checkbox-hover\n\ncheckbox-disabled:\n\tInherits: ^Dialog\n\tPanelRegion: 641, 257, 2, 2, 122, 122, 2, 2\n\ncheckbox-highlighted:\n\tInherits: ^Dialog\n\tPanelRegion: 897, 1, 2, 2, 122, 122, 2, 2\n\ncheckbox-highlighted-hover:\n\tInherits: checkbox-highlighted\n\ncheckbox-highlighted-pressed:\n\tInherits: checkbox-highlighted\n\ncheckbox-highlighted-disabled:\n\tInherits: checkbox-disabled\n\ncheckbox-toggle:\n\ncheckbox-toggle-hover:\n\tInherits: button\n\ncheckbox-toggle-pressed:\n\tInherits: checkbox-pressed\n\ncheckbox-toggle-highlighted:\n\ncheckbox-toggle-highlighted-hover:\n\tInherits: button-highlighted\n\ncheckbox-toggle-highlighted-pressed:\n\tInherits: checkbox-highlighted-pressed\n\nscrollitem:\n\nscrollitem-hover:\n\tInherits: button\n\nscrollitem-pressed:\n\tInherits: button\n\nscrollitem-highlighted:\n\tInherits: button-pressed\n\nscrollitem-nohover:\n\nscrollitem-nohover-highlighted:\n\nscrollheader:\n\tInherits: button\n\nscrollheader-highlighted:\n\tInherits: button\n\nlogos:\n\tInherits: ^LoadScreen\n\tRegions:\n\t\tlogo: 0, 0, 256, 256\n\nloadscreen-stripe:\n\tInherits: ^LoadScreen\n\tPanelRegion: 258, 0, 0, 0, 253, 256, 0, 0\n\tPanelSides: Center\n\nmainmenu-border:\n\tInherits: ^Dialog\n\tPanelRegion: 650, 389, 39, 39, 38, 38, 39, 39\n\tPanelSides: Edges\n\nscrollpanel-decorations:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tdown: 68, 17, 16, 16\n\t\tdown-disabled: 85, 17, 16, 16\n\t\tup: 102, 17, 16, 16\n\t\tup-disabled: 119, 17, 16, 16\n\t\tright: 136, 17, 16, 16\n\t\tright-disabled: 153, 17, 16, 16\n\t\tleft: 170, 17, 16, 16\n\t\tleft-disabled: 187, 17, 16, 16\n\ndropdown-decorations:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tmarker: 68, 17, 16, 16\n\t\tmarker-disabled: 85, 17, 16, 16\n\ndropdown-separators:\n\tInherits: ^Dialog\n\tRegions:\n\t\tseparator: 513, 2, 1, 19\n\t\tseparator-hover: 513, 130, 1, 19\n\t\tseparator-pressed: 766, 2, 1, 19\n\t\tseparator-disabled: 513, 258, 1, 19\n\t\tobserver-separator: 769, 258, 1, 19\n\nseparator:\n\tInherits: button\n\neditor:\n\tInherits: ^Glyphs\n\tRegions:\n\t\tselect: 34, 187, 16, 16\n\t\ttiles: 0, 187, 16, 16\n\t\toverlays: 17, 187, 16, 16\n\t\tactors: 34, 68, 16, 16\n\t\ttools: 136, 68, 16, 16\n\t\thistory: 136, 51, 16, 16\n\t\terase: 50, 187, 16, 16\n"
  },
  {
    "path": "mods/example/chrome/ingame-observer.yaml",
    "content": "Container@OBSERVER_WIDGETS:\n\tLogic: MenuButtonsChromeLogic, LoadIngameChatLogic\n\tChildren:\n\t\tContainer@CHAT_ROOT:\n\t\tLogicKeyListener@OBSERVER_KEY_LISTENER:\n\t\tContainer@MUTE_INDICATOR:\n\t\t\tLogic: MuteIndicatorLogic\n\t\t\tX: WINDOW_WIDTH - WIDTH - 260\n\t\t\tY: 5\n\t\t\tWidth: 200\n\t\t\tHeight: 25\n\t\t\tChildren:\n\t\t\t\tImage@ICON:\n\t\t\t\t\tX: PARENT_WIDTH - WIDTH\n\t\t\t\t\tY: 1\n\t\t\t\t\tWidth: 24\n\t\t\t\t\tHeight: 24\n\t\t\t\t\tImageCollection: sidebar-bits\n\t\t\t\t\tImageName: indicator-muted\n\t\t\t\tLabel@LABEL:\n\t\t\t\t\tWidth: PARENT_WIDTH - 30\n\t\t\t\t\tHeight: 25\n\t\t\t\t\tAlign: Right\n\t\t\t\t\tText: label-mute-indicator\n\t\t\t\t\tContrast: true\n\t\tMenuButton@OPTIONS_BUTTON:\n\t\t\tX: 5\n\t\t\tY: 5\n\t\t\tWidth: 160\n\t\t\tHeight: 25\n\t\t\tText: button-observer-widgets-options\n\t\t\tFont: Bold\n\t\t\tKey: escape\n\t\t\tDisableWorldSounds: true\n\t\tContainer@GAME_TIMER_BLOCK:\n\t\t\tLogic: GameTimerLogic\n\t\t\tX: (WINDOW_WIDTH - WIDTH) / 2\n\t\t\tWidth: 100\n\t\t\tHeight: 55\n\t\t\tChildren:\n\t\t\t\tLabelWithTooltip@GAME_TIMER:\n\t\t\t\t\tWidth: PARENT_WIDTH\n\t\t\t\t\tHeight: 30\n\t\t\t\t\tAlign: Center\n\t\t\t\t\tFont: Title\n\t\t\t\t\tContrast: true\n\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\tTooltipTemplate: SIMPLE_TOOLTIP\n\t\t\t\tLabel@GAME_TIMER_STATUS:\n\t\t\t\t\tY: 32\n\t\t\t\t\tWidth: PARENT_WIDTH\n\t\t\t\t\tHeight: 15\n\t\t\t\t\tAlign: Center\n\t\t\t\t\tFont: Bold\n\t\t\t\t\tContrast: true\n\t\tBackground@RADAR_BG:\n\t\t\tX: WINDOW_WIDTH - 255\n\t\t\tY: 5\n\t\t\tWidth: 250\n\t\t\tHeight: 250\n\t\t\tChildren:\n\t\t\t\tRadar@INGAME_RADAR:\n\t\t\t\t\tX: 10\n\t\t\t\t\tY: 10\n\t\t\t\t\tWidth: PARENT_WIDTH - 19\n\t\t\t\t\tHeight: PARENT_HEIGHT - 19\n\t\t\t\t\tWorldInteractionController: INTERACTION_CONTROLLER\n\t\t\t\tVideoPlayer@PLAYER:\n\t\t\t\t\tX: 10\n\t\t\t\t\tY: 10\n\t\t\t\t\tWidth: PARENT_WIDTH - 20\n\t\t\t\t\tHeight: PARENT_HEIGHT - 20\n\t\t\t\t\tSkippable: false\n\t\tBackground@OBSERVER_CONTROL_BG:\n\t\t\tX: WINDOW_WIDTH - 255\n\t\t\tY: 260\n\t\t\tWidth: 250\n\t\t\tHeight: 55\n\t\t\tChildren:\n\t\t\t\tDropDownButton@SHROUD_SELECTOR:\n\t\t\t\t\tLogic: ObserverShroudSelectorLogic\n\t\t\t\t\t\tCombinedViewKey: ObserverCombinedView\n\t\t\t\t\t\tWorldViewKey: ObserverWorldView\n\t\t\t\t\tX: 15\n\t\t\t\t\tY: 15\n\t\t\t\t\tWidth: 220\n\t\t\t\t\tHeight: 25\n\t\t\t\t\tFont: Bold\n\t\t\t\t\tChildren:\n\t\t\t\t\t\tLogicKeyListener@SHROUD_KEYHANDLER:\n\t\t\t\t\t\tImage@FLAG:\n\t\t\t\t\t\t\tWidth: 23\n\t\t\t\t\t\t\tHeight: 23\n\t\t\t\t\t\t\tX: 2\n\t\t\t\t\t\t\tY: 5\n\t\t\t\t\t\tLabel@LABEL:\n\t\t\t\t\t\t\tX: 34\n\t\t\t\t\t\t\tWidth: PARENT_WIDTH\n\t\t\t\t\t\t\tHeight: 25\n\t\t\t\t\t\t\tShadow: True\n\t\t\t\t\t\tLabel@NOFLAG_LABEL:\n\t\t\t\t\t\t\tX: 5\n\t\t\t\t\t\t\tWidth: PARENT_WIDTH\n\t\t\t\t\t\t\tHeight: 25\n\t\t\t\t\t\t\tShadow: True\n\t\t\t\tContainer@REPLAY_PLAYER:\n\t\t\t\t\tLogic: ReplayControlBarLogic\n\t\t\t\t\tY: 39\n\t\t\t\t\tWidth: 160\n\t\t\t\t\tHeight: 35\n\t\t\t\t\tVisible: false\n\t\t\t\t\tChildren:\n\t\t\t\t\t\tButton@BUTTON_PAUSE:\n\t\t\t\t\t\t\tX: 15\n\t\t\t\t\t\t\tY: 10\n\t\t\t\t\t\t\tWidth: 26\n\t\t\t\t\t\t\tHeight: 26\n\t\t\t\t\t\t\tKey: Pause\n\t\t\t\t\t\t\tTooltipText: button-replay-player-pause-tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tIgnoreChildMouseOver: true\n\t\t\t\t\t\t\tChildren:\n\t\t\t\t\t\t\t\tImage@IMAGE_PAUSE:\n\t\t\t\t\t\t\t\t\tX: 5\n\t\t\t\t\t\t\t\t\tY: 5\n\t\t\t\t\t\t\t\t\tImageCollection: music\n\t\t\t\t\t\t\t\t\tImageName: pause\n\t\t\t\t\t\tButton@BUTTON_PLAY:\n\t\t\t\t\t\t\tX: 15\n\t\t\t\t\t\t\tY: 10\n\t\t\t\t\t\t\tWidth: 26\n\t\t\t\t\t\t\tHeight: 26\n\t\t\t\t\t\t\tKey: Pause\n\t\t\t\t\t\t\tTooltipText: button-replay-player-play-tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tIgnoreChildMouseOver: true\n\t\t\t\t\t\t\tChildren:\n\t\t\t\t\t\t\t\tImage@IMAGE_PLAY:\n\t\t\t\t\t\t\t\t\tX: 5\n\t\t\t\t\t\t\t\t\tY: 5\n\t\t\t\t\t\t\t\t\tImageCollection: music\n\t\t\t\t\t\t\t\t\tImageName: play\n\t\t\t\t\t\tButton@BUTTON_SLOW:\n\t\t\t\t\t\t\tX: 55\n\t\t\t\t\t\t\tY: 13\n\t\t\t\t\t\t\tWidth: 36\n\t\t\t\t\t\t\tHeight: 20\n\t\t\t\t\t\t\tKey: ReplaySpeedSlow\n\t\t\t\t\t\t\tTooltipText: button-replay-player-slow.tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tText: button-replay-player-slow.label\n\t\t\t\t\t\t\tFont: TinyBold\n\t\t\t\t\t\tButton@BUTTON_REGULAR:\n\t\t\t\t\t\t\tX: 55 + 45\n\t\t\t\t\t\t\tY: 13\n\t\t\t\t\t\t\tWidth: 38\n\t\t\t\t\t\t\tHeight: 20\n\t\t\t\t\t\t\tKey: ReplaySpeedRegular\n\t\t\t\t\t\t\tTooltipText: button-replay-player-regular.tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tText: button-replay-player-regular.label\n\t\t\t\t\t\t\tFont: TinyBold\n\t\t\t\t\t\tButton@BUTTON_FAST:\n\t\t\t\t\t\t\tX: 55 + 45 * 2\n\t\t\t\t\t\t\tY: 13\n\t\t\t\t\t\t\tWidth: 38\n\t\t\t\t\t\t\tHeight: 20\n\t\t\t\t\t\t\tKey: ReplaySpeedFast\n\t\t\t\t\t\t\tTooltipText: button-replay-player-fast.tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tText: button-replay-player-fast.label\n\t\t\t\t\t\t\tFont: TinyBold\n\t\t\t\t\t\tButton@BUTTON_MAXIMUM:\n\t\t\t\t\t\t\tX: 55 + 45 * 3\n\t\t\t\t\t\t\tY: 13\n\t\t\t\t\t\t\tWidth: 38\n\t\t\t\t\t\t\tHeight: 20\n\t\t\t\t\t\t\tKey: ReplaySpeedMax\n\t\t\t\t\t\t\tTooltipText: button-replay-player-maximum.tooltip\n\t\t\t\t\t\t\tTooltipContainer: TOOLTIP_CONTAINER\n\t\t\t\t\t\t\tText: button-replay-player-maximum.label\n\t\t\t\t\t\t\tFont: TinyBold\n"
  },
  {
    "path": "mods/example/chrome/layouts/ingame-player.yaml",
    "content": "Container@PLAYER_WIDGETS:\n\tLogic: MenuButtonsChromeLogic\n\tChildren:\n\t\tLogicTicker@SIDEBAR_TICKER:\n\t\tMenuButton@OPTIONS_BUTTON:\n\t\t\tKey: escape\n"
  },
  {
    "path": "mods/example/cursors/default.yaml",
    "content": "Cursors:\n\tcursors/assets/default.png:\n\t\tdefault:\n\t\t\tStart: 0\n"
  },
  {
    "path": "mods/example/fluent/chrome.ftl",
    "content": "## Shroud\ncheckbox-fog-of-war =\n    .label = Fog of War\n    .description = Line of sight is required to view enemy forces\n\ncheckbox-explored-map =\n    .label = Explored Map\n    .description = Initial map shroud is revealed\n\n## DeveloperMode\ncheckbox-debug-menu =\n    .label = Debug Menu\n    .description = Enables cheats and developer commands\n\n## MapStartingLocations\ncheckbox-separate-team-spawns =\n    .label = Separate Team Spawns\n    .description = Players without assigned spawn points will start as far as possible from enemy players\n\n## SpawnStartingUnits\ndropdown-starting-units =\n    .label = Starting Units\n    .description = The units that players start the game with\n\n## World\noptions-starting-units =\n    .unlabeled = Unlabeled\n\n## ingame-observer.yaml\nlabel-mute-indicator = Audio Muted\nbutton-observer-widgets-options = Options (Esc)\nbutton-replay-player-pause-tooltip = Pause\nbutton-replay-player-play-tooltip = Play\n\nbutton-replay-player-slow =\n    .tooltip = Slow speed\n    .label = 50%\n\nbutton-replay-player-regular =\n    .tooltip = Regular speed\n    .label = 100%\n\nbutton-replay-player-fast =\n    .tooltip = Fast speed\n    .label = 200%\n\nbutton-replay-player-maximum =\n    .tooltip = Maximum speed\n    .label = MAX\n"
  },
  {
    "path": "mods/example/fluent/mod.ftl",
    "content": "## Metadata\nmod-title = Example mod\nmod-windowtitle = Example\n\n# To silence \"Warning: Missing key `loadscreen-loading` in mod ftl files required by `LogoStripeLoadScreen.Loading`\"\n# Because https://github.com/OpenRA/OpenRA/issues/20693 wasn't fixed.\nloadscreen-loading = .\n"
  },
  {
    "path": "mods/example/fluent/rules.ftl",
    "content": "## world.yaml\nfaction-random =\n    .name = Random\n    .description = Random Faction\n     A random faction will be chosen when the game starts.\n\nfaction-example =\n    .name = Example\n    .description = Example Faction\n     Provide your own faction description here.\n"
  },
  {
    "path": "mods/example/maps/example/map.yaml",
    "content": "MapFormat: 12\n\nRequiresMod: example\n\nTitle: Example Map\n\nAuthor: Example Author\n\nTileset: EXAMPLE\n\nMapSize: 34,34\n\nBounds: 1,1,32,32\n\nVisibility: Lobby\n\nCategories: Maps\n\nPlayers:\n\tPlayerReference@Neutral:\n\t\tName: Neutral\n\t\tOwnsWorld: True\n\t\tNonCombatant: True\n\t\tFaction: Random\n\tPlayerReference@Creeps:\n\t\tName: Creeps\n\t\tNonCombatant: True\n\t\tFaction: Random\n\tPlayerReference@Multi0:\n\t\tName: Multi0\n\t\tPlayable: True\n\t\tFaction: Random\n\t\tEnemies: Creeps\n\nActors:\n\tActor0: mpspawn\n\t\tOwner: Multi0\n\t\tLocation: 16,16\n"
  },
  {
    "path": "mods/example/maps/shellmap/map.yaml",
    "content": "MapFormat: 12\n\nRequiresMod: example\n\nTitle: Example Shellmap\n\nAuthor: Example Author\n\nTileset: EXAMPLE\n\nMapSize: 34,34\n\nBounds: 1,1,32,32\n\nVisibility: Shellmap\n\nCategories: Maps\n\nPlayers:\n\tPlayerReference@Neutral:\n\t\tName: Neutral\n\t\tOwnsWorld: True\n\t\tNonCombatant: True\n\t\tFaction: Random\n\tPlayerReference@Creeps:\n\t\tName: Creeps\n\t\tNonCombatant: True\n\t\tFaction: Random\n\nActors:\n"
  },
  {
    "path": "mods/example/missions/example.yaml",
    "content": ""
  },
  {
    "path": "mods/example/mod.chrome.yaml",
    "content": "Chrome:\n\texample|chrome/chrome.yaml\n\nChromeLayout:\n\tcommon|chrome/assetbrowser.yaml\n\tcommon|chrome/color-picker.yaml\n\tcommon|chrome/confirmation-dialogs.yaml\n\tcommon|chrome/connection.yaml\n\tcommon|chrome/credits.yaml\n\tcommon|chrome/dropdowns.yaml\n\tcommon|chrome/editor.yaml\n\tcommon|chrome/gamesave-browser.yaml\n\tcommon|chrome/gamesave-loading.yaml\n\tcommon|chrome/ingame.yaml\n\tcommon|chrome/ingame-chat.yaml\n\tcommon|chrome/ingame-debug.yaml\n\tcommon|chrome/ingame-debuginfo.yaml\n\tcommon|chrome/ingame-fmvplayer.yaml\n\tcommon|chrome/ingame-info.yaml\n\tcommon|chrome/ingame-infobriefing.yaml\n\tcommon|chrome/ingame-infochat.yaml\n\tcommon|chrome/ingame-info-lobby-options.yaml\n\tcommon|chrome/ingame-infoobjectives.yaml\n\tcommon|chrome/ingame-infoscripterror.yaml\n\tcommon|chrome/ingame-infostats.yaml\n\tcommon|chrome/ingame-menu.yaml\n\tcommon|chrome/ingame-perf.yaml\n\texample|chrome/ingame-observer.yaml\n\texample|chrome/layouts/ingame-player.yaml\n\tcommon|chrome/ingame-transients.yaml\n\tcommon|chrome/lobby.yaml\n\tcommon|chrome/lobby-kickdialogs.yaml\n\tcommon|chrome/lobby-mappreview.yaml\n\tcommon|chrome/lobby-music.yaml\n\tcommon|chrome/lobby-options.yaml\n\tcommon|chrome/lobby-players.yaml\n\tcommon|chrome/lobby-servers.yaml\n\tcommon|chrome/mainmenu.yaml\n\tcommon|chrome/mainmenu-prompts.yaml\n\tcommon|chrome/map-chooser.yaml\n\tcommon|chrome/missionbrowser.yaml\n\tcommon|chrome/multiplayer-browser.yaml\n\tcommon|chrome/multiplayer-browserpanels.yaml\n\tcommon|chrome/multiplayer-createserver.yaml\n\tcommon|chrome/multiplayer-directconnect.yaml\n\tcommon|chrome/musicplayer.yaml\n\tcommon|chrome/playerprofile.yaml\n\tcommon|chrome/replaybrowser.yaml\n\tcommon|chrome/settings.yaml\n\tcommon|chrome/settings-advanced.yaml\n\tcommon|chrome/settings-audio.yaml\n\tcommon|chrome/settings-display.yaml\n\tcommon|chrome/settings-hotkeys.yaml\n\tcommon|chrome/settings-input.yaml\n\tcommon|chrome/text-notifications.yaml\n\tcommon|chrome/tooltips.yaml\n\nChromeMetrics:\n\tcommon|metrics.yaml\n\nFonts:\n\tTiny:\n\t\tFont: common|FreeSans.ttf\n\t\tSize: 10\n\t\tAscender: 8\n\tTinyBold:\n\t\tFont: common|FreeSansBold.ttf\n\t\tSize: 10\n\t\tAscender: 8\n\tSmall:\n\t\tFont: common|FreeSans.ttf\n\t\tSize: 12\n\t\tAscender: 9\n\tRegular:\n\t\tFont: common|FreeSans.ttf\n\t\tSize: 14\n\t\tAscender: 11\n\tBold:\n\t\tFont: common|FreeSansBold.ttf\n\t\tSize: 14\n\t\tAscender: 11\n\tMediumBold:\n\t\tFont: common|FreeSansBold.ttf\n\t\tSize: 18\n\t\tAscender: 14\n\tBigBold:\n\t\tFont: common|FreeSansBold.ttf\n\t\tSize: 24\n\t\tAscender: 18\n\tTitle:\n\t\tFont: common|FreeSansBold.ttf\n\t\tSize: 32\n\t\tAscender: 24\n\nHotkeys:\n\tcommon|hotkeys/chat.yaml\n\tcommon|hotkeys/control-groups.yaml\n\tcommon|hotkeys/editor.yaml\n\tcommon|hotkeys/game.yaml\n\tcommon|hotkeys/observer.yaml\n\tcommon|hotkeys/production-common.yaml\n\tcommon|hotkeys/supportpowers.yaml\n\tcommon|hotkeys/viewport.yaml\n\nFluentMessages:\n\tcommon|fluent/common.ftl\n\tcommon|fluent/chrome.ftl\n\tcommon|fluent/hotkeys.ftl\n\tcommon|fluent/rules.ftl\n\texample|fluent/mod.ftl\n\texample|fluent/chrome.ftl\n\texample|fluent/rules.ftl\n\nAllowUnusedFluentMessagesInExternalPackages: true\n"
  },
  {
    "path": "mods/example/mod.content.yaml",
    "content": "Cursors:\n\texample|cursors/default.yaml\n\nMissions:\n\texample|missions/example.yaml\n\nMusic:\n\texample|music/example.yaml\n\nNotifications:\n\texample|notifications/example.yaml\n\nRules:\n\texample|rules/example.yaml\n\texample|rules/mpspawn.yaml\n\texample|rules/palettes.yaml\n\texample|rules/player.yaml\n\texample|rules/world.yaml\n\nSequences:\n\texample|sequences/example.yaml\n\texample|sequences/mapeditor.yaml\n\texample|sequences/mpspawn.yaml\n\nTileSets:\n\texample|tilesets/example.yaml\n\t\nVoices:\n\texample|voices/example.yaml\n\nWeapons:\n\texample|weapons/example.yaml\n"
  },
  {
    "path": "mods/example/mod.yaml",
    "content": "Metadata:\n\tTitle: mod-title\n\tVersion: {DEV_VERSION}\n\tWindowTitle: mod-windowtitle\n\nFileSystem: DefaultFileSystem\n\tPackages:\n\t\t^EngineDir\n\t\t$example: example\n\t\t^EngineDir|mods/common: common\n\nMapFolders:\n\texample|maps: System\n\nAssemblies: OpenRA.Mods.Common.dll, OpenRA.Mods.Example.dll\n\nAssetBrowser:\n\tAudioExtensions: .wav\n\tSpriteExtensions: .png\n\tVideoExtensions:\n\nSupportsMapsFrom: Example\n\nLoadScreen: BlankLoadScreen\n\nServerTraits:\n\tLobbyCommands\n\tSkirmishLogic\n\tPlayerPinger\n\tMasterServerPinger\n\tLobbySettingsNotification\n\nMapGrid:\n\tTileSize: 32, 32\n\tType: Rectangular\n\nSpriteFormats: PngSheet\n\nSoundFormats: Wav\n\nTerrainFormat: DefaultTerrain\n\nSpriteSequenceFormat: DefaultSpriteSequence\n\nDefaultOrderGenerator: UnitOrderGenerator\n\nGameSpeeds:\n\tDefaultSpeed: default\n\tSpeeds:\n\t\tslowest:\n\t\t\tName: options-game-speed.slowest\n\t\t\tTimestep: 80\n\t\t\tOrderLatency: 2\n\t\tslower:\n\t\t\tName: options-game-speed.slower\n\t\t\tTimestep: 50\n\t\t\tOrderLatency: 3\n\t\tdefault:\n\t\t\tName: options-game-speed.normal\n\t\t\tTimestep: 40\n\t\t\tOrderLatency: 3\n\t\tfast:\n\t\t\tName: options-game-speed.fast\n\t\t\tTimestep: 35\n\t\t\tOrderLatency: 4\n\t\tfaster:\n\t\t\tName: options-game-speed.faster\n\t\t\tTimestep: 30\n\t\t\tOrderLatency: 4\n\t\tfastest:\n\t\t\tName: options-game-speed.fastest\n\t\t\tTimestep: 20\n\t\t\tOrderLatency: 6\n\nInclude: mod.content.yaml\nInclude: mod.chrome.yaml\n"
  },
  {
    "path": "mods/example/music/example.yaml",
    "content": ""
  },
  {
    "path": "mods/example/notifications/example.yaml",
    "content": "Sounds:\n\tNotifications:\n\t\tChatLine:\n\t\tClickDisabledSound:\n\t\tClickSound:\n"
  },
  {
    "path": "mods/example/rules/example.yaml",
    "content": "example:\n\tAlwaysVisible:\n\tBodyOrientation:\n\tHitShape:\n\tImmobile:\n\tMapEditorData:\n\t\tCategories: Actors\n\tQuantizeFacingsFromSequence:\n\tRenderSprites:\n\tWithSpriteBody:\n\nexample.colorpicker:\n\tInherits: example\n\tRenderSprites:\n\t\tImage: example\n\t\tPalette: colorpicker\n\t-MapEditorData:\n"
  },
  {
    "path": "mods/example/rules/mpspawn.yaml",
    "content": "mpspawn:\n\tAlwaysVisible:\n\tImmobile:\n\t\tOccupiesSpace: false\n\tMapEditorData:\n\t\tCategories: System\n\tRenderSpritesEditorOnly:\n\tWithSpriteBody:\n"
  },
  {
    "path": "mods/example/rules/palettes.yaml",
    "content": "^palettes:\n\tPaletteFromGrayscale@greyscale:\n\t\tName: greyscale\n\tPlayerColorPalette@player:\n\t\tBasePalette: greyscale\n\tPlayerColorShift:\n\t\tBasePalette: player\n\tColorPickerPalette@colorpicker:\n\t\tName: colorpicker\n\t\tBasePalette: greyscale\n\t\tAllowModifiers: false\n\tColorPickerColorShift:\n\t\tBasePalette: colorpicker\n"
  },
  {
    "path": "mods/example/rules/player.yaml",
    "content": "^baseplayer:\n\tAlwaysVisible:\n\tShroud:\n\nplayer:\n\tInherits: ^baseplayer\n\tDeveloperMode:\n\neditorplayer:\n\tInherits: ^baseplayer\n"
  },
  {
    "path": "mods/example/rules/world.yaml",
    "content": "^baseworld:\n\tInherits: ^palettes\n\tActorMap:\n\tAlwaysVisible:\n\tControlGroups:\n\tFaction@Random:\n\t\tInternalName: Random\n\t\tName: faction-random.name\n\t\tRandomFactionMembers: example\n\t\tDescription: faction-random.description\n\tFaction@example:\n\t\tInternalName: example\n\t\tName: faction-example.name\n\t\tDescription: faction-example.description\n\tLoadWidgetAtGameStart:\n\tMusicPlaylist:\n\tScreenMap:\n\tSelection:\n\tTerrainRenderer:\n\nworld:\n\tInherits: ^baseworld\n\tColorPickerManager:\n\t\tPreviewActor: example.colorpicker\n\tCreateMapPlayers:\n\tCustomTerrainDebugOverlay:\n\tDebugVisualizations:\n\tMapStartingLocations:\n\tSpawnMapActors:\n\tSpawnStartingUnits:\n\tStartingUnits@Example:\n\t\tBaseActor: example\n\t\tFactions: example\n\t\tClassName: options-starting-units.unlabeled\n\neditorworld:\n\tInherits: ^baseworld\n\tBuildableTerrainOverlay:\n\t\tAllowedTerrainTypes:\n\t\tPalette:\n\tEditorActionManager:\n\tEditorActorLayer:\n\tEditorCursorLayer:\n\tMarkerLayerOverlay:\n\tTerrainGeometryOverlay:\n"
  },
  {
    "path": "mods/example/sequences/example.yaml",
    "content": "example:\n\tidle:\n\t\tFilename: sequences/assets/example.png\n"
  },
  {
    "path": "mods/example/sequences/mapeditor.yaml",
    "content": "overlay:\n\tbuild-invalid:\n\t\tFilename: sequences/assets/mapeditor.png\n\t\tStart: 1\n\neditor-overlay:\n\tDefaults:\n\t\tFilename: sequences/assets/mapeditor.png\n\tcopy:\n\tpaste:\n\t\tStart: 1\n"
  },
  {
    "path": "mods/example/sequences/mpspawn.yaml",
    "content": "mpspawn:\n\tidle:\n\t\tFilename: sequences/assets/mpspawn.png\n"
  },
  {
    "path": "mods/example/tilesets/example.yaml",
    "content": "General:\n\tName: Example\n\tId: EXAMPLE\n\tEditorTemplateOrder: Terrain\n\tPalette:\n\nTerrain:\n\tTerrainType@Clear:\n\t\tType: Clear\n\nTemplates:\n\tTemplate@255:\n\t\tId: 255\n\t\tImages: tilesets/example/example.png\n\t\tSize: 1,1\n\t\tCategories: Terrain\n\t\tTiles:\n\t\t\t0: Clear\n"
  },
  {
    "path": "mods/example/voices/example.yaml",
    "content": ""
  },
  {
    "path": "mods/example/weapons/example.yaml",
    "content": ""
  },
  {
    "path": "omnisharp.json",
    "content": "{\n    \"RoslynExtensionsOptions\": {\n        \"enableAnalyzersSupport\": true\n    }\n}\n"
  },
  {
    "path": "packaging/functions.sh",
    "content": "#!/bin/sh\n# Helper functions for packaging and installing projects using the OpenRA Mod SDK\n\n####\n# This file must stay /bin/sh and POSIX compliant for macOS and BSD portability.\n# Copy-paste the entire script into https://shellcheck.net to check.\n####\n\n# Compile and publish any mod assemblies to the target directory\n# Arguments:\n#   SRC_PATH: Path to the root SDK directory\n#   DEST_PATH: Path to the root of the install destination (will be created if necessary)\n#   TARGETPLATFORM: Platform type (win-x86, win-x64, osx-x64, osx-arm64, linux-x64, linux-arm64, unix-generic)\n#   RUNTIME: Runtime type (net6, mono)\n#   ENGINE_PATH: Path to the engine root directory\ninstall_mod_assemblies() {\n\tSRC_PATH=\"${1}\"\n\tDEST_PATH=\"${2}\"\n\tTARGETPLATFORM=\"${3}\"\n\tRUNTIME=\"${4}\"\n\tENGINE_PATH=\"${5}\"\n\n\tORIG_PWD=$(pwd)\n\tcd \"${SRC_PATH}\" || exit 1\n\n\tif [ \"${RUNTIME}\" = \"mono\" ]; then\n\t\techo \"Building assemblies\"\n\n\t\trm -rf \"${ENGINE_PATH:?}/bin\"\n\n\t\tfind . -maxdepth 1 -name '*.sln' -exec msbuild -verbosity:m -nologo -t:Build -restore -p:Configuration=Release -p:TargetPlatform=\"${TARGETPLATFORM}\" -p:Mono=true \\;\n\n\t\tcd \"${ORIG_PWD}\" || exit 1\n\t\tfor LIB in \"${ENGINE_PATH}/bin/\"*.dll \"${ENGINE_PATH}/bin/\"*.dll.config; do\n\t\t\tinstall -m644 \"${LIB}\" \"${DEST_PATH}\"\n\t\tdone\n\n\t\tif [ \"${TARGETPLATFORM}\" = \"linux-x64\" ] || [ \"${TARGETPLATFORM}\" = \"linux-arm64\" ]; then\n\t\t\tfor LIB in \"${ENGINE_PATH}/bin/\"*.so; do\n\t\t\t\tinstall -m755 \"${LIB}\" \"${DEST_PATH}\"\n\t\t\tdone\n\t\tfi\n\n\t\tif [ \"${TARGETPLATFORM}\" = \"osx-x64\" ] || [ \"${TARGETPLATFORM}\" = \"osx-arm64\" ]; then\n\t\t\tfor LIB in \"${ENGINE_PATH}/bin/\"*.dylib; do\n\t\t\t\tinstall -m755 \"${LIB}\" \"${DEST_PATH}\"\n\t\t\tdone\n\t\tfi\n\telse\n\t\tfind . -maxdepth 1 -name '*.sln' -exec dotnet publish -c Release -p:TargetPlatform=\"${TARGETPLATFORM}\" -r \"${TARGETPLATFORM}\" -p:PublishDir=\"${DEST_PATH}\" --self-contained true \\;\n\t\tcd \"${ORIG_PWD}\" || exit 1\n\tfi\n}\n"
  },
  {
    "path": "packaging/linux/buildpackage.sh",
    "content": "#!/bin/bash\n# OpenRA packaging script for Linux (AppImage)\nset -e\n\ncommand -v make >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Linux packaging requires make.\"; exit 1; }\ncommand -v python3 >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Linux packaging requires python 3.\"; exit 1; }\ncommand -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Linux packaging requires curl or wget.\"; exit 1; }\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ -n \"${missing}\" ]; then\n\t\tprintf \"Required mod.config variables are missing:\\n%sRepair your mod.config (or user.config) and try again.\\n\" \"${missing}\"\n\t\texit 1\n\tfi\n}\n\nif [ $# -eq \"0\" ]; then\n\techo \"Usage: $(basename \"$0\") version [outputdir]\"\n\texit 1\nfi\n\nPACKAGING_DIR=$(python3 -c \"import os; print(os.path.dirname(os.path.realpath('$0')))\")\nTEMPLATE_ROOT=\"${PACKAGING_DIR}/../../\"\nARTWORK_DIR=\"${PACKAGING_DIR}/../artwork/\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_DIRECTORY\" \"PACKAGING_DISPLAY_NAME\" \"PACKAGING_INSTALLER_NAME\" \"PACKAGING_COPY_CNC_DLL\" \"PACKAGING_COPY_D2K_DLL\" \\\n\t\"PACKAGING_FAQ_URL\" \"PACKAGING_OVERWRITE_MOD_VERSION\"\n\nTAG=\"$1\"\nif [ $# -eq \"1\" ]; then\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('.'))\")\nelse\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('$2'))\")\nfi\n\nAPPDIR=\"${PACKAGING_DIR}/${PACKAGING_INSTALLER_NAME}.appdir\"\n\n# Set the working dir to the location of this script\ncd \"${PACKAGING_DIR}\"\n\nif [ ! -f \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/Makefile\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\n. \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/functions.sh\"\n. \"${TEMPLATE_ROOT}/packaging/functions.sh\"\n\nif [ ! -d \"${OUTPUTDIR}\" ]; then\n\techo \"Output directory '${OUTPUTDIR}' does not exist.\";\n\texit 1\nfi\n\necho \"Building core files\"\ninstall_assemblies \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${APPDIR}/usr/lib/openra\" \"linux-x64\" \"net6\" \"True\" \"${PACKAGING_COPY_CNC_DLL}\" \"${PACKAGING_COPY_D2K_DLL}\"\ninstall_data \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${APPDIR}/usr/lib/openra\"\n\nfor f in ${PACKAGING_COPY_ENGINE_FILES}; do\n\tmkdir -p \"${APPDIR}/usr/lib/openra/$(dirname \"${f}\")\"\n\tcp -r \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/${f}\" \"${APPDIR}/usr/lib/openra/${f}\"\ndone\n\necho \"Building mod files\"\ninstall_mod_assemblies \"${TEMPLATE_ROOT}\" \"${APPDIR}/usr/lib/openra\" \"linux-x64\" \"net6\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\"\n\ncp -Lr \"${TEMPLATE_ROOT}/mods/\"* \"${APPDIR}/usr/lib/openra/mods\"\n\nset_engine_version \"${ENGINE_VERSION}\" \"${APPDIR}/usr/lib/openra\"\nif [ \"${PACKAGING_OVERWRITE_MOD_VERSION}\" == \"True\" ]; then\n\tset_mod_version \"${TAG}\" \"${APPDIR}/usr/lib/openra/mods/${MOD_ID}/mod.yaml\"\nelse\n\tMOD_VERSION=$(grep 'Version:' \"${APPDIR}/usr/lib/openra/mods/${MOD_ID}/mod.yaml\" | awk '{print $2}')\n\techo \"Mod version ${MOD_VERSION} will remain unchanged.\";\nfi\n\n# Add native libraries\necho \"Downloading appimagetool\"\nif command -v curl >/dev/null 2>&1; then\n\tcurl -s -L -O https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3\nelse\n\twget -cq https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3\nfi\n\necho \"Building AppImage\"\n\n# Add launcher and icons\nsed \"s/{MODID}/${MOD_ID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/AppRun.in\" | sed \"s/{MODNAME}/${PACKAGING_DISPLAY_NAME}/g\" > \"${APPDIR}/AppRun\"\nchmod 0755 \"${APPDIR}/AppRun\"\n\nif [ -n \"${PACKAGING_DISCORD_APPID}\" ]; then\n\tsed \"s/{DISCORDAPPID}/${PACKAGING_DISCORD_APPID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra.desktop.discord.in\" > temp.desktop.in\n\tsed \"s/{DISCORDAPPID}/${PACKAGING_DISCORD_APPID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra-mimeinfo.xml.discord.in\" > temp.xml.in\nelse\n\tcp \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra.desktop.in\" temp.desktop.in\n\tcp \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra-mimeinfo.xml.in\" temp.xml.in\nfi\n\nmkdir -p \"${APPDIR}/usr/share/applications\"\nchmod 0755 temp.desktop.in\nsed \"s/{MODID}/${MOD_ID}/g\" temp.desktop.in | sed \"s/{MODNAME}/${PACKAGING_DISPLAY_NAME}/g\" | sed \"s/{TAG}/${TAG}/g\" > \"${APPDIR}/usr/share/applications/openra-${MOD_ID}.desktop\"\ncp \"${APPDIR}/usr/share/applications/openra-${MOD_ID}.desktop\" \"${APPDIR}/openra-${MOD_ID}.desktop\"\nrm temp.desktop.in\n\nmkdir -p \"${APPDIR}/usr/share/mime/packages\"\nchmod 0644 temp.xml.in\nsed \"s/{MODID}/${MOD_ID}/g\" temp.xml.in | sed \"s/{TAG}/${TAG}/g\" > \"${APPDIR}/usr/share/mime/packages/openra-${MOD_ID}.xml\"\nrm temp.xml.in\n\nif [ -f \"${ARTWORK_DIR}/icon_scalable.svg\" ]; then\n\tinstall -Dm644 \"${ARTWORK_DIR}/icon_scalable.svg\" \"${APPDIR}/usr/share/icons/hicolor/scalable/apps/openra-${MOD_ID}.svg\"\nfi\n\nfor i in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024; do\n\tif [ -f \"${ARTWORK_DIR}/icon_${i}.png\" ]; then\n\t\tinstall -Dm644 \"${ARTWORK_DIR}/icon_${i}.png\" \"${APPDIR}/usr/share/icons/hicolor/${i}/apps/openra-${MOD_ID}.png\"\n\t\tinstall -m644 \"${ARTWORK_DIR}/icon_${i}.png\" \"${APPDIR}/openra-${MOD_ID}.png\"\n\tfi\ndone\n\ninstall -d \"${APPDIR}/usr/bin\"\n\nsed \"s/{MODID}/${MOD_ID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra.appimage.in\" | sed \"s/{TAG}/${TAG}/g\" | sed \"s/{MODNAME}/${PACKAGING_DISPLAY_NAME}/g\" | sed \"s/{MODINSTALLERNAME}/${PACKAGING_INSTALLER_NAME}/g\" | sed \"s|{MODFAQURL}|${PACKAGING_FAQ_URL}|g\" > \"${APPDIR}/usr/bin/openra-${MOD_ID}\"\nchmod 0755 \"${APPDIR}/usr/bin/openra-${MOD_ID}\"\n\nsed \"s/{MODID}/${MOD_ID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra-server.appimage.in\" > \"${APPDIR}/usr/bin/openra-${MOD_ID}-server\"\nchmod 0755 \"${APPDIR}/usr/bin/openra-${MOD_ID}-server\"\n\nsed \"s/{MODID}/${MOD_ID}/g\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/openra-utility.appimage.in\" > \"${APPDIR}/usr/bin/openra-${MOD_ID}-utility\"\nchmod 0755 \"${APPDIR}/usr/bin/openra-${MOD_ID}-utility\"\n\ninstall -m 0755 \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/linux/gtk-dialog.py\" \"${APPDIR}/usr/bin/gtk-dialog.py\"\n\nchmod a+x appimagetool-x86_64.AppImage\nARCH=x86_64 ./appimagetool-x86_64.AppImage \"${APPDIR}\" \"${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}-x86_64.AppImage\"\n\n# Clean up\nrm -rf appimagetool-x86_64.AppImage \"${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}\" \"${APPDIR}\"\n"
  },
  {
    "path": "packaging/macos/buildpackage.sh",
    "content": "#!/bin/bash\n# OpenRA Mod SDK packaging script for macOS\n#\n# The application bundles will be signed if the following environment variables are defined:\n#   MACOS_DEVELOPER_IDENTITY: The alphanumeric identifier listed in the certificate name (\"Developer ID Application: <your name> (<identity>)\")\n#                             or as Team ID in your Apple Developer account Membership Details.\n# If the identity is not already in the default keychain, specify the following environment variables to import it:\n#   MACOS_DEVELOPER_CERTIFICATE_BASE64: base64 content of the exported .p12 developer ID certificate.\n#                                       Generate using `base64 certificate.p12 | pbcopy`\n#   MACOS_DEVELOPER_CERTIFICATE_PASSWORD: password to unlock the MACOS_DEVELOPER_CERTIFICATE_BASE64 certificate\n#\n# The applicaton bundles will be notarized if the following environment variables are defined:\n#   MACOS_DEVELOPER_USERNAME: Email address for the developer account\n#   MACOS_DEVELOPER_PASSWORD: App-specific password for the developer account\n#\nset -o errexit -o pipefail || exit $?\n\nif [[ \"$OSTYPE\" != \"darwin\"* ]]; then\n\techo >&2 \"macOS packaging requires a macOS host\"\n\texit 1\nfi\n\ncommand -v make >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK macOS packaging requires make.\"; exit 1; }\ncommand -v python3 >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK macOS packaging requires python 3.\"; exit 1; }\ncommand -v clang >/dev/null 2>&1 || { echo >&2 \"macOS packaging requires clang.\"; exit 1; }\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ -n \"${missing}\" ]; then\n\t\tprintf \"Required mod.config variables are missing:\\n%sRepair your mod.config (or user.config) and try again.\\n\" \"${missing}\"\n\t\texit 1\n\tfi\n}\n\nif [ $# -ne \"2\" ]; then\n\techo \"Usage: $(basename \"$0\") tag outputdir\"\n\texit 1\nfi\n\nPACKAGING_DIR=$(python3 -c \"import os; print(os.path.dirname(os.path.realpath('$0')))\")\nTEMPLATE_ROOT=\"${PACKAGING_DIR}/../../\"\nARTWORK_DIR=\"${PACKAGING_DIR}/../artwork/\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_DIRECTORY\" \"PACKAGING_DISPLAY_NAME\" \"PACKAGING_INSTALLER_NAME\" \"PACKAGING_COPY_CNC_DLL\" \"PACKAGING_COPY_D2K_DLL\" \\\n\t\"PACKAGING_OSX_DMG_MOD_ICON_POSITION\" \"PACKAGING_OSX_DMG_APPLICATION_ICON_POSITION\" \"PACKAGING_OSX_DMG_HIDDEN_ICON_POSITION\" \\\n\t\"PACKAGING_FAQ_URL\" \"PACKAGING_OVERWRITE_MOD_VERSION\"\n\nif [ ! -f \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/Makefile\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\n. \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/functions.sh\"\n. \"${TEMPLATE_ROOT}/packaging/functions.sh\"\n\n# Import code signing certificate\nif [ -n \"${MACOS_DEVELOPER_CERTIFICATE_BASE64}\" ] && [ -n \"${MACOS_DEVELOPER_CERTIFICATE_PASSWORD}\" ] && [ -n \"${MACOS_DEVELOPER_IDENTITY}\" ]; then\n\techo \"Importing signing certificate\"\n\techo \"${MACOS_DEVELOPER_CERTIFICATE_BASE64}\" | base64 --decode > build.p12\n\tsecurity create-keychain -p build build.keychain\n\tsecurity default-keychain -s build.keychain\n\tsecurity unlock-keychain -p build build.keychain\n\tsecurity import build.p12 -k build.keychain -P \"${MACOS_DEVELOPER_CERTIFICATE_PASSWORD}\" -T /usr/bin/codesign >/dev/null 2>&1\n\tsecurity set-key-partition-list -S apple-tool:,apple: -s -k build build.keychain >/dev/null 2>&1\n\trm -fr build.p12\nfi\n\nTAG=\"$1\"\nif [ $# -eq \"1\" ]; then\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('.'))\")\nelse\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('$2'))\")\nfi\n\nif [ ! -d \"${OUTPUTDIR}\" ]; then\n\techo \"Output directory '${OUTPUTDIR}' does not exist.\";\n\texit 1\nfi\n\nBUILTDIR=\"${PACKAGING_DIR}/build\"\nPACKAGING_OSX_APP_NAME=\"OpenRA - ${PACKAGING_DISPLAY_NAME}.app\"\n\n# Set the working dir to the location of this script\ncd \"${PACKAGING_DIR}\"\n\nmodify_plist() {\n\tsed \"s|$1|$2|g\" \"$3\" > \"$3.tmp\" && mv \"$3.tmp\" \"$3\"\n}\n\nLAUNCHER_DIR=\"${BUILTDIR}/${PACKAGING_OSX_APP_NAME}\"\nLAUNCHER_CONTENTS_DIR=\"${LAUNCHER_DIR}/Contents\"\nLAUNCHER_ASSEMBLY_DIR=\"${LAUNCHER_CONTENTS_DIR}/MacOS\"\nLAUNCHER_RESOURCES_DIR=\"${LAUNCHER_CONTENTS_DIR}/Resources\"\n\necho \"Building launcher\"\n\nmkdir -p \"${LAUNCHER_RESOURCES_DIR}\"\nmkdir -p \"${LAUNCHER_ASSEMBLY_DIR}/x86_64\"\nmkdir -p \"${LAUNCHER_ASSEMBLY_DIR}/arm64\"\nmkdir -p \"${LAUNCHER_ASSEMBLY_DIR}/mono\"\necho \"APPL????\" > \"${LAUNCHER_CONTENTS_DIR}/PkgInfo\"\ncp \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/Info.plist.in\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\n\nmodify_plist \"{DEV_VERSION}\" \"${TAG}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nmodify_plist \"{FAQ_URL}\" \"${PACKAGING_FAQ_URL}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nmodify_plist \"{MOD_ID}\" \"${MOD_ID}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nmodify_plist \"{MINIMUM_SYSTEM_VERSION}\" \"10.11\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nmodify_plist \"{MOD_NAME}\" \"${PACKAGING_DISPLAY_NAME}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nmodify_plist \"{JOIN_SERVER_URL_SCHEME}\" \"openra-${MOD_ID}-${TAG}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nif [ -n \"${DISCORD_APPID}\" ]; then\n\tmodify_plist \"{DISCORD_URL_SCHEME}\" \"discord-${DISCORD_APPID}\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nelse\n\tmodify_plist \"<string>{DISCORD_URL_SCHEME}</string>\" \"\" \"${LAUNCHER_CONTENTS_DIR}/Info.plist\"\nfi\n\n# Compile universal (x86_64 + arm64) Launcher and arch-specific apphosts\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/apphost.c\" -o \"${LAUNCHER_ASSEMBLY_DIR}/apphost-x86_64\" -framework AppKit -target x86_64-apple-macos10.15\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/apphost.c\" -o \"${LAUNCHER_ASSEMBLY_DIR}/apphost-arm64\" -framework AppKit -target arm64-apple-macos10.15\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/apphost-mono.c\" -o \"${LAUNCHER_ASSEMBLY_DIR}/apphost-mono\" -framework AppKit -target x86_64-apple-macos10.11\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/checkmono.c\" -o \"${LAUNCHER_ASSEMBLY_DIR}/checkmono\" -framework AppKit -target x86_64-apple-macos10.11\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/launcher.m\" -o \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-x86_64\" -framework AppKit -target x86_64-apple-macos10.11\nclang \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/launcher.m\" -o \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-arm64\" -framework AppKit -target arm64-apple-macos10.15\nlipo -create -output \"${LAUNCHER_ASSEMBLY_DIR}/Launcher\" \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-x86_64\" \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-arm64\"\nrm \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-x86_64\" \"${LAUNCHER_ASSEMBLY_DIR}/Launcher-arm64\"\n\ninstall_assemblies \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${LAUNCHER_ASSEMBLY_DIR}/x86_64\" \"osx-x64\" \"net6\" \"True\" \"${PACKAGING_COPY_CNC_DLL}\" \"${PACKAGING_COPY_D2K_DLL}\"\ninstall_assemblies \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${LAUNCHER_ASSEMBLY_DIR}/arm64\" \"osx-arm64\" \"net6\" \"True\" \"${PACKAGING_COPY_CNC_DLL}\" \"${PACKAGING_COPY_D2K_DLL}\"\ninstall_assemblies \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${LAUNCHER_ASSEMBLY_DIR}/mono\" \"osx-x64\" \"mono\" \"True\" \"${PACKAGING_COPY_CNC_DLL}\" \"${PACKAGING_COPY_D2K_DLL}\"\ninstall_data \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${LAUNCHER_RESOURCES_DIR}\"\n\nfor f in ${PACKAGING_COPY_ENGINE_FILES}; do\n\tmkdir -p \"${LAUNCHER_RESOURCES_DIR}/$(dirname \"${f}\")\"\n\tcp -r \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/${f}\" \"${LAUNCHER_RESOURCES_DIR}/${f}\"\ndone\n\necho \"Building mod files\"\ninstall_mod_assemblies \"${TEMPLATE_ROOT}\" \"${LAUNCHER_ASSEMBLY_DIR}/x86_64\" \"osx-x64\" \"net6\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\"\ninstall_mod_assemblies \"${TEMPLATE_ROOT}\" \"${LAUNCHER_ASSEMBLY_DIR}/arm64\" \"osx-arm64\" \"net6\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\"\ninstall_mod_assemblies \"${TEMPLATE_ROOT}\" \"${LAUNCHER_ASSEMBLY_DIR}/mono\" \"osx-x64\" \"mono\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\"\n\ncp -LR \"${TEMPLATE_ROOT}mods/\"* \"${LAUNCHER_RESOURCES_DIR}/mods\"\n\nset_engine_version \"${ENGINE_VERSION}\" \"${LAUNCHER_RESOURCES_DIR}\"\nif [ \"${PACKAGING_OVERWRITE_MOD_VERSION}\" == \"True\" ]; then\n\tset_mod_version \"${TAG}\" \"${LAUNCHER_RESOURCES_DIR}/mods/${MOD_ID}/mod.yaml\"\nelse\n\tMOD_VERSION=$(grep 'Version:' \"${LAUNCHER_RESOURCES_DIR}/mods/${MOD_ID}/mod.yaml\" | awk '{print $2}')\n\techo \"Mod version ${MOD_VERSION} will remain unchanged.\";\nfi\n\n# Assemble multi-resolution icon\nmkdir \"${BUILTDIR}/mod.iconset\"\ncp \"${ARTWORK_DIR}/icon_16x16.png\" \"${BUILTDIR}/mod.iconset/icon_16x16.png\"\ncp \"${ARTWORK_DIR}/icon_32x32.png\" \"${BUILTDIR}/mod.iconset/icon_16x16@2.png\"\ncp \"${ARTWORK_DIR}/icon_32x32.png\" \"${BUILTDIR}/mod.iconset/icon_32x32.png\"\ncp \"${ARTWORK_DIR}/icon_64x64.png\" \"${BUILTDIR}/mod.iconset/icon_32x32@2x.png\"\ncp \"${ARTWORK_DIR}/icon_128x128.png\" \"${BUILTDIR}/mod.iconset/icon_128x128.png\"\ncp \"${ARTWORK_DIR}/icon_256x256.png\" \"${BUILTDIR}/mod.iconset/icon_128x128@2x.png\"\ncp \"${ARTWORK_DIR}/icon_256x256.png\" \"${BUILTDIR}/mod.iconset/icon_256x256.png\"\ncp \"${ARTWORK_DIR}/icon_512x512.png\" \"${BUILTDIR}/mod.iconset/icon_256x256@2x.png\"\niconutil --convert icns \"${BUILTDIR}/mod.iconset\" -o \"${LAUNCHER_RESOURCES_DIR}/${MOD_ID}.icns\"\nrm -rf \"${BUILTDIR}/mod.iconset\"\n\n# Sign binaries with developer certificate\nif [ -n \"${MACOS_DEVELOPER_IDENTITY}\" ]; then\n\tcodesign -s \"${MACOS_DEVELOPER_IDENTITY}\" --timestamp --options runtime -f --entitlements \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/macos/entitlements.plist\" --deep \"${LAUNCHER_DIR}\"\nfi\n\necho \"Packaging disk image\"\nhdiutil create \"build.dmg\" -format UDRW -volname \"${PACKAGING_DISPLAY_NAME}\" -fs HFS+ -srcfolder \"${BUILTDIR}\"\nDMG_DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen \"${PACKAGING_DIR}/build.dmg\" | egrep '^/dev/' | sed 1q | awk '{print $1}')\nsleep 2\n\n# Background image is created from source svg in artsrc repository\nmkdir \"/Volumes/${PACKAGING_DISPLAY_NAME}/.background/\"\ntiffutil -cathidpicheck \"${ARTWORK_DIR}/macos-background.png\" \"${ARTWORK_DIR}/macos-background-2x.png\" -out \"/Volumes/${PACKAGING_DISPLAY_NAME}/.background/background.tiff\"\n\ncp \"${LAUNCHER_DIR}/Contents/Resources/${MOD_ID}.icns\" \"/Volumes/${PACKAGING_DISPLAY_NAME}/.VolumeIcon.icns\"\n\necho '\n   tell application \"Finder\"\n     tell disk \"'${PACKAGING_DISPLAY_NAME}'\"\n           open\n           set current view of container window to icon view\n           set toolbar visible of container window to false\n           set statusbar visible of container window to false\n           set the bounds of container window to {400, 100, 1000, 550}\n           set theViewOptions to the icon view options of container window\n           set arrangement of theViewOptions to not arranged\n           set icon size of theViewOptions to 72\n           set background picture of theViewOptions to file \".background:background.tiff\"\n           make new alias file at container window to POSIX file \"/Applications\" with properties {name:\"Applications\"}\n           set position of item \"'${PACKAGING_OSX_APP_NAME}'\" of container window to {'${PACKAGING_OSX_DMG_MOD_ICON_POSITION}'}\n           set position of item \"Applications\" of container window to {'${PACKAGING_OSX_DMG_APPLICATION_ICON_POSITION}'}\n           set position of item \".background\" of container window to {'${PACKAGING_OSX_DMG_HIDDEN_ICON_POSITION}'}\n           set position of item \".fseventsd\" of container window to {'${PACKAGING_OSX_DMG_HIDDEN_ICON_POSITION}'}\n           set position of item \".VolumeIcon.icns\" of container window to {'${PACKAGING_OSX_DMG_HIDDEN_ICON_POSITION}'}\n           update without registering applications\n           delay 5\n           close\n     end tell\n   end tell\n' | osascript\n\n# HACK: Copy the volume icon again - something in the previous step seems to delete it...?\ncp \"${LAUNCHER_DIR}/Contents/Resources/${MOD_ID}.icns\" \"/Volumes/${PACKAGING_DISPLAY_NAME}/.VolumeIcon.icns\"\nSetFile -c icnC \"/Volumes/${PACKAGING_DISPLAY_NAME}/.VolumeIcon.icns\"\nSetFile -a C \"/Volumes/${PACKAGING_DISPLAY_NAME}\"\n\nchmod -Rf go-w \"/Volumes/${PACKAGING_DISPLAY_NAME}\"\nsync\nsync\n\nhdiutil detach \"${DMG_DEVICE}\"\nrm -rf \"${BUILTDIR}\"\n\nif [ -n \"${MACOS_DEVELOPER_CERTIFICATE_BASE64}\" ] && [ -n \"${MACOS_DEVELOPER_CERTIFICATE_PASSWORD}\" ] && [ -n \"${MACOS_DEVELOPER_IDENTITY}\" ]; then\n\tsecurity delete-keychain build.keychain\nfi\n\nif [ -n \"${MACOS_DEVELOPER_USERNAME}\" ] && [ -n \"${MACOS_DEVELOPER_PASSWORD}\" ] && [ -n \"${MACOS_DEVELOPER_IDENTITY}\" ]; then\n\techo \"Submitting build for notarization\"\n\n\t# Reset xcode search path to fix xcrun not finding altool\n\tsudo xcode-select -r\n\n\t# Create a temporary read-only dmg for submission (notarization service rejects read/write images)\n\thdiutil convert \"build.dmg\" -format ULFO -ov -o \"build-notarization.dmg\"\n\n\txcrun notarytool submit \"build-notarization.dmg\" --wait --apple-id \"${MACOS_DEVELOPER_USERNAME}\" --password \"${MACOS_DEVELOPER_PASSWORD}\" --team-id \"${MACOS_DEVELOPER_IDENTITY}\"\n\n\trm \"build-notarization.dmg\"\n\n\techo \"Stapling tickets\"\n\tDMG_DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen \"build.dmg\" | egrep '^/dev/' | sed 1q | awk '{print $1}')\n\tsleep 2\n\n\txcrun stapler staple \"/Volumes/${PACKAGING_DISPLAY_NAME}/${PACKAGING_OSX_APP_NAME}\"\n\n\tsync\n\tsync\n\n\thdiutil detach \"${DMG_DEVICE}\"\nfi\n\nhdiutil convert \"build.dmg\" -format ULFO -ov -o \"${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}.dmg\"\nrm \"build.dmg\""
  },
  {
    "path": "packaging/package-all.sh",
    "content": "#!/bin/bash\nset -e\n\nif [ $# -eq \"0\" ]; then\n\techo \"Usage: `basename $0` version [outputdir]\"\n\texit 1\nfi\n\nTAG=\"$1\"\nif [ $# -eq \"1\" ]; then\n\tOUTPUTDIR=$(pwd)\nelse\n\tOUTPUTDIR=$2\nfi\n\ncommand -v python3 >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK packaging requires python 3.\"; exit 1; }\ncommand -v make >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK packaging requires make.\"; exit 1; }\n\nif [[ \"$OSTYPE\" != \"darwin\"* ]]; then\n\tcommand -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK packaging requires curl or wget.\"; exit 1; }\n\tcommand -v makensis >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK packaging requires makensis.\"; exit 1; }\nfi\n\nPACKAGING_DIR=$(python3 -c \"import os; print(os.path.dirname(os.path.realpath('$0')))\")\n\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n\techo \"Windows packaging requires a Linux host.\"\n\techo \"Linux AppImage packaging requires a Linux host.\"\n\techo \"Building macOS package\"\n\t${PACKAGING_DIR}/macos/buildpackage.sh \"${TAG}\" \"${OUTPUTDIR}\"\n\tif [ $? -ne 0 ]; then\n\t\techo \"macOS package build failed.\"\n\tfi\nelse\n\techo \"Building Windows package\"\n\t${PACKAGING_DIR}/windows/buildpackage.sh \"${TAG}\" \"${OUTPUTDIR}\"\n\tif [ $? -ne 0 ]; then\n\t\techo \"Windows package build failed.\"\n\tfi\n\n\techo \"Building Linux AppImage package\"\n\t${PACKAGING_DIR}/linux/buildpackage.sh \"${TAG}\" \"${OUTPUTDIR}\"\n\tif [ $? -ne 0 ]; then\n\t\techo \"Linux AppImage package build failed.\"\n\tfi\n\n\techo \"macOS packaging requires a macOS host.\"\nfi\n\necho \"Package build done.\"\n"
  },
  {
    "path": "packaging/windows/buildpackage.nsi",
    "content": "; Copyright (c) The OpenRA Developers and Contributors\n; This file is part of OpenRA.\n;\n;  OpenRA is free software: you can redistribute it and/or modify\n;  it under the terms of the GNU General Public License as published by\n;  the Free Software Foundation, either version 3 of the License, or\n;  (at your option) any later version.\n;\n;  OpenRA is distributed in the hope that it will be useful,\n;  but WITHOUT ANY WARRANTY; without even the implied warranty of\n;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n;  GNU General Public License for more details.\n;\n;  You should have received a copy of the GNU General Public License\n;  along with OpenRA.  If not, see <https://www.gnu.org/licenses/>.\n\n\n!include \"MUI2.nsh\"\n!include \"FileFunc.nsh\"\n!include \"WordFunc.nsh\"\n\nName \"${PACKAGING_DISPLAY_NAME}\"\nOutFile \"${OUTFILE}\"\n\nManifestDPIAware true\n\nUnicode True\n\nFunction .onInit\n\t!ifndef USE_PROGRAMFILES32\n\t\tSetRegView 64\n\t!endif\n\tReadRegStr $INSTDIR HKLM \"Software\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"InstallDir\"\n\tStrCmp $INSTDIR \"\" unset done\n\tunset:\n\t!ifndef USE_PROGRAMFILES32\n\t\tStrCpy $INSTDIR \"$PROGRAMFILES64\\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}\"\n\t!else\n\t\tStrCpy $INSTDIR \"$PROGRAMFILES32\\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}\"\n\t!endif\n\tdone:\nFunctionEnd\n\nSetCompressor lzma\nRequestExecutionLevel admin\n\n!insertmacro MUI_PAGE_WELCOME\n!insertmacro MUI_PAGE_LICENSE \"${PACKAGING_WINDOWS_LICENSE_FILE}\"\n!insertmacro MUI_PAGE_DIRECTORY\n\n!define MUI_STARTMENUPAGE_REGISTRY_ROOT \"HKLM\"\n!define MUI_STARTMENUPAGE_REGISTRY_KEY \"Software\\${PACKAGING_WINDOWS_REGISTRY_KEY}\"\n!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME \"Start Menu Folder\"\n!define MUI_STARTMENUPAGE_DEFAULTFOLDER \"OpenRA\"\n\nVar StartMenuFolder\n!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder\n\n!insertmacro MUI_PAGE_COMPONENTS\n!insertmacro MUI_PAGE_INSTFILES\n\n!insertmacro MUI_UNPAGE_CONFIRM\n!insertmacro MUI_UNPAGE_INSTFILES\n!insertmacro MUI_UNPAGE_FINISH\n\n!insertmacro MUI_LANGUAGE \"English\"\n\n;***************************\n;Section Definitions\n;***************************\nSection \"-Reg\" Reg\n\n\t; Installation directory\n\tWriteRegStr HKLM \"Software\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"InstallDir\" $INSTDIR\n\n\t; Join server URL Scheme\n\tWriteRegStr HKLM \"Software\\Classes\\openra-${MOD_ID}-${TAG}\" \"\" \"URL:Join OpenRA server\"\n\tWriteRegStr HKLM \"Software\\Classes\\openra-${MOD_ID}-${TAG}\" \"URL Protocol\" \"\"\n\tWriteRegStr HKLM \"Software\\Classes\\openra-${MOD_ID}-${TAG}\\DefaultIcon\" \"\" \"$INSTDIR\\${MOD_ID}.ico,0\"\n\tWriteRegStr HKLM \"Software\\Classes\\openra-${MOD_ID}-${TAG}\\Shell\\Open\\Command\" \"\" \"$INSTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe Launch.URI=%1\"\n\n\t!ifdef USE_DISCORDID\n\t\tWriteRegStr HKLM \"Software\\Classes\\discord-${USE_DISCORDID}\" \"\" \"URL:Run game ${USE_DISCORDID} protocol\"\n\t\tWriteRegStr HKLM \"Software\\Classes\\discord-${USE_DISCORDID}\" \"URL Protocol\" \"\"\n\t\tWriteRegStr HKLM \"Software\\Classes\\discord-${USE_DISCORDID}\\DefaultIcon\" \"\" \"$INSTDIR\\${MOD_ID}.ico,0\"\n\t\tWriteRegStr HKLM \"Software\\Classes\\discord-${USE_DISCORDID}\\Shell\\Open\\Command\" \"\" \"$INSTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\"\n\t!endif\n\nSectionEnd\n\nSection \"Game\" GAME\n\tSectionIn RO\n\n\tSetOutPath \"$INSTDIR\"\n\tFile \"${SRCDIR}\\*.exe\"\n\tFile \"${SRCDIR}\\*.dll.config\"\n\tFile \"${SRCDIR}\\*.dll\"\n\tFile \"${SRCDIR}\\*.ico\"\n\tFile \"${SRCDIR}\\*.deps.json\"\n\tFile \"${SRCDIR}\\*.runtimeconfig.json\"\n\tFile \"${SRCDIR}\\global mix database.dat\"\n\tFile \"${SRCDIR}\\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP\"\n\tFile \"${SRCDIR}\\VERSION\"\n\tFile \"${SRCDIR}\\AUTHORS\"\n\tFile \"${SRCDIR}\\COPYING\"\n\tFile /r \"${SRCDIR}\\mods\"\n\n\t!insertmacro MUI_STARTMENU_WRITE_BEGIN Application\n\t\tCreateDirectory \"$SMPROGRAMS\\$StartMenuFolder\"\n\t\tCreateShortCut \"$SMPROGRAMS\\$StartMenuFolder\\${PACKAGING_DISPLAY_NAME}.lnk\" \"$OUTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" \"\" \\\n\t\t\t\"$OUTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" \"\" \"\" \"\" \"\"\n\t!insertmacro MUI_STARTMENU_WRITE_END\n\n\tSetOutPath \"$INSTDIR\\glsl\"\n\tFile \"${SRCDIR}\\glsl\\*.frag\"\n\tFile \"${SRCDIR}\\glsl\\*.vert\"\n\n\t; Estimated install size for the control panel properties\n\t${GetSize} \"$INSTDIR\" \"/S=0K\" $0 $1 $2\n\tIntFmt $0 \"0x%08X\" $0\n\tWriteRegDWORD HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"EstimatedSize\" \"$0\"\n\n\tSetShellVarContext all\n\tCreateDirectory \"$APPDATA\\OpenRA\\ModMetadata\"\n\tSetOutPath \"$INSTDIR\"\n\tnsExec::ExecToLog '\"$INSTDIR\\OpenRA.Utility.exe\" ${MOD_ID} --register-mod \"$INSTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" system'\n\tnsExec::ExecToLog '\"$INSTDIR\\OpenRA.Utility.exe\" ${MOD_ID} --clear-invalid-mod-registrations system'\n\tSetShellVarContext current\n\nSectionEnd\n\nSection \"Desktop Shortcut\" DESKTOPSHORTCUT\n\tSetOutPath \"$INSTDIR\"\n\tCreateShortCut \"$DESKTOP\\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk\" \"$INSTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" \"\" \\\n\t\t\"$INSTDIR\\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" \"\" \"\" \"\" \"\"\nSectionEnd\n\n;***************************\n;Uninstaller Sections\n;***************************\nSection \"-Uninstaller\"\n\tWriteUninstaller $INSTDIR\\uninstaller.exe\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"DisplayName\" \"${PACKAGING_DISPLAY_NAME}\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"UninstallString\" \"$INSTDIR\\uninstaller.exe\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"QuietUninstallString\" \"$\\\"$INSTDIR\\uninstall.exe$\\\" /S\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"InstallLocation\" \"$INSTDIR\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"DisplayIcon\" \"$INSTDIR\\${MOD_ID}.ico\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"Publisher\" \"${PACKAGING_AUTHORS}\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"URLInfoAbout\" \"${PACKAGING_WEBSITE_URL}\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"DisplayVersion\" \"${TAG}\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"NoModify\" \"1\"\n\tWriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\" \"NoRepair\" \"1\"\nSectionEnd\n\n!macro Clean UN\nFunction ${UN}Clean\n\tnsExec::ExecToLog '\"$INSTDIR\\OpenRA.Utility.exe\" ${MOD_ID} --unregister-mod system'\n\n\tRMDir /r $INSTDIR\\mods\n\tRMDir /r $INSTDIR\\maps\n\tRMDir /r $INSTDIR\\glsl\n\tDelete $INSTDIR\\*.exe\n\tDelete $INSTDIR\\*.dll\n\tDelete $INSTDIR\\*.ico\n\tDelete $INSTDIR\\*.dll.config\n\tDelete $INSTDIR\\*.deps.json\n\tDelete $INSTDIR\\*.runtimeconfig.json\n\tDelete $INSTDIR\\VERSION\n\tDelete $INSTDIR\\AUTHORS\n\tDelete $INSTDIR\\COPYING\n\tDelete \"$INSTDIR\\global mix database.dat\"\n\tDelete $INSTDIR\\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP\n\n\tRMDir /r $INSTDIR\\Support\n\n\t!ifndef USE_PROGRAMFILES32\n\t\tSetRegView 64\n\t!endif\n\n\tDeleteRegKey HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PACKAGING_WINDOWS_REGISTRY_KEY}\"\n\tDeleteRegKey HKLM \"Software\\Classes\\openra-${MOD_ID}-${TAG}\"\n\n\t!ifdef USE_DISCORDID\n\t\tDeleteRegKey HKLM \"Software\\Classes\\discord-${USE_DISCORDID}\"\n\t!endif\n\n\tDelete $INSTDIR\\uninstaller.exe\n\tRMDir $INSTDIR\n\n\t!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder\n\n\t; Clean up start menu: Delete all our icons, and the OpenRA folder\n\t; *only* if we were the only installed version\n\tDelete \"$SMPROGRAMS\\$StartMenuFolder\\${PACKAGING_DISPLAY_NAME}.lnk\"\n\tRMDir \"$SMPROGRAMS\\$StartMenuFolder\"\n\n\tDelete \"$DESKTOP\\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk\"\n\tDeleteRegKey HKLM \"Software\\${PACKAGING_WINDOWS_REGISTRY_KEY}\"\nFunctionEnd\n!macroend\n\n!insertmacro Clean \"\"\n!insertmacro Clean \"un.\"\n\nSection \"Uninstall\"\n\tCall un.Clean\nSectionEnd\n\n;***************************\n;Section Descriptions\n;***************************\nLangString DESC_GAME ${LANG_ENGLISH} \"${PACKAGING_DISPLAY_NAME} game files.\"\nLangString DESC_DESKTOPSHORTCUT ${LANG_ENGLISH} \"Place shortcut on the Desktop.\"\n\n!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\n\t!insertmacro MUI_DESCRIPTION_TEXT ${GAME} $(DESC_GAME)\n\t!insertmacro MUI_DESCRIPTION_TEXT ${DESKTOPSHORTCUT} $(DESC_DESKTOPSHORTCUT)\n!insertmacro MUI_FUNCTION_DESCRIPTION_END\n\n;***************************\n;Callbacks\n;***************************\n\nFunction .onInstFailed\n\tCall Clean\nFunctionEnd\n"
  },
  {
    "path": "packaging/windows/buildpackage.sh",
    "content": "#!/bin/bash\nset -e\ncommand -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Windows packaging requires curl or wget.\"; exit 1; }\ncommand -v makensis >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Windows packaging requires makensis.\"; exit 1; }\ncommand -v convert >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Windows packaging requires ImageMagick.\"; exit 1; }\ncommand -v python3 >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Windows packaging requires python 3.\"; exit 1; }\ncommand -v wine64 >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK Windows packaging requires wine64.\"; exit 1; }\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ -n \"${missing}\" ]; then\n\t\tprintf \"Required mod.config variables are missing:\\n%sRepair your mod.config (or user.config) and try again.\\n\" \"${missing}\"\n\t\texit 1\n\tfi\n}\n\nif [ $# -eq \"0\" ]; then\n\techo \"Usage: $(basename \"$0\") version [outputdir]\"\n\texit 1\nfi\n\nPACKAGING_DIR=$(python3 -c \"import os; print(os.path.dirname(os.path.realpath('$0')))\")\nTEMPLATE_ROOT=\"${PACKAGING_DIR}/../../\"\nARTWORK_DIR=\"${PACKAGING_DIR}/../artwork/\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_DIRECTORY\" \"PACKAGING_DISPLAY_NAME\" \"PACKAGING_INSTALLER_NAME\" \"PACKAGING_COPY_CNC_DLL\" \"PACKAGING_COPY_D2K_DLL\" \\\n\t\"PACKAGING_WINDOWS_LAUNCHER_NAME\" \"PACKAGING_WINDOWS_REGISTRY_KEY\" \"PACKAGING_WINDOWS_INSTALL_DIR_NAME\" \\\n\t\"PACKAGING_WINDOWS_LICENSE_FILE\" \"PACKAGING_FAQ_URL\" \"PACKAGING_WEBSITE_URL\" \"PACKAGING_AUTHORS\" \"PACKAGING_OVERWRITE_MOD_VERSION\"\n\nTAG=\"$1\"\nif [ $# -eq \"1\" ]; then\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('.'))\")\nelse\n\tOUTPUTDIR=$(python3 -c \"import os; print(os.path.realpath('$2'))\")\nfi\n\nBUILTDIR=\"${PACKAGING_DIR}/build\"\n\n# Set the working dir to the location of this script\ncd \"${PACKAGING_DIR}\"\n\nif [ ! -f \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/Makefile\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\n. \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/packaging/functions.sh\"\n. \"${TEMPLATE_ROOT}/packaging/functions.sh\"\n\nif [ ! -d \"${OUTPUTDIR}\" ]; then\n\techo \"Output directory '${OUTPUTDIR}' does not exist.\";\n\texit 1\nfi\n\nif command -v curl >/dev/null 2>&1; then\n\tcurl -s -L -O https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe || exit 3\nelse\n\twget -cq https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe || exit 3\nfi\n\nfunction build_platform()\n{\n\tPLATFORM=\"${1}\"\n\tif [ \"${PLATFORM}\" = \"x86\" ]; then\n\t\tUSE_PROGRAMFILES32=\"-DUSE_PROGRAMFILES32=true\"\n\telse\n\t\tUSE_PROGRAMFILES32=\"\"\n\tfi\n\n\tif [ -n \"${PACKAGING_DISCORD_APPID}\" ]; then\n\t\tUSE_DISCORDID=\"-DUSE_DISCORDID=${PACKAGING_DISCORD_APPID}\"\n\telse\n\t\tUSE_DISCORDID=\"\"\n\tfi\n\n\techo \"Building core files (${PLATFORM})\"\n\tinstall_assemblies \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${BUILTDIR}\" \"win-${PLATFORM}\" \"net6\" \"False\" \"${PACKAGING_COPY_CNC_DLL}\" \"${PACKAGING_COPY_D2K_DLL}\"\n\tinstall_data \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${BUILTDIR}\"\n\n\tfor f in ${PACKAGING_COPY_ENGINE_FILES}; do\n\t\tmkdir -p \"${BUILTDIR}/$(dirname \"${f}\")\"\n\t\tcp -r \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}/${f}\" \"${BUILTDIR}/${f}\"\n\tdone\n\n\techo \"Building mod files (${PLATFORM})\"\n\tinstall_mod_assemblies \"${TEMPLATE_ROOT}\" \"${BUILTDIR}\" \"win-${PLATFORM}\" \"net6\" \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\"\n\n\tcp -Lr \"${TEMPLATE_ROOT}/mods/\"* \"${BUILTDIR}/mods\"\n\n\tset_engine_version \"${ENGINE_VERSION}\" \"${BUILTDIR}\"\n\tif [ \"${PACKAGING_OVERWRITE_MOD_VERSION}\" == \"True\" ]; then\n\t\tset_mod_version \"${TAG}\" \"${BUILTDIR}/mods/${MOD_ID}/mod.yaml\"\n\telse\n\t\tMOD_VERSION=$(grep 'Version:' \"mods/${MOD_ID}/mod.yaml\" | awk '{print $2}')\n\t\techo \"Mod version ${MOD_VERSION} will remain unchanged.\";\n\tfi\n\n\tTAG_TYPE=\"${TAG%%-*}\"\n\tTAG_VERSION=\"${TAG#*-}\"\n\tBACKWARDS_TAG=\"${TAG_VERSION}-${TAG_TYPE}\"\n\n\t# Create multi-resolution icon\n\tconvert \"${ARTWORK_DIR}/icon_16x16.png\" \"${ARTWORK_DIR}/icon_24x24.png\" \"${ARTWORK_DIR}/icon_32x32.png\" \"${ARTWORK_DIR}/icon_48x48.png\" \"${ARTWORK_DIR}/icon_256x256.png\" \"${BUILTDIR}/${MOD_ID}.ico\"\n\n\techo \"Compiling Windows launcher (${PLATFORM})\"\n\tinstall_windows_launcher \"${TEMPLATE_ROOT}/${ENGINE_DIRECTORY}\" \"${BUILTDIR}\" \"win-${PLATFORM}\" \"${MOD_ID}\" \"${PACKAGING_WINDOWS_LAUNCHER_NAME}\" \"${PACKAGING_DISPLAY_NAME}\" \"${PACKAGING_FAQ_URL}\" \"${TAG}\"\n\n\t# Use rcedit to patch the generated EXE with missing assembly/PortableExecutable information because .NET 6 ignores that when building on Linux.\n\t# Using a backwards version tag because rcedit is unable to set versions starting with a letter.\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-product-version \"${BACKWARDS_TAG}\"\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-version-string \"ProductName\" \"OpenRA\"\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-version-string \"CompanyName\" \"The OpenRA team\"\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-version-string \"FileDescription\" \"${PACKAGING_WINDOWS_LAUNCHER_NAME} mod for OpenRA\"\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-version-string \"LegalCopyright\" \"Copyright (c) The OpenRA Developers and Contributors\"\n\twine64 rcedit-x64.exe \"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe\" --set-icon \"${BUILTDIR}/${MOD_ID}.ico\"\n\n\techo \"Building Windows setup.exe (${PLATFORM})\"\n\tpushd \"${PACKAGING_DIR}\" > /dev/null\n\tmakensis -V2 -DSRCDIR=\"${BUILTDIR}\" -DTAG=\"${TAG}\" -DMOD_ID=\"${MOD_ID}\" -DPACKAGING_WINDOWS_INSTALL_DIR_NAME=\"${PACKAGING_WINDOWS_INSTALL_DIR_NAME}\" -DPACKAGING_WINDOWS_LAUNCHER_NAME=\"${PACKAGING_WINDOWS_LAUNCHER_NAME}\" -DPACKAGING_DISPLAY_NAME=\"${PACKAGING_DISPLAY_NAME}\" -DPACKAGING_WEBSITE_URL=\"${PACKAGING_WEBSITE_URL}\" -DPACKAGING_AUTHORS=\"${PACKAGING_AUTHORS}\" -DPACKAGING_WINDOWS_REGISTRY_KEY=\"${PACKAGING_WINDOWS_REGISTRY_KEY}\" -DPACKAGING_WINDOWS_LICENSE_FILE=\"${TEMPLATE_ROOT}/${PACKAGING_WINDOWS_LICENSE_FILE}\" -DOUTFILE=\"${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}-${PLATFORM}.exe\" ${USE_PROGRAMFILES32} ${USE_DISCORDID} buildpackage.nsi\n\tpopd > /dev/null\n\n\techo \"Packaging zip archive (${PLATFORM})\"\n\tpushd \"${BUILTDIR}\" > /dev/null\n\tzip \"${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}-${PLATFORM}-winportable.zip\" -r -9 ./* --quiet\n\tpopd > /dev/null\n\n\t# Cleanup\n\trm -rf \"${BUILTDIR}\"\n}\n\nbuild_platform \"x86\"\nbuild_platform \"x64\"\n"
  },
  {
    "path": "utility.cmd",
    "content": "@echo off\nsetlocal EnableDelayedExpansion\n\nFOR /F \"tokens=1,2 delims==\" %%A IN (mod.config) DO (set %%A=%%B)\nif exist user.config (FOR /F \"tokens=1,2 delims==\" %%A IN (user.config) DO (set %%A=%%B))\nset MOD_SEARCH_PATHS=%~dp0mods,./mods\nset ENGINE_DIR=..\nif \"!MOD_ID!\" == \"\" goto badconfig\nif \"!ENGINE_VERSION!\" == \"\" goto badconfig\nif \"!ENGINE_DIRECTORY!\" == \"\" goto badconfig\n\ntitle OpenRA.Utility.exe %MOD_ID%\n\nset TEMPLATE_DIR=%CD%\nif not exist %ENGINE_DIRECTORY%\\bin\\OpenRA.exe goto noengine\n>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\\VERSION || goto noengine\ncd %ENGINE_DIRECTORY%\n\nset argC=0\nfor %%x in (%*) do set /A argC+=1\n\nif %argC% == 0 goto choosemod\n\nif %argC% == 1 (\n    set MOD_ID=%1\n    goto loop\n)\n\nif %argC% GEQ 2 (\n    @REM This option is for use by other scripts so we don't want any extra output here - before or after.\n    call bin\\OpenRA.Utility.exe %*\n    EXIT /B 0\n)\n\n:choosemod\necho ----------------------------------------\necho.\ncall bin\\OpenRA.Utility.exe\necho Enter --exit to exit\nset /P mod=\"Please enter a modname: OpenRA.Utility.exe \"\nif /I \"%mod%\" EQU \"--exit\" (exit /b)\nset MOD_ID=%mod%\necho.\n\n:loop\necho.\necho ----------------------------------------\necho.\necho Enter a utility command or --exit to exit.\necho Press enter to view a list of valid utility commands.\necho.\n\nset /P command=\"Please enter a command: OpenRA.Utility.exe %MOD_ID% \"\nif /I \"%command%\" EQU \"--exit\" (cd %TEMPLATE_DIR% & exit /b)\necho.\necho ----------------------------------------\necho.\necho Starting OpenRA.Utility.exe %MOD_ID% %command%\ncall bin\\OpenRA.Utility.exe %MOD_ID% %command%\ngoto loop\n\n:noengine\necho Required engine files not found.\necho Run `make all` in the mod directory to fetch and build the required files, then try again.\npause\nexit /b\n\n:badconfig\necho Required mod.config variables are missing.\necho Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are\necho defined in your mod.config (or user.config) and try again.\npause\nexit /b\n"
  },
  {
    "path": "utility.sh",
    "content": "#!/bin/sh\n# Usage:\n#  $ ./utility.sh # Launch the OpenRA.Utility with the default mod\n#  $ Mod=\"<mod id>\" ./launch-utility.sh # Launch the OpenRA.Utility with a specific mod\n\nset -e\ncommand -v make >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires make.\"; exit 1; }\n\nif ! command -v mono >/dev/null 2>&1; then\n\tcommand -v dotnet >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires dotnet or mono.\"; exit 1; }\nfi\n\nif command -v python3 >/dev/null 2>&1; then\n\tPYTHON=\"python3\"\nelse\n\tcommand -v python >/dev/null 2>&1 || { echo >&2 \"The OpenRA mod SDK requires python.\"; exit 1; }\n\tPYTHON=\"python\"\nfi\n\nrequire_variables() {\n\tmissing=\"\"\n\tfor i in \"$@\"; do\n\t\teval check=\"\\$$i\"\n\t\t[ -z \"${check}\" ] && missing=\"${missing}   ${i}\\n\"\n\tdone\n\tif [ ! -z \"${missing}\" ]; then\n\t\techo \"Required mod.config variables are missing:\\n${missing}Repair your mod.config (or user.config) and try again.\"\n\t\texit 1\n\tfi\n}\n\nTEMPLATE_LAUNCHER=$(${PYTHON} -c \"import os; print(os.path.realpath('$0'))\")\nTEMPLATE_ROOT=$(dirname \"${TEMPLATE_LAUNCHER}\")\nMOD_SEARCH_PATHS=\"${TEMPLATE_ROOT}/mods,./mods\"\n\n# shellcheck source=mod.config\n. \"${TEMPLATE_ROOT}/mod.config\"\n\nif [ -f \"${TEMPLATE_ROOT}/user.config\" ]; then\n\t# shellcheck source=user.config\n\t. \"${TEMPLATE_ROOT}/user.config\"\nfi\n\nrequire_variables \"MOD_ID\" \"ENGINE_VERSION\" \"ENGINE_DIRECTORY\"\n\nLAUNCH_MOD=\"${Mod:-\"${MOD_ID}\"}\"\n\ncd \"${TEMPLATE_ROOT}\"\nif [ ! -f \"${ENGINE_DIRECTORY}/bin/OpenRA.Utility.dll\" ] || [ \"$(cat \"${ENGINE_DIRECTORY}/VERSION\")\" != \"${ENGINE_VERSION}\" ]; then\n\techo \"Required engine files not found.\"\n\techo \"Run \\`make\\` in the mod directory to fetch and build the required files, then try again.\";\n\texit 1\nfi\n\nif command -v mono >/dev/null 2>&1 && [ \"$(grep -c .NETCoreApp,Version= ${ENGINE_DIRECTORY}/bin/OpenRA.Utility.dll)\" = \"0\" ]; then\n\tRUNTIME_LAUNCHER=\"mono --debug\"\nelse\n\tRUNTIME_LAUNCHER=\"dotnet\"\nfi\n\ncd \"${ENGINE_DIRECTORY}\"\nMOD_SEARCH_PATHS=\"${MOD_SEARCH_PATHS}\" ENGINE_DIR=\"..\" ${RUNTIME_LAUNCHER} bin/OpenRA.Utility.dll \"${LAUNCH_MOD}\" \"$@\"\n"
  }
]