diff --git a/JotunnModStub/Assets/Hammers/ShrinkHammer_icon.png b/JotunnModStub/Assets/Hammers/ShrinkHammer_icon.png index 2647d73..a7328f5 100644 Binary files a/JotunnModStub/Assets/Hammers/ShrinkHammer_icon.png and b/JotunnModStub/Assets/Hammers/ShrinkHammer_icon.png differ diff --git a/scripts/paint_hammer_icons.py b/scripts/paint_hammer_icons.py index 2ff70a4..c5aad52 100644 --- a/scripts/paint_hammer_icons.py +++ b/scripts/paint_hammer_icons.py @@ -1,11 +1,11 @@ """Paint the two sizing hammers' icons from the vanilla hammer's, so neither can pass for it in a hotbar: Trol's Hammer gets a blue-steel head and a troll trophy, the Shrink Hammer a brass head and a -resize badge (a small square inside a big one, with an arrow between their corners). +shrink badge (four arrows pointing in at a small square, the usual sign for making smaller). Usage: py -3.14 -I paint_hammer_icons.py holds hammer.png and TrophyForestTroll.png (Sprites "hammer" and "TrophyForestTroll" from bundle 6a33a62). Writes TrolsHammer_icon.png and ShrinkHammer_icon.png there; copy them to JotunnModStub/Assets/Hammers/.""" -import sys, os +import sys, os, math sys.path.insert(0, sys.argv[1]) import numpy as np from PIL import Image, ImageDraw, ImageFilter @@ -43,9 +43,12 @@ B = 56 badge = Image.new("RGBA", (B, B), (0, 0, 0, 0)) g = ImageDraw.Draw(badge) white = (240, 240, 235, 255) -g.rectangle([4, 4, B - 5, B - 5], outline=white, width=4) # the big square -g.rectangle([4, B - 23, 22, B - 5], fill=white) # the small one, in its corner -g.line([(20, B - 21), (B - 15, 14)], fill=white, width=4) # the arrow from small to big -g.polygon([(B - 9, 9), (B - 27, 12), (B - 12, 27)], fill=white) +c = B // 2 +g.rectangle([c - 7, c - 7, c + 7, c + 7], fill=white) # the piece, made small +for dx, dy in ((-1, -1), (1, -1), (-1, 1), (1, 1)): # and the arrows closing in on it + start, tip = (c + dx*25, c + dy*25), (c + dx*11, c + dy*11) + g.line([start, tip], fill=white, width=3) + a = math.atan2(tip[1] - start[1], tip[0] - start[0]) + g.polygon([tip] + [(tip[0] - 10*math.cos(a + s), tip[1] - 10*math.sin(a + s)) for s in (-0.5, 0.5)], fill=white) icon.alpha_composite(with_rim(badge), (S - B - 4, S - B - 4)) icon.save(os.path.join(d, "ShrinkHammer_icon.png"))