From 45c21080c501d64ab46b2b8252e859a9c542c58a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 25 Jun 2021 23:40:01 +0200 Subject: [PATCH] added some more clothes to the example mod --- Content/ExampleMod/CustomBottomsShoes.png | Bin 0 -> 1439 bytes Content/ExampleMod/CustomHairs.png | Bin 0 -> 1184 bytes .../{CustomClothes.png => CustomTops.png} | Bin Content/ExampleMod/Localization/En.json | 5 ++++- ExampleMod.cs | 14 +++++++++++--- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 Content/ExampleMod/CustomBottomsShoes.png create mode 100644 Content/ExampleMod/CustomHairs.png rename Content/ExampleMod/{CustomClothes.png => CustomTops.png} (100%) diff --git a/Content/ExampleMod/CustomBottomsShoes.png b/Content/ExampleMod/CustomBottomsShoes.png new file mode 100644 index 0000000000000000000000000000000000000000..1fe53cb82ff696008669f7f83fc7466a044c1e50 GIT binary patch literal 1439 zcmZ8hc~BB~6#ik}rFM%9I>bTv9;ZdoCDYlv#D(bGQsfl=jRswFLt65s>k)#z` z-kM+@d92sspn0qWDJm$sd4}Kti&x;Xvwt+(n|bg1-ap^W_uiZL;5rhnrTLvE06+_I z)y`Fc35sl2S5?%$pxY%1fJD2(FN3N-_2vOkK_Toe-H3ZG9J7k5fbC6QZaWprNK^9+ zK_zsd>z^Eodod32j_9I+(HlX$1`X_QtLIazfJO?{=A~bBT7ZUyr8?|Wv;jmR`!y2a zv^9=e#KZFPP{WWqFIk+;fVfob&cO-7DM(`kE2!qc;P^%g#?RedaJYG|wLFKcP5BU7 z=lXK?A#7mZ*#s!Egk3}kKJGedd`|Ayx4Z|qq=UF9<@U^D;H4g9X-b|r&Rbl4V<5yg z+Xvt4&XU^yP@540)34(Sb>;X4IY&@uFfWr4Cb3{ENt}gwVN-+#Dq|3)H#+jsXook-9y1g08pogUqkoi&qQuQ( z;fj%q_?oEU6|o5KbXcAl9h#P3jhPLmu;9mmK}d`5R%zuVHa1etyw<8ywet4Gr-zS2 zAyXti63U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! z2+xZz=btpL^^=cW&Sw$d?3Q_uN;CM&mglnIrFrkRUc3mtfA+u{`2m`!h8J%mx1`6u6{1-oD!M "This is the example mod for Tiny Life!"; public override TextureRegion Icon => this.uiTextures[0, 0]; - private UniformTextureAtlas customClothes; + private UniformTextureAtlas customTops; + private UniformTextureAtlas customHairs; + private UniformTextureAtlas customBottoms; private UniformTextureAtlas uiTextures; public override void AddGameContent(GameImpl game) { @@ -40,11 +42,15 @@ namespace ExampleMod { // adding custom clothing var darkShirt = 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.customTops[0, 0], // the top left in-world region (the rest will be auto-gathered from the atlas) 100, // the price ClothesIntention.Everyday | ClothesIntention.Workout, // the clothes item's use cases this.Icon, false, ColorScheme.WarmDark); Clothes.Register(darkShirt); + // adding some more custom clothing + Clothes.Register(new Clothes("ExampleMod.PastelPants", ClothesLayer.Pants, this.customBottoms[4, 0], 100, ClothesIntention.Everyday, this.Icon, false, ColorScheme.Pastel)); + Clothes.Register(new Clothes("ExampleMod.PastelShoes", ClothesLayer.Shoes, this.customBottoms[0, 0], 100, ClothesIntention.Everyday, this.Icon, false, ColorScheme.Pastel)); + Clothes.Register(new Clothes("ExampleMod.WeirdHair", ClothesLayer.Hair, this.customHairs[0, 0], 0, ClothesIntention.None, this.Icon, false, ColorScheme.Modern)); // adding an event subscription to people MapObject.OnEventsAttachable += o => { @@ -79,7 +85,9 @@ namespace ExampleMod { // 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, 8)); + texturePacker.Add(content.Load("CustomTops"), r => this.customTops = new UniformTextureAtlas(r, 4, 8)); + texturePacker.Add(content.Load("CustomHairs"), r => this.customHairs = new UniformTextureAtlas(r, 4, 6)); + texturePacker.Add(content.Load("CustomBottomsShoes"), r => this.customBottoms = new UniformTextureAtlas(r, 8, 6)); texturePacker.Add(content.Load("UiTextures"), r => this.uiTextures = new UniformTextureAtlas(r, 8, 8)); }