From 5d1e85b24154dea8ccf0fc98e54a5c0cbf32453c Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:47:18 +1000 Subject: player.availableRecipes and root.allRecipes --- source/game/StarTileDrawer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/game/StarTileDrawer.cpp') diff --git a/source/game/StarTileDrawer.cpp b/source/game/StarTileDrawer.cpp index 2fa5051..15e88f3 100644 --- a/source/game/StarTileDrawer.cpp +++ b/source/game/StarTileDrawer.cpp @@ -100,9 +100,11 @@ bool TileDrawer::produceTerrainDrawables(Drawables& drawables, return false; auto getPieceImage = [](MaterialRenderPieceConstPtr const& piece, Box const& box, MaterialHue hue, Directives const* directives) -> AssetPath { - AssetPath image = hue == 0 + String path = (hue == 0) ? strf("{}?crop={};{};{};{}", piece->texture, box.xMin(), box.yMin(), box.xMax(), box.yMax()) : strf("{}?crop={};{};{};{}?hueshift={}", piece->texture, box.xMin(), box.yMin(), box.xMax(), box.yMax(), materialHueToDegrees(hue)); + + AssetPath image(path); if (directives) image.directives += *directives; -- cgit v1.2.3