Rename to Work-Death Balance, add mascot favicon and rebalance rifle/grenade damage

This commit is contained in:
enne2
2026-10-15 17:15:16 +02:00
parent 2606fc5cc2
commit 21a1d5bf79
22 changed files with 352 additions and 39 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
"""Compose the boot splash: chroma-keyed mascot plus VT323 "Mat Games" lettering.
"""Compose Work-Death Balance's splash/icon using the existing MatGames mascot.
The raw mascot comes from an image generator on a flat magenta background (generators
do not emit real alpha). This script keys that background to transparency, removes
@@ -10,11 +10,12 @@ import hashlib
import json
import pathlib
from PIL import Image, ImageDraw, ImageFilter, ImageFont
from make_favicon import build_favicon
parser = argparse.ArgumentParser()
parser.add_argument('raw', type=pathlib.Path, help='raw generated image (magenta background)')
parser.add_argument('--title', default='MatGames')
parser.add_argument('--subtitle', default='"...because he was bored..."',
parser.add_argument('--title', default='Work-Death Balance')
parser.add_argument('--subtitle', default='MatGames — "...because he was bored..."',
help='second line under the title; empty string for none')
parser.add_argument('--subtitle-height', type=int, default=100)
parser.add_argument('--bottom-padding', type=int, default=30,
@@ -63,6 +64,7 @@ for y in range(source.height):
fixed_pixels[x, y] = (max(0, r - amount), g, max(0, b - amount))
mascot = fixed.convert('RGBA')
mascot.putalpha(mask)
favicon = build_favicon(mascot, root)
mascot = mascot.crop(mascot.getbbox())
if args.bottom_fade > 0:
fade = min(args.bottom_fade, mascot.height)
@@ -111,6 +113,7 @@ if args.colors > 0:
canvas.save(out, optimize=True)
manifest = json.loads((source_tools / 'manifest.json').read_text()) if (source_tools / 'manifest.json').exists() else {}
manifest.update({
'favicon': favicon,
'boot_splash': {'file': str(out.relative_to(root)), 'size': list(canvas.size), 'mode': canvas.mode,
'palette_colors': args.colors,
'sha256': hashlib.sha256(out.read_bytes()).hexdigest()},