-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
188 changed files
with
1,047 additions
and
1,113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = crlf | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Microsoft .NET properties | ||
csharp_new_line_before_members_in_object_initializers = false | ||
csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion | ||
csharp_space_after_cast = true | ||
|
||
# Always prefer 'var' if possible | ||
csharp_style_var_elsewhere = true:suggestion | ||
csharp_style_var_for_built_in_types = true:suggestion | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
|
||
# Enforce File-scoped namespace declaration | ||
[*.cs] | ||
csharp_style_namespace_declarations = file_scoped:error | ||
dotnet_diagnostic.IDE0161.severity = error | ||
|
||
# Constants style | ||
dotnet_naming_rule.constants_rule.severity = warning | ||
dotnet_naming_rule.constants_rule.style = pascal_case_style | ||
dotnet_naming_rule.constants_rule.symbols = constants_symbols | ||
dotnet_naming_rule.private_constants_rule.severity = warning | ||
dotnet_naming_rule.private_constants_rule.style = pascal_case_style | ||
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols | ||
|
||
# Private fields style | ||
dotnet_naming_rule.private_instance_fields_rule.severity = warning | ||
dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style_1 | ||
dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols | ||
|
||
# Private static fields style | ||
dotnet_naming_rule.private_static_fields_rule.severity = warning | ||
dotnet_naming_rule.private_static_fields_rule.style = lower_camel_case_style_1 | ||
dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols | ||
|
||
# Private static readonly fields style | ||
dotnet_naming_rule.private_static_readonly_rule.severity = warning | ||
dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style_1 | ||
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols | ||
|
||
# Public (static) fields style | ||
dotnet_naming_rule.public_fields_rule.severity = warning | ||
dotnet_naming_rule.public_fields_rule.style = lower_camel_case_style | ||
dotnet_naming_rule.public_fields_rule.symbols = public_fields_symbols | ||
dotnet_naming_rule.static_readonly_rule.severity = warning | ||
dotnet_naming_rule.static_readonly_rule.style = pascal_case_style | ||
dotnet_naming_rule.static_readonly_rule.symbols = static_readonly_symbols | ||
|
||
# Unity's serialized fields rule | ||
dotnet_naming_rule.unity_serialized_field_rule.severity = warning | ||
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style_1 | ||
dotnet_naming_rule.unity_serialized_field_rule.symbols = private_static_fields_symbols | ||
|
||
# camelCase rule | ||
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case | ||
|
||
# PascalCase rule | ||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
|
||
# Private fields rule (_camelCase) | ||
dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case | ||
dotnet_naming_style.lower_camel_case_style_1.required_prefix = _ | ||
|
||
# Public constants symbols | ||
dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected | ||
dotnet_naming_symbols.constants_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.constants_symbols.required_modifiers = const | ||
|
||
# Private constants symbols | ||
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private | ||
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const | ||
|
||
# Private fields symbols | ||
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private | ||
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private | ||
|
||
# Private static fields symbols | ||
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static | ||
|
||
# Private static readonly symbols | ||
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private | ||
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly | ||
|
||
# Public fields symbols | ||
dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities = public | ||
dotnet_naming_symbols.public_fields_symbols.applicable_kinds = field | ||
|
||
# Non-public static readonly fields symbols | ||
dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected | ||
dotnet_naming_symbols.static_readonly_symbols.applicable_kinds = field | ||
dotnet_naming_symbols.static_readonly_symbols.required_modifiers = static,readonly | ||
|
||
# Avoid binary operators | ||
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none | ||
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none | ||
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none | ||
|
||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion | ||
dotnet_style_predefined_type_for_member_access = true:suggestion | ||
|
||
# Avoid 'this.' if unnecessary | ||
dotnet_style_qualification_for_event = false:suggestion | ||
dotnet_style_qualification_for_field = false:suggestion | ||
dotnet_style_qualification_for_method = false:suggestion | ||
dotnet_style_qualification_for_property = false:suggestion | ||
|
||
# Prefer explicit access modifiers | ||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion | ||
|
||
# ReSharper properties | ||
resharper_autodetect_indent_settings = true | ||
resharper_indent_preprocessor_directives = normal | ||
resharper_space_within_single_line_array_initializer_braces = false | ||
resharper_use_indent_from_vs = false | ||
|
||
# ReSharper inspection severities | ||
resharper_arrange_redundant_parentheses_highlighting = hint | ||
resharper_arrange_this_qualifier_highlighting = hint | ||
resharper_arrange_type_member_modifiers_highlighting = hint | ||
resharper_arrange_type_modifiers_highlighting = hint | ||
resharper_built_in_type_reference_style_for_member_access_highlighting = hint | ||
resharper_built_in_type_reference_style_highlighting = hint | ||
resharper_redundant_base_qualifier_highlighting = warning | ||
resharper_suggest_var_or_type_built_in_types_highlighting = hint | ||
resharper_suggest_var_or_type_elsewhere_highlighting = hint | ||
resharper_suggest_var_or_type_simple_types_highlighting = hint | ||
resharper_web_config_module_not_resolved_highlighting = warning | ||
resharper_web_config_type_not_resolved_highlighting = warning | ||
resharper_web_config_wrong_module_highlighting = warning | ||
|
||
[{*.har,*.inputactions,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,paml,razor,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}] | ||
indent_style = space | ||
indent_size = 4 | ||
tab_width = 4 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Contributing | ||
|
||
## Preferred conventions and code style | ||
* For commiting, we encourage [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). | ||
* We encourage [access modifiers](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers) to be specified explicitly with no exceptions. | ||
* Keep access modifiers as strict as possible (E.G: Do not default everything to `public` when they're not meant for public access). | ||
* Unity messages (Awake, Start, Update etc..) should always be `private`. | ||
* Remove unused `using` statements. Many IDEs offer shortcuts to perform this action. | ||
* For namespaces, use [File Scoped Namespaces](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces). | ||
|
||
## Setup | ||
1. Download and install [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) | ||
2. Fork & clone the repository | ||
3. Open the solution (.sln) file with your favorite IDE | ||
4. Restore the dependencies by performing a NuGet restore via your IDE or by simply executing `dotnet restore` in a terminal | ||
5. Make your changes, then submit a pull request. | ||
|
||
## Submitting a Pull Request | ||
We expect submitted PRs to be functional and thoroughly tested in the game. Please make sure of the following: | ||
* Your changes do not break existing mods. Be it in a new world/save, or existing ones | ||
* Follow our [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md) | ||
* Run code refactoring automations to match our [preferred styles](#preferred-conventions-and-code-style). | ||
|
||
If you are new to pull requests, read through [GitHub's Guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). | ||
|
||
## Docs Contribution | ||
If you're looking to contribute to the [docs](https://subnauticamodding.github.io/Nautilus), refer to our [Docs Guidelines](Documentation/README.md). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.