Skip to content

Commit d27ad4d

Browse files
committed
Init
0 parents  commit d27ad4d

File tree

1,804 files changed

+29836
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,804 files changed

+29836
-0
lines changed

.addon

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"Title": "TTT",
3+
"Type": "game",
4+
"Org": "matt",
5+
"Ident": "ttt",
6+
"Schema": 1,
7+
"HasAssets": true,
8+
"AssetsPath": "",
9+
"ResourcePaths": [
10+
"/ui/*",
11+
"/assets/*"
12+
],
13+
"HasCode": true,
14+
"CodePath": "code",
15+
"RootNamespace": "TTT"
16+
}

.editorconfig

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Remove the line below if you want to inherit .editorconfig settings from higher directories
2+
root = true
3+
4+
# C# files
5+
[*.cs]
6+
indent_style = tab
7+
indent_size = tab
8+
tab_size = 4
9+
10+
# New line preferences
11+
end_of_line = crlf
12+
insert_final_newline = true
13+
14+
15+
#### C# Coding Conventions ####
16+
17+
# Expression-bodied members
18+
csharp_style_expression_bodied_accessors = true:silent
19+
csharp_style_expression_bodied_constructors = false:silent
20+
csharp_style_expression_bodied_indexers = true:silent
21+
csharp_style_expression_bodied_lambdas = true:silent
22+
csharp_style_expression_bodied_local_functions = false:silent
23+
csharp_style_expression_bodied_methods = false:silent
24+
csharp_style_expression_bodied_operators = false:silent
25+
csharp_style_expression_bodied_properties = true:silent
26+
csharp_style_namespace_declarations = file_scoped:warning
27+
28+
# Pattern matching preferences
29+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
30+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
31+
csharp_style_prefer_not_pattern = true:suggestion
32+
csharp_style_prefer_pattern_matching = true:silent
33+
csharp_style_prefer_switch_expression = true:suggestion
34+
35+
# Null-checking preferences
36+
csharp_style_conditional_delegate_call = true:suggestion
37+
38+
# Code-block preferences
39+
csharp_prefer_braces = true:silent
40+
41+
# Expression-level preferences
42+
csharp_prefer_simple_default_expression = true:suggestion
43+
csharp_style_deconstructed_variable_declaration = true:suggestion
44+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
45+
csharp_style_inlined_variable_declaration = true:suggestion
46+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
47+
csharp_style_prefer_index_operator = true:suggestion
48+
csharp_style_prefer_range_operator = true:suggestion
49+
csharp_style_throw_expression = true:suggestion
50+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
51+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
52+
53+
# 'using' directive preferences
54+
csharp_using_directive_placement = outside_namespace:silent
55+
56+
#### C# Formatting Rules ####
57+
58+
# New line preferences
59+
csharp_new_line_before_catch = true
60+
csharp_new_line_before_else = true
61+
csharp_new_line_before_finally = true
62+
csharp_new_line_before_members_in_anonymous_types = true
63+
csharp_new_line_before_members_in_object_initializers = true
64+
csharp_new_line_before_open_brace = all
65+
csharp_new_line_between_query_expression_clauses = true
66+
67+
# Indentation preferences
68+
csharp_indent_block_contents = true
69+
csharp_indent_braces = false
70+
csharp_indent_case_contents = true
71+
csharp_indent_case_contents_when_block = false
72+
csharp_indent_labels = no_change
73+
csharp_indent_switch_labels = true
74+
75+
# Space preferences
76+
csharp_space_after_cast = false
77+
csharp_space_after_colon_in_inheritance_clause = true
78+
csharp_space_after_comma = true
79+
csharp_space_after_dot = false
80+
csharp_space_after_keywords_in_control_flow_statements = true
81+
csharp_space_after_semicolon_in_for_statement = true
82+
csharp_space_around_binary_operators = before_and_after
83+
csharp_space_around_declaration_statements = false
84+
csharp_space_before_colon_in_inheritance_clause = true
85+
csharp_space_before_comma = false
86+
csharp_space_before_dot = false
87+
csharp_space_before_open_square_brackets = false
88+
csharp_space_before_semicolon_in_for_statement = false
89+
csharp_space_between_empty_square_brackets = false
90+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
91+
csharp_space_between_method_call_name_and_opening_parenthesis = false
92+
csharp_space_between_method_call_parameter_list_parentheses = true
93+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
94+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
95+
csharp_space_between_method_declaration_parameter_list_parentheses = true
96+
csharp_space_between_parentheses = control_flow_statements
97+
csharp_space_between_square_brackets = false
98+
99+
# Wrapping preferences
100+
csharp_preserve_single_line_blocks = true
101+
csharp_preserve_single_line_statements = true

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto eol=lf
3+
4+
# Force bash scripts to always use lf line endings so that if a repo is accessed
5+
# in Unix via a file share from Windows, the scripts will work.
6+
*.in text eol=lf
7+
*.sh text eol=lf
8+
9+
# Likewise, force cmd and batch scripts to always use crlf
10+
*.cmd text eol=crlf
11+
*.bat text eol=crlf
12+
13+
*.cs text=auto diff=csharp

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# s&box related
2+
code/*.csproj
3+
code/obj
4+
code/Properties
5+
.intermediate
6+
_bakeresourcecache
7+
tools_asset_info.bin
8+
tools_thumbnail_cache.bin
9+
*.los
10+
11+
# Uncompiled models/sounds/textures
12+
*.vanmgrph
13+
*.vmdl
14+
*.vmat
15+
*.sound
16+
*.wav
17+
*.mp3
18+
*.dmx
19+
*.fbx
20+
*.vtx
21+
*.vvd
22+
*.mdl
23+
*.tga
24+
*.phy
25+
weapons/**/*.png
26+
materials/**/*.png
27+
models/**/*.png
28+
29+
# vscode
30+
.vscode
31+
*/.vs/*

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<h1><img src="ui/ttt-logo.png" alt="TTT logo" height="200"/></h1>
2+
3+
## Contributing to TTT
4+
5+
## Table of contents
6+
7+
- [Creating Issues](#creating-issues)
8+
- [Creating Pull Requests](#creating-pull-requests)
9+
- [Continuous Integration](#continuous-integration)
10+
- [Communication](#communication)
11+
12+
## Creating Issues
13+
14+
Before creating an issue, check [open issues](https://github.com/mzegar/sbox-TTT/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) to see if someone has already reported it. If that's the case, feel free to add additional information to it. You can also use GitHub's 'subscribe' feature to get notified on updates.
15+
16+
If you have found a new issue we'd like to hear about it! Make sure to use the provided issue template to provide us with the necessary information so we can reproduce the issue.
17+
18+
Please make sure you only include non-private/non-sensitive information.
19+
20+
## Creating Pull Requests
21+
22+
No pull request is too small! Fixing typos, adding meaningful comments or documentation, fixing bugs, creating new features, ... everything is welcome.
23+
24+
Please keep in mind that we need to understand your changes before we can merge them, so be sure to express what goal you are trying to achieve and give your reasoning for it.
25+
26+
If you are familiar with coding and contributing on GitHub you can skip to [Adhere to Codestyle](#adhere-to-codestyle) otherwise please read on.
27+
28+
If you are only planning on working on a 'small' thing e.g. only changing something in a single file, you don't need to setup everything below. Simply go to the file you want to edit on GitHub and click the pencil icon in the top right. After you edited the file how you wanted simply open a new [pull request](https://github.com/mzegar/sbox-TTT/compare) with your changes.
29+
30+
### Setup your workspace
31+
32+
TTT being a gamemode for S&Box means it is a .NET application. Therefore you need to install the .NET SDK and a code editor / IDE of your choice.
33+
34+
Please refer to the [.NET Installation Instructions](https://docs.microsoft.com/en-us/dotnet/core/install/) on how to install the SDK on your operating system.
35+
36+
If you don't already have an IDE or code editor in mind: [Visual Studio (IDE)](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio) or [Visual Studio Code (code editor)](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code) are relatively safe choices.
37+
38+
#### Adhere to Codestyle
39+
40+
We use the `.editorconfig` file to document our codestyle as is endorsed by Microsoft for .NET applications.
41+
Most IDEs will pick up the editorconfig automatically and act accordingly. For simple code editors you might want to check out their documentation on how use the editorconfig. For example if you happen to use VSCode simply install the 'EditorConfig for VS Code
42+
' Extension and you should be set.
43+
44+
##### (optionally) Install and use tools
45+
46+
If you want to make sure you adhere to our codestyle you can run the following .NET commands in the repository's root directory.
47+
You don't have to use these as our [continuous integration](#continuous-integration) will inform you about problems as soon as you submit your pull request.
48+
49+
Install `dotnet-format` tooling:
50+
51+
```shell
52+
dotnet tool install -g dotnet-format
53+
```
54+
55+
Use `dotnet-format` for linting only:
56+
57+
```shell
58+
dotnet-format --check -f code
59+
```
60+
61+
Use `dotnet-format` to automatically format your `.cs` files:
62+
63+
```shell
64+
dotnet-format -f code
65+
```
66+
67+
## Continuous Integration
68+
69+
As of now our continuous integration only enforces codestyle. If you submit a pull request it will check for errors and create GitHub annotations in places where your code needs fixing.
70+
Refer to [Adhere to Codestyle](#adhere-to-codestyle) for more information.
71+

0 commit comments

Comments
 (0)