Repro
tmp=$(mktemp -d /tmp/goboscript-broadcast-XXXXXX)
printf 'costumes "blank.svg";\n\n' > "$tmp/stage.gs"
printf 'costumes "blank.svg";\n\nonflag {\n broadcast "hello";\n broadcast_and_wait "world";\n}\n' > "$tmp/main.gs"
printf '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>\n' > "$tmp/blank.svg"
cargo run --quiet -- build "$tmp"
python3 - <<'PY' "$tmp/$(basename "$tmp").sb3"
import json, sys, zipfile
with zipfile.ZipFile(sys.argv[1]) as z:
p=json.loads(z.read('project.json'))
for t in p['targets']:
print(t['name'], t['broadcasts'])
for b in t['blocks'].values():
if b.get('opcode', '').startswith('event_broadcast'):
print(b['inputs']['BROADCAST_INPUT'])
PY
Observed:
Stage {}
main {}
[1, [11, 'hello', 'hello']]
[1, [11, 'world', 'world']]
The broadcast inputs reference message ids, but the stage broadcasts table is empty. Current code only collects names from on "..." event handlers, so send-only broadcasts are never registered.
Expected
All literal broadcast messages used by broadcast and broadcast_and_wait should be present in the stage broadcasts table, even when no receiver exists.
Repro
Observed:
The broadcast inputs reference message ids, but the stage
broadcaststable is empty. Current code only collects names fromon "..."event handlers, so send-only broadcasts are never registered.Expected
All literal broadcast messages used by
broadcastandbroadcast_and_waitshould be present in the stagebroadcaststable, even when no receiver exists.