mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-11-25 13:18:34 +01:00
Compare commits
No commits in common. "7767cd7f1830d1dd22c9c6e2a4326c9025b5f8fe" and "a40d08209b71d37240f7a5bf8338fd52bf02f9ac" have entirely different histories.
7767cd7f18
...
a40d08209b
2 changed files with 5 additions and 6 deletions
|
@ -32,7 +32,7 @@ public class ExampleMod : Mod {
|
||||||
private UniformTextureAtlas customBottoms;
|
private UniformTextureAtlas customBottoms;
|
||||||
private UniformTextureAtlas uiTextures;
|
private UniformTextureAtlas uiTextures;
|
||||||
|
|
||||||
public override void AddGameContent(GameImpl game, ModInfo info) {
|
public override void AddGameContent(GameImpl game) {
|
||||||
// adding a custom furniture item
|
// adding a custom furniture item
|
||||||
FurnitureType.Register(new FurnitureType.TypeSettings("ExampleMod.CustomTable", new Point(1, 1), ObjectCategory.Table, 150, ColorScheme.SimpleWood) {
|
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
|
// 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));
|
new EmotionModifier("ExampleMod.GrassSitting", this.uiTextures[1, 0], EmotionType.Happy));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize(Logger logger, RawContentManager content, RuntimeTexturePacker texturePacker, ModInfo info) {
|
public override void Initialize(Logger logger, RawContentManager content, RuntimeTexturePacker texturePacker) {
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
|
|
||||||
// loads a texture atlas with the given amount of separate texture regions in the x and y axes
|
// 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));
|
texturePacker.Add(content.Load<Texture2D>("UiTextures"), r => this.uiTextures = new UniformTextureAtlas(r, 8, 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IEnumerable<string> GetCustomFurnitureTextures(ModInfo info) {
|
public override IEnumerable<string> GetCustomFurnitureTextures() {
|
||||||
// tell the game about our custom furniture texture
|
// tell the game about our custom furniture texture
|
||||||
// this needs to be a path to a data texture atlas, relative to our "Content" directory
|
// 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
|
// the texture atlas combines the png texture and the .atlas information
|
||||||
|
|
|
@ -5,10 +5,9 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="TinyLifeApi" Version="0.20.0" />
|
<PackageReference Include="TinyLifeApi" Version="0.19.1" />
|
||||||
|
|
||||||
<PackageReference Include="ExtremelySimpleLogger" Version="1.2.5" />
|
<PackageReference Include="ExtremelySimpleLogger" Version="1.2.4" />
|
||||||
<PackageReference Include="Lib.Harmony" Version="2.2.0" />
|
|
||||||
<PackageReference Include="MLEM.Data" Version="5.2.0" />
|
<PackageReference Include="MLEM.Data" Version="5.2.0" />
|
||||||
<PackageReference Include="MLEM.Extended" Version="5.2.0" />
|
<PackageReference Include="MLEM.Extended" Version="5.2.0" />
|
||||||
<PackageReference Include="MLEM.Startup" Version="5.2.0" />
|
<PackageReference Include="MLEM.Startup" Version="5.2.0" />
|
||||||
|
|
Loading…
Reference in a new issue