diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..967a14f --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "1.1.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index ae3bae0..0069e31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,8 @@ -############### -# folder # -############### /**/DROP/ /**/TEMP/ /**/packages/ /**/bin/ /**/obj/ _site -api \ No newline at end of file +api +tools \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..8c120b6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,15 @@ +pipeline { + agent any + stages { + stage('Document') { + when { + branch 'release' + } + steps { + sh 'dotnet tool restore' + sh 'dotnet cake' + sh 'cp _site/** /var/www/tinylifedocs/ -r' + } + } + } +} \ No newline at end of file diff --git a/articles/mod_basics.md b/articles/mod_basics.md index 166c2b8..b19c59e 100644 --- a/articles/mod_basics.md +++ b/articles/mod_basics.md @@ -4,7 +4,7 @@ This page sums up a few of the basics that you'll need to know if you want to ma ## Creating mods To create a mod, all you have to do is create a repository [from this template](https://github.com/Ellpeck/TinyLifeExampleMod/generate) and open the project contained in it using Visual Studio, Rider or any other kind of C# IDE. The code that is already there contains some examples. Once you're done checking them out, you can just delete them and start fresh. -This repository also contains a little `Run` script for [windows](./Run.bat) and [linux and mac](./Run.sh) that automatically builds your mod, copies it into the `Mods` directory of your Tiny Life instance and runs the game. Note that the script will only work correctly if you've previously launched Tiny Life manually. +The template repository also contains a little `Run` script for [windows](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/Run.bat) and [linux and mac](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/Run.sh) that automatically builds your mod, copies it into the `Mods` directory of your Tiny Life instance and runs the game. Note that the script will only work correctly if you've previously launched Tiny Life manually. The game's API is **fully documented**. The documentation is easily accessible by opening any of the API's files in your IDE. The most updated version can be found on [the wiki](https://github.com/Ellpeck/TinyLifeExampleMod/wiki) as well. @@ -22,4 +22,4 @@ The NuGet package for the Tiny Life API just contains a [reference assembly](htt Technically, you can [download the game](https://tinylifegame.com/) and then decompile it to see the implementation's code, but due to its license, copying it is not allowed. ## Dependency version history -Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to this repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions. \ No newline at end of file +Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to the template repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions. \ No newline at end of file diff --git a/build.cake b/build.cake new file mode 100644 index 0000000..dd2f486 --- /dev/null +++ b/build.cake @@ -0,0 +1,10 @@ +#addin Cake.DocFx&version=1.0.0 +#tool docfx.console&version=2.51.0 + +var target = Argument("target", "Document"); +Task("Document").Does(() => { + var path = "docfx.json"; + DocFxMetadata(path); + DocFxBuild(path); +}); +RunTarget(target); \ No newline at end of file