From 69d4b2c3556ee254e953042c6497acbd85884891 Mon Sep 17 00:00:00 2001 From: Oiltanker Date: Sat, 14 May 2022 02:54:30 +0300 Subject: [PATCH] added RunConfig cs documentation --- doxygen/build-docs.bat | 16 ++++++++++++++++ doxygen/build-shared.bat | 5 +++++ doxygen/intro.md | 14 ++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 doxygen/build-docs.bat create mode 100644 doxygen/build-shared.bat diff --git a/doxygen/build-docs.bat b/doxygen/build-docs.bat new file mode 100644 index 000000000..959a3bcf9 --- /dev/null +++ b/doxygen/build-docs.bat @@ -0,0 +1,16 @@ +@echo off +if not exist ".\build" mkdir ".\build" +if not exist ".\build\baro-server" mkdir ".\build\baro-server" +if not exist ".\build\baro-client" mkdir ".\build\baro-client" + +cd .\baro-server +echo Building server documentation +doxygen Doxyfile + +cd ..\baro-client +echo Building client documentation +doxygen Doxyfile + +cd .. +echo Building shared documentation +doxygen Doxyfile \ No newline at end of file diff --git a/doxygen/build-shared.bat b/doxygen/build-shared.bat new file mode 100644 index 000000000..7023da7f2 --- /dev/null +++ b/doxygen/build-shared.bat @@ -0,0 +1,5 @@ +@echo off +if not exist ".\build" mkdir ".\build" + +echo Building shared documentation +doxygen Doxyfile \ No newline at end of file diff --git a/doxygen/intro.md b/doxygen/intro.md index 1d2d32f1e..521f4114c 100644 --- a/doxygen/intro.md +++ b/doxygen/intro.md @@ -15,6 +15,7 @@ The main star of the show is Barotrauma::ACsMod class. It is what **all** your m - All utility classes can be accessed either by their type (i.e that have name that starts with `LuaCs...`) or through `GameMain.LuaCs` property (refer to [class documentation](#ltcd)). - All C# code files must be located in `/CSharp/*` otherwise they won't be compiled +- To configure **server / client** execution behaviour create `RunConfig.xml` in `CSharp` directory, like is shown below (run types are `Standard`, `Forced` and `None`) - Additionally you can specify what code runs where by either ***filepath*** or ***pre-processor statements*** - In case of filepath, your files must be located in either `CSharp/Shared/*`, `CSharp/Server/*` or `CSharp/Client/*`, for *shared* code, *server-side* code or *client-side* code respectively (in any other case, the code is assumed to be shared) - I case of pre-processor, you can use `SERVER` or `CLIENT` definitions to separate code into *server-side* code and *client-side* code respectively @@ -27,15 +28,28 @@ The main star of the show is Barotrauma::ACsMod class. It is what **all** your m A generic C# mod boilerplate: File-tree: + ``` / ├─ CSharp/ + │ ├─ RunConfig.xml │ ├─ Shared/ExampleMod.cs │ ├─ Server/ExampleMod.cs │ └─ Client/ExampleMod.cs └─ dummyitem.xml ``` +____ +`/CSharp/RunConfig.xml` + +```xml + + + Standard + Forced + +``` + ____ `/CSharp/Shared/ExampleMod.cs`