-
Notifications
You must be signed in to change notification settings - Fork 85
Code style and naming
Dmytro Lytovchenko edited this page Apr 10, 2021
·
2 revisions
We are using spaces, not tabs. Tab width is 8. Indent is 4.
If an inconsistent naming is found, prefer project style, not file style.
- Use
CamelCase
for enums, classes and structs. - Use
CamelCase
namespaces.- Prefer full namespace paths where you refer to a type. It helps reading the code. For example
UI.Button
is better than justButton
because a similarly named type might exist elsewhere.
- Prefer full namespace paths where you refer to a type. It helps reading the code. For example
- Private fields
camelCase_
(lowercase camel with underscore) - All other fields
CamelCase
- Const values
UPPER_CASE
- Functions and get properties to start with
Get
,Is
, or another verb. - Other functions to start with a verb, indicating the action they do.
- Prefer explicit types over
var
, unless its obviousLongClassName c = new LongClassName()
is silly, in such case just use var. - Arguments and local variables are
camelCase
Red links are broken; this wiki is a work in progress
Getting Started (click to open)
Troubleshooting / Bugs (click to open)
- Hints Panel
- Road & Rail:
- Junctions:
- Despawning:
- Info Views:
- Roads/Tracks:
- Nodes, Segments, Lanes
- Collector Roads
- Dedicated Turning Lanes
- Enter Blocked Junctions
- High Priority Roads
- Highway Junction Rules
- Lane Changes
- Pedestrian Crossings
- Priority Routes
- Road Conditions
- Roundabouts
- Roundabout Policies
- Stay in Lane
- Turn on Red
- U-Turns
- Unprotected Turns
- Vehicle Restriction Aggression
- Public Transport:
- Vehicles:
Todo: