Player row plate sprite for the player list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-14 10:05:48 +03:00
co-authored by Claude Opus 5.5
parent 476d58d9e5
commit 772c8582c4
3 changed files with 11 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

@@ -0,0 +1 @@
{"gui": {"scaling": {"type": "nine_slice", "width": 32, "height": 8, "border": 1}}}
+10
View File
@@ -643,6 +643,16 @@ def main() -> None:
for (y, x), (ty, tx) in (((1, 1), (0, 0)), ((1, 28), (0, 13)), ((28, 1), (13, 0)), ((28, 28), (13, 13))): for (y, x), (ty, tx) in (((1, 1), (0, 0)), ((1, 28), (0, 13)), ((28, 1), (13, 0)), ((28, 28), (13, 13))):
frame[y:y + 3, x:x + 3, :3] = casing_tile[ty:ty + 3, tx:tx + 3] frame[y:y + 3, x:x + 3, :3] = casing_tile[ty:ty + 3, tx:tx + 3]
Image.fromarray(frame, 'RGBA').save(sprites / 'tab_frame.png') Image.fromarray(frame, 'RGBA').save(sprites / 'tab_frame.png')
# a player's row: a recessed strip of darker wood, shadow above, the frame's light below
row = np.zeros((8, 32, 4), np.uint8)
row[..., 3] = 255
row[:, :, :3] = np.clip(np.tile(casing_wood / 0.8, (1, 2, 1))[:8, :32] * 0.34, 0, 255)
row[0, :, :3] = np.clip(row[0, :, :3] * 0.5, 0, 255)
row[:, 0, :3] = np.clip(row[:, 0, :3] * 0.6, 0, 255)
row[7, :, :3] = casing_tile[1, 8]
Image.fromarray(row, 'RGBA').save(sprites / 'tab_row.png')
(sprites / 'tab_row.png.mcmeta').write_text(
'{"gui": {"scaling": {"type": "nine_slice", "width": 32, "height": 8, "border": 1}}}\n', encoding='utf-8', newline='\n')
(sprites / 'tab_frame.png.mcmeta').write_text( (sprites / 'tab_frame.png.mcmeta').write_text(
'{"gui": {"scaling": {"type": "nine_slice", "width": 32, "height": 32, "border": 4}}}\n', encoding='utf-8', newline='\n') '{"gui": {"scaling": {"type": "nine_slice", "width": 32, "height": 32, "border": 4}}}\n', encoding='utf-8', newline='\n')