diff --git a/Content/ExampleMod/CustomClothesIcons.png b/Content/ExampleMod/CustomClothesIcons.png deleted file mode 100644 index 0cc2152..0000000 Binary files a/Content/ExampleMod/CustomClothesIcons.png and /dev/null differ diff --git a/ExampleMod.cs b/ExampleMod.cs index 9f738f7..aa363b7 100644 --- a/ExampleMod.cs +++ b/ExampleMod.cs @@ -21,7 +21,6 @@ namespace ExampleMod { public override string Description => "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