mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
/account/items, linked from the account page and using its sign-in, gives items to the account signed in: - clothing: the item's own colours, or four colours of your own as a picker, #RRGGBB, or AJ's numbers (palette places, or the whole item's colour id signed or unsigned), converted as you type; hex colours not in the palette become an exact custom colour - den items: the variants their art has (lib/den-variants.json, made by tools/den-variants.sh) and a whole-item tint with a strength, kept in the item's version above the variant and drawn by DenItemHelper (build 83) - a preview of each: clothing icons coloured on the page as the game colours them, den items played by Ruffle in a sandboxed frame through public/item-preview.swf (tools/preview-host) a give with a custom colour id that does not exist is refused.
21 lines
1015 B
Bash
Executable File
21 lines
1015 B
Bash
Executable File
#!/bin/sh
|
|
# rebuilds public/item-preview.swf, the web item giver's den item preview
|
|
# (public/item-preview.html plays it with Ruffle): PreviewHost.as compiled by
|
|
# JPEXS (tools/ffdec, needs Java) into base.xml, a SWF of one frame holding
|
|
# only code. JPEXS can only compile a class over one already there, so
|
|
# base.xml has a PreviewHost (and an empty PreviewUnused, left from making it).
|
|
#
|
|
# tools/preview-host/build.sh [output.swf] (default: public/item-preview.swf)
|
|
set -e
|
|
cd "$(dirname "$(readlink -f "$0")")/../.."
|
|
out=${1:-public/item-preview.swf}
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
ffdec="java -jar tools/ffdec/ffdec-cli.jar"
|
|
mkdir "$work/src"
|
|
cp tools/preview-host/PreviewHost.as "$work/src/"
|
|
$ffdec -xml2swf tools/preview-host/base.xml "$work/base.swf" > "$work/log" 2>&1
|
|
$ffdec -importScript "$work/base.swf" "$work/host.swf" "$work/src" >> "$work/log" 2>&1
|
|
$ffdec -abcclean "$work/host.swf" "$out" >> "$work/log" 2>&1 || { cat "$work/log"; exit 1; }
|
|
echo "$out: $(wc -c < "$out") bytes"
|