Merge pull request #86 from oiltanker/master

added RunConfig cs documentation
This commit is contained in:
Evil Factory
2022-05-13 21:26:22 -03:00
committed by GitHub
3 changed files with 35 additions and 0 deletions

16
doxygen/build-docs.bat Normal file
View File

@@ -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

5
doxygen/build-shared.bat Normal file
View File

@@ -0,0 +1,5 @@
@echo off
if not exist ".\build" mkdir ".\build"
echo Building shared documentation
doxygen Doxyfile

View File

@@ -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 `<mod_root>/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:
```
<mod_root>/
├─ CSharp/
│ ├─ RunConfig.xml
│ ├─ Shared/ExampleMod.cs
│ ├─ Server/ExampleMod.cs
│ └─ Client/ExampleMod.cs
└─ dummyitem.xml
```
____
`<mod_root>/CSharp/RunConfig.xml`
```xml
<?xml version="1.0" encoding="utf-8"?>
<RunConfig>
<Server>Standard</Server>
<Client>Forced</Client>
</RunConfig>
```
____
`<mod_root>/CSharp/Shared/ExampleMod.cs`