diff --git a/client/src/mods/Character.lua b/client/src/mods/Character.lua index 00b4a644..1b3c68a8 100644 --- a/client/src/mods/Character.lua +++ b/client/src/mods/Character.lua @@ -586,14 +586,14 @@ end ---@param height integer height in panels ---@return love.Texture function Character:createGarbageTexture(width, height) - -- pop and flash are verifiably "panel sized", technically filler and face should work too - local relativeScale = self.images.pop:getWidth() / 16 + -- filler and face are the "panel sized" counterparts in the garbage so they are valid sprites to determine relative size + local relativeScale = self.images.face:getWidth() / 16 -- create all canvases as if we were working with the 360x240 resolution but use the canvas dpi scale to use the real resolution -- that makes it easy to scale later as everything can be treated the same while love handles the dpi scale resolution for us - local dpiscale = self.images.pop:getDPIScale() * relativeScale + local dpiscale = self.images.face:getDPIScale() * relativeScale -- Use the same filter as the garbage images so that upscaling looks right for pixel art - local filterMin, filterMag = self.images.pop:getFilter() + local filterMin, filterMag = self.images.face:getFilter() local image = GraphicsUtil.renderToTexture( width * 16, diff --git a/docs/characters.md b/docs/characters.md index d3f3b56a..15e8db53 100644 --- a/docs/characters.md +++ b/docs/characters.md @@ -331,7 +331,11 @@ You can use the Ctrl+Shift+Alt+C shortcut to reload character graphics in the ga ### Garbage assets -See https://cdn.discordapp.com/attachments/417706389813592068/874106744392007680/garbage_ref.png for an arrangement overview. +Before creating garbage, take a look at the arrangement overview for the garbage files. + +![Arrangement overview](./images/garbageReference.png) + +These 10 sprites build a unit. Using different sizes and resolutions within these 10 sprites may lead to unexpected results. It is generally recommended to provide the full set and not make use of the built-in fallback textures. #### Filler sprites @@ -358,7 +362,7 @@ This will get drawn on top of the filler sprites. ##### face -Sprite for the center of garbage pieces of odd-numbered height (1, 3, ...) +Sprite for the center of garbage pieces of odd-numbered height (1, 3, ...), or all of them if face2 is not provided Aspect ratio: 1:1 (square) Recommended size: 96x96px diff --git a/docs/images/garbageReference.png b/docs/images/garbageReference.png new file mode 100644 index 00000000..9f28f06e Binary files /dev/null and b/docs/images/garbageReference.png differ