You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the basic [upstream conventions](https://docs.spacestation14.com/en/general-development/codebase-info/conventions.html), Ephemeral Space has a multitude of custom conventions meant to aid in maintainability and reduce merge conflicts.
3
+
```admonish warning
4
+
These documents have recently changed significantly as a result of our hardfork. Even if this doc looks the same to you, you should reread the conventions to ensure you understand the new conventions going forward.
5
+
```
6
+
7
+
In addition to the basic [upstream conventions](https://docs.spacestation14.com/en/general-development/codebase-info/conventions.html), Ephemeral Space has a multitude of custom conventions meant to aid in maintainability.
8
+
9
+
**Ephemeral Space is a hardfork of the upstream repository**. This means we have no qualms about editing or deleting upstream files en masse, and things which we have no use for are generally deleted from the repository entirely. We may occasionally cherrypick and backport commits, but we do not regularly merge in upstream, and we handle engine updates ourselves.
4
10
5
11
## General Conventions
6
12
7
13
### Mirrored Directories
8
14
9
-
When adding new files to the Ephemeral Space project, always include them under an "`_ES`" directory.
15
+
When adding *new* files to the Ephemeral Space project, always include them under an "`_ES`" directory.
10
16
Each project receives its own corresponding directory (`Content.Client/_ES/`, `Content.Shared/_ES/`, etc.) with the file structure of the `_ES` directory mirroring the folder it is in.
11
17
12
18
This is similarly done for each folder inside the `Resources` directory (`Resources/Prototypes/_ES`, `Resources/Textures/_ES`, etc.)
@@ -15,30 +21,15 @@ The goal of this is to organize specific Ephemeral Space contributions while mai
15
21
16
22
### Fork Markers
17
23
18
-
All modifications to non-_ES files should be enclosed with the `ES START` and `ES END` markers, denoting that the edits were made to the Ephemeral Space project.
19
-
20
-
When making modifications, prefer to limit their size and place markers around as little code as possible.
21
-
Ideally, all the lines within the markers should have been modified.
22
-
23
-
#### File Markers
24
-
25
-
When extensive modifications must be made to non-_ES files, prefer to create a header at the beginning of the file to denote the changes.
26
-
This helps anyone in the future to see that the entire file has been modified.
27
-
28
-
### Prefer Creating Over Editing
29
-
30
-
When faced with the option of editing an existing file or creating a new one, prefer creating new _ES-specific files.
31
-
Limiting the amount of modifications made is ideal for development.
24
+
All C# files that are modified should have an `ES MODIFIED` marker near the start of the file, along with a comment detailing the edits made. In other files, like YAML, no markers are required.
32
25
33
26
## C# Conventions
34
27
35
28
### Class Prefixes
36
29
37
-
All classes and structs should be prefixed with "ES".
30
+
All **data definitions** types (components, prototypes, anything else serializable) should be prefixed with "ES". Any other classes, like systems, do not need to be prefixed.
38
31
39
-
### Prototype Prefixes
40
-
41
-
Prototypes, like other classes, should be prefixed with "ES". The name must be explicitly specified in the `PrototypeAttribute` to prevent improper casing.
32
+
Prototype names must be explicitly specified in the `PrototypeAttribute` to prevent improper casing.
42
33
43
34
Bad:
44
35
```csharp
@@ -60,14 +51,14 @@ public sealed class ESTestCasePrototype : IPrototype
60
51
61
52
### ID Prefixes
62
53
63
-
AllprototypesshouldhavetheirID'sprefixedwith"ES".
54
+
WepreviouslyrequiredIDprefixinginYAML, but **itisnotaconventionanymore**. YAMLIDsfornewprototypesshouldnotbeprefixedwith `ES`. Pre-hardforkprototypesmaystillbeprefixedwith`ES`.
0 commit comments