commit 409d4d96ead69028a164274637d23e350acb73fb Merge: 95169f539 26e89c63d Author: EdusFF <pitkanen.eetu@gmail.com> Date: Mon Mar 11 15:13:27 2019 +0200 Merge branch 'dev' of github.com:Regalis11/Barotrauma into dev commit 95169f53937f9a7e168a884171eaa21ae7f08023 Author: EdusFF <pitkanen.eetu@gmail.com> Date: Mon Mar 11 15:13:11 2019 +0200 Modified: ServerMessage structure to allow _ ; in player & submarine names commit 26e89c63dc8da771aea9f09978a630a6cff60a6f Merge: b7646d06d fb0b821bc Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 14:42:44 2019 +0200 Merge branch 'kuraiookami-logicExpantion' into dev # Conflicts: # Barotrauma/BarotraumaShared/SharedContent.projitems commit fb0b821bc97891cdeec8f2c740a12119696393ea Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 14:41:21 2019 +0200 Use invariant culture when parsing floats or converting them to strings in signal components commit f0c8afba934b41358cf5d59a22b87caf33f98a61 Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 14:00:44 2019 +0200 Update new signal components to use identifiers & added names and descriptions to the text file, use invariant culture in equalscomponent, memorycomponent doesn't require the signals to be floats commit 674d9ec804fc4770b602d4b09240b08cafc8ccec Merge: 3ea33fb54 242e2429f Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 12:01:27 2019 +0200 Merge branch 'logicExpantion' of https://github.com/kuraiookami/Barotrauma into kuraiookami-logicExpantion # Conflicts: # Barotrauma/BarotraumaShared/BarotraumaShared.projitems # Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml # Barotrauma/BarotraumaShared/Content/Items/Electricity/signalitems.xml # Barotrauma/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs # Barotrauma/BarotraumaShared/Source/Items/Components/Signal/AdderComponent.cs commit b7646d06d53fb05227276e6286d0e15da5dc9080 Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 11:37:33 2019 +0200 Re-enabled multiplayer campaign commit cf7258f6410a5995c881ec6e95eb9def5cd90ad4 Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 11:28:48 2019 +0200 Fixed item interfaces getting repositioned every frame when the editing HUD is open. Closes #1212 commit e8906239c779cf71de694bc65c81058e5cae16ef Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Mon Mar 11 11:12:05 2019 +0200 Fixed VoipCapture creating new "could not start voice capture" popups constantly if there's no suitable capture device. Closes #1262 commit a30f47fbe47fde4fccb0453c1773a76d730d226b Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Sun Mar 10 19:04:59 2019 +0200 Disable audio instead of crashing if no audio device is found. Closes #1214 commit 242e2429fd2c3ed199ac26b55e2cbdc8636e73f9 Author: Darkwolf <Darkwolf0101@gmail.com> Date: Mon Jan 21 21:26:57 2019 -0600 Expansion of Barotrauma's logic system. Changed: - AdderComponent and children can clamp their output - Powercontainer signals for charge,charge% and charge rate Added: - ColorComponent: Dynamic signals for light set_color inputs - MemoryComponent: Stores and sends a signal that is edge latched - DivideComponent: Standard division - MultiplyComponent: Standard multiplication - SubtractComponent: Standard subtraction - XorComponent: Exclusive or - EqualsComponent: Equals comparison - GreaterComponent: Greater than comparison
4.9 KiB
Contributing
Welcome to Barotrauma's GitHub repository! If you're here to report an issue or to contribute to the development, please read the instructions below before you do.
I have a question!
Please check our FAQ in case the question has already been answered. If not, you can post the question on the Barotrauma discussion forum or stop by at our Discord Server.
Reporting a bug
If you've encountered a bug, you can report it in the issue tracker. Please follow the instructions in the issue template to make it easier for us to diagnose and fix the issue.
Code contributions
Before you start doing modifications to the code or submitting pull requests to the repository, it is important that you've read and understood (at least the human-readable summary part) of our EULA. To sum it up, Barotrauma is not an open source project in the sense of free, open source software that you can freely distribute or reuse. Even though the early versions of the game have been available for free, the game will eventually have a price tag. If you're not comfortable with your contributions potentially being used in a commercial product, do not submit pull requests to the repository.
Getting started
Windows
You need a version of Visual Studio that supports C# 6.0 to compile game. If you don't have a compatible version of Visual Studio installed, you can get Visual Studio Community 2017 from the following link: https://visualstudio.microsoft.com/downloads/
Make sure you select ".NET desktop development" during the install process to make sure you have the required features to work with Barotrauma.
Linux
All that is required to build Barotrauma on Linux is the mono-devel package that you can install by following the instructions on the following page: https://www.mono-project.com/download/stable/#download-lin
You may optionally install MonoDevelop to navigate and modify the solution.
Installing dependencies
We use NuGet to make the solution download most of the required libraries and dependencies automatically, but you also need to make sure you have the OpenAL audio library installed.
If you're on Windows, you can get OpenAL from the following link: https://www.openal.org/downloads/oalinst.zip
Modifying the source code
Barotrauma's source code is split up into three projects: ClientCode, Server and SharedCode. The non-code assets (i.e. textures, sound files, miscellaneous XML) are mainly found in the SharedContent project.
The client project includes the code only required by the client executable: graphics-related code, audio, particle effects and such. The server project includes logic that's only needed by the dedicated server executable. The shared project contains most of the gameplay, physics and networking logic and everything else that's needed by both the client executable and the dedicated server.
Building the game
Before building, you should choose the build configuration. The available configurations are DebugWindows, DebugMac, DebugLinux, ReleaseWindows, ReleaseMac and ReleaseLinux. Additionally, unless you want to work on the dedicated server, you may want to make sure WindowsClient, MacClient or LinuxClient are selected as the startup project.
The debug build configurations include some features that make debugging and testing a little easier: things such as additional console commands, being able to move the submarine with the IJKL keys and allowing clients to use any console command in multiplayer. The debug builds don't create crash reports when an unhandled exception occurs - the intention behind this is to allow exceptions to be caught by the debugger instead of having the game close and write a report.
To build through the command line (recommended if you're on Linux), use the following command:
msbuild Barotrauma_Solution.sln /property:Configuration=CONFIGURATION /property:Platform=x64
Programming guidelines
We (loosely) follow the C# naming and coding conventions recommended by Microsoft.
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions
Commit messages
We don't have a strict format for commit messages, but please try to make them informative - what did you change and why. It's also recommended that you reference any relevant commits and issue reports in the commit message. If you're fixing a bug caused by a specific commit, mention that commit ("the method added in a1b9b7z didn't take into account things A and B..."), or if you're fixing something that's listed in the issue tracker, mention that issue ("Fixes #123")