Compare commits

..

2 commits

Author SHA1 Message Date
Ell
7767cd7f18 include harmony in the example mod 2022-03-09 16:26:16 +01:00
Ell
52d32fe822 0.20.0 2022-03-09 16:12:57 +01:00
2 changed files with 6 additions and 5 deletions

View file

@ -32,7 +32,7 @@ public class ExampleMod : Mod {
private UniformTextureAtlas customBottoms;
private UniformTextureAtlas uiTextures;
public override void AddGameContent(GameImpl game) {
public override void AddGameContent(GameImpl game, ModInfo info) {
// adding a custom furniture item
FurnitureType.Register(new FurnitureType.TypeSettings("ExampleMod.CustomTable", new Point(1, 1), ObjectCategory.Table, 150, ColorScheme.SimpleWood) {
// specify the type that should be constructed when this furniture type is placed
@ -93,7 +93,7 @@ public class ExampleMod : Mod {
new EmotionModifier("ExampleMod.GrassSitting", this.uiTextures[1, 0], EmotionType.Happy));
}
public override void Initialize(Logger logger, RawContentManager content, RuntimeTexturePacker texturePacker) {
public override void Initialize(Logger logger, RawContentManager content, RuntimeTexturePacker texturePacker, ModInfo info) {
Logger = logger;
// loads a texture atlas with the given amount of separate texture regions in the x and y axes
@ -104,7 +104,7 @@ public class ExampleMod : Mod {
texturePacker.Add(content.Load<Texture2D>("UiTextures"), r => this.uiTextures = new UniformTextureAtlas(r, 8, 8));
}
public override IEnumerable<string> GetCustomFurnitureTextures() {
public override IEnumerable<string> GetCustomFurnitureTextures(ModInfo info) {
// tell the game about our custom furniture texture
// this needs to be a path to a data texture atlas, relative to our "Content" directory
// the texture atlas combines the png texture and the .atlas information

View file

@ -5,9 +5,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TinyLifeApi" Version="0.19.1" />
<PackageReference Include="TinyLifeApi" Version="0.20.0" />
<PackageReference Include="ExtremelySimpleLogger" Version="1.2.4" />
<PackageReference Include="ExtremelySimpleLogger" Version="1.2.5" />
<PackageReference Include="Lib.Harmony" Version="2.2.0" />
<PackageReference Include="MLEM.Data" Version="5.2.0" />
<PackageReference Include="MLEM.Extended" Version="5.2.0" />
<PackageReference Include="MLEM.Startup" Version="5.2.0" />