Merge pull request #86 from oiltanker/master
added RunConfig cs documentation
This commit is contained in:
@@ -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
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
if not exist ".\build" mkdir ".\build"
|
||||||
|
|
||||||
|
echo Building shared documentation
|
||||||
|
doxygen Doxyfile
|
||||||
@@ -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 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
|
- 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***
|
- 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)
|
- 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
|
- 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:
|
A generic C# mod boilerplate:
|
||||||
|
|
||||||
File-tree:
|
File-tree:
|
||||||
|
|
||||||
```
|
```
|
||||||
<mod_root>/
|
<mod_root>/
|
||||||
├─ CSharp/
|
├─ CSharp/
|
||||||
|
│ ├─ RunConfig.xml
|
||||||
│ ├─ Shared/ExampleMod.cs
|
│ ├─ Shared/ExampleMod.cs
|
||||||
│ ├─ Server/ExampleMod.cs
|
│ ├─ Server/ExampleMod.cs
|
||||||
│ └─ Client/ExampleMod.cs
|
│ └─ Client/ExampleMod.cs
|
||||||
└─ dummyitem.xml
|
└─ 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`
|
`<mod_root>/CSharp/Shared/ExampleMod.cs`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user