# Glowbug (module 26: CGlowbug, "Mechanism: Lightflyer" - a small floating bug that patrols and, once
# the player is inside its 12-unit attack range, telegraphs and fires an electric beam; it dies with
# a flash, falls and breaks apart).
# Great Temple 0i_temple_hall (world 863fcd72, layer 0, the light world) holds the disc's three
# light-world GBUGs, e000500f0, e000500f8 and e000500f9.
# The steps repeat the gb2 lane's tools/cov/specs/glowbug_templehall.con: god mode with missiles and
# the scan visor, `objs Glowbug` and an `obj` of each bug, `Create` and `Activate` on all three, then
# `place` at 6, 12, 3, 20 and 3 units from the player (the attack-range window), a beam shot and a
# missile at e000500f8, the repeated `scan` of e000500f9 (ScanVisorRender), a combat-visor `obj`,
# two missiles at e000500f0, another `objs Glowbug`, then Deactivate and Delete of e000500f9 and the
# closing `objs Glowbug`.
# Evidence in the transcript: `objs Glowbug` listing the disc's three light-world bugs at f320 -
# u0460 000500f9 at (75.4, -47.8, -14.7), u044f 000500f8 at (114.1, -73.5, -16.7) and u0420
# 000500f0 at (86.8, -57.6, -19.4), 3 objects - `obj` reading hp 30/30, body state 5 and each bug's
# message map (on Patrol send Follow to its own waypoint 000500ed/f4/fb, on Dead send SetToZero to
# the pickup generator 000500c4, on DeathRattle send SetToZero to the generator 00050118 and the
# relay 0005011a), the Create/Activate sends answering `sent Create to u0420 000500f0`, each `place`
# with its new position (71.58 -42.25 -20.14 for 6 units), the beam shot `shot u0629 at u044f from
# 3.0 units` (hp 30 -> 28 at f1360) and the missile (hp -2/30, fsm Dead by f1450,
# and gone from the f2200 list: its DeathDelete removes it, which is why the late checks are `obj`
# reads and the count, never an `obj e000500f8` - console.py reports "no object with editor id" as a
# step error), the scans `scan u0460 (orbit point 82.3, -42.0, -19.3, visor flags f, download 1.5 s)
# ... orbit locked`. `scan` at f1899 reads game state 1 (soft-paused); after `visor combat`, f2001
# reads combat/state 0. The 0.5/3/6-unit beam shots at e000500f0 and the two missiles then run before
# its hp/Dead check at f2070 (before DeathDelete). The 6-unit shot comes from inside the room: the
# default line at that distance starts behind the door and correctly hits the door instead.
# `objs Glowbug` counts one at f2200 and zero at f2500 after e000500f9's Delete. This catches the
# former helper bugs: beams aimed from the player's feet hit the floor, and `visor combat` left
# a completed scan soft-paused, freezing missiles until the scan target was deleted.
# The log's `init compiled module Glowbug` line lists the whole
# compiled-module table, so it says the module is registered, not that it ran.
# Checks are game updates (@f<n>), never wall seconds. The family runs fast like the rest, measured:
# unpaced, its 2600 updates run from 0.1 s to 0.6-0.8 s and console.py connects at 0.5 s, the margin
# fishcloud (0.8 s) and gunturret (0.9 s) already run with; the transcript is byte-identical capped
# and uncapped, and between two runs of each. F=2700, last check f2500.
@f300 god 1; give missile 50; give scanVisor 1
@f320 objs Glowbug; obj e000500f0; obj e000500f8; obj e000500f9
@f340 send e000500f0 Create; send e000500f8 Create; send e000500f9 Create
@f360 send e000500f0 Activate; send e000500f8 Activate; send e000500f9 Activate
@f400 obj e000500f0; obj e000500f8; obj e000500f9
@f450 place e000500f0 player 6
@f700 obj e000500f0
@f750 place e000500f0 player 12
@f1000 obj e000500f0
@f1050 place e000500f8 player 3
@f1300 obj e000500f8
@f1350 shoot e000500f8
@f1360 obj e000500f8
@f1400 shoot e000500f8 missile
@f1450 obj e000500f8
@f1500 place e000500f9 player 20
@f1600 place e000500f0 player 3
@f1650 obj e000500f0
@f1700 obj e000500f9
@f1750 scan e000500f9 20 150
@f1780 scan e000500f9 20 150
@f1810 scan e000500f9 20 150
@f1840 scan e000500f9 20 150
@f1870 scan e000500f9
@f1899 scan
@f1900 visor combat
@f2000 obj e000500f9
@f2001 scan
@f2010 shoot e000500f0 0.5
@f2020 obj e000500f0
@f2025 shoot e000500f0 3
@f2030 obj e000500f0
@f2035 shoot e000500f0 6 dir -1 0 -0.2
@f2045 obj e000500f0
@f2050 shoot e000500f0 missile; shoot e000500f0 missile
@f2070 obj e000500f0
@f2200 objs Glowbug
@f2280 damage e000500f9 5; obj e000500f9
@f2290 fsm e000500f9 AttackTelegraph; obj e000500f9
@f2300 send e000500f9 Deactivate
@f2400 send e000500f9 Delete
@f2500 objs Glowbug
