From 4582c0dd6efbda49ebe91abcfe7745426db9a8ac Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2021 22:28:56 +0100 Subject: [PATCH] update to 0.5.0 --- Content/ExampleMod/CustomClothesIcons.png | Bin 468 -> 0 bytes ExampleMod.cs | 5 +---- ExampleMod.csproj | 2 +- README.md | 19 +------------------ Run.sh | 4 ++-- 5 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 Content/ExampleMod/CustomClothesIcons.png diff --git a/Content/ExampleMod/CustomClothesIcons.png b/Content/ExampleMod/CustomClothesIcons.png deleted file mode 100644 index 0cc2152ae5d3acb1f06bbb38c44c37faa5864c67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 468 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kz5&}i(^Q| zoVV8v`3@QIFgP@KZ2F@5_kZ-CNqV7eMuAhsBvx{i2j^%`5|1up0c!rR-KhBFnWwQl zUmkAqPkCm< "This is the example mod for Tiny Life!"; private UniformTextureAtlas customClothes; - private UniformTextureAtlas customClothesIcons; public override void AddGameContent(GameImpl game) { // adding a custom furniture item @@ -32,17 +31,15 @@ namespace ExampleMod { // adding custom clothing Clothes.Register(new Clothes("ExampleMod.DarkShirt", ClothesLayer.Shirt, this.customClothes[0, 0], // the top left in-world region (the rest will be auto-gathered from the atlas) - this.customClothesIcons[0, 0], // the region to use for the icon in the character editor ColorScheme.WarmDark)); } public override void Initialize(Logger logger, RawContentManager content, RuntimeTexturePacker texturePacker) { Logger = logger; - + // loads a texture atlas with the given amount of separate texture regions in the x and y axes // we submit it to the texture packer to increase rendering performance. The callback is invoked once packing is completed texturePacker.Add(content.Load("CustomClothes"), r => this.customClothes = new UniformTextureAtlas(r, 4, 6)); - texturePacker.Add(content.Load("CustomClothesIcons"), r => this.customClothesIcons = new UniformTextureAtlas(r, 16, 16)); } public override IEnumerable GetCustomFurnitureTextures() { diff --git a/ExampleMod.csproj b/ExampleMod.csproj index 65142b0..053a454 100644 --- a/ExampleMod.csproj +++ b/ExampleMod.csproj @@ -5,7 +5,7 @@ - + diff --git a/README.md b/README.md index 6f815db..3cf207d 100644 --- a/README.md +++ b/README.md @@ -34,21 +34,4 @@ The NuGet package for the Tiny Life API just contains a [reference assembly](htt Technically, you can download the game [from itch](https://ellpeck.itch.io/tiny-life) 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. The following is a list of versions of Tiny Life and the appropriate dependency versions that the mod should be compiled against to work for that version. When updating your mod, you can just copy the appropriate part [into your project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj#L10-L15). -```xml - - - - - - - - - - - - - - - -``` \ 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 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 diff --git a/Run.sh b/Run.sh index 7606eb6..31b5dc1 100644 --- a/Run.sh +++ b/Run.sh @@ -1,12 +1,12 @@ #!/bin/bash GAME_DIR="path/to/Tiny Life" +# move to the script directory +cd "$(dirname "$0")" # build the mod dotnet build - # copy the mod to the mods folder cp ./bin/Debug/netcoreapp3.0/* "$LOCALAPPDATA/Tiny Life/Mods" -r - # run the game cd "$GAME_DIR" "./Tiny Life.exe" \ No newline at end of file