Skip to content

Light sources: lighting a candle lantern says so and plays its sound - #6619

Merged
UnhealthyKraken merged 2 commits into
RSPSApp:mainfrom
Bandit-HaxUnit:parity/items-candle-lantern-light
Nov 23, 2026
Merged

UnhealthyKraken merged 2 commits into
RSPSApp:mainfrom
Bandit-HaxUnit:parity/items-candle-lantern-light

Conversation

@Bandit-HaxUnit

@Bandit-HaxUnit Bandit-HaxUnit commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Evidence tier: captures

Server Live
Tinderbox on an unlit white candle lantern (4529) lantern becomes 4531, nothing else lantern becomes 4531, spam line "You light the lantern." and synth 3226 on the click tick, no sequence

The oil, bullseye and sapphire lanterns (OilLights) already send this line and sound; the candle lanterns in LightSources were silent.

Fix

  • server/plugins/items/LightSources.plugin.js: light-source entries can carry a spam line and a sound; the white and black candle lanterns send "You light the lantern." (ChatType.SPAM) and synth 3226 when lit. The level refusal is unchanged and sends neither.
  • docs/light-sources.md: the captured lighting facts, and the black lantern under Ours.
  • server/tests/light-sources.test.cjs: lighting either candle lantern sends exactly that spam line and sound 3226, no animation; below 4 Firemaking neither is sent.

Testing

  • node --test tests/light-sources.test.cjs: 97/97 pass; tests/darkness.test.cjs: 5/5.
  • Revert check: with main's LightSources.plugin.js and the new test, the new test fails (96 pass, 1 fail).
  • In game (agent MCP, worktree server): with a tinderbox, an unlit white (4529) and black (4532) candle lantern, each use-on gave "You light the lantern." and the slots became 4531 and 4534. The MCP doesn't report sounds; the test covers synth 3226.

Not covered

  • Ours: the black candle lantern (4532 -> 4534) wasn't captured. It gets the white one's line and sound, the same way it already shares the white one's Extinguish line.
  • The emerald and bug lanterns' lighting wasn't captured, so they stay silent.
  • Ready to test: http://localhost:3124 (parity/items-candle-lantern-light): use a tinderbox on an unlit candle lantern with 4+ Firemaking.

Reference

  • rsprox captures (rev 226): local 1000134 ticks 438, 585, 780, 1144; local 1000135 tick 221; local 1000140 tick 763 (6 of 6 lightings agree).
  • rsprox_index.py facts candle_lantern_unlit.

Self-reviewed with the review checklist at 4db9a65 (one nit: doc list spacing and header wrap, fixed).

🤖 Generated with Claude Code

Bandit-HaxUnit and others added 2 commits November 23, 2026 11:18
Live sends "You light the lantern." as a spam line and synth 3226 on the
tick a tinderbox lights the white candle lantern (rsprox local 1000134,
1000135, 1000140: 6 of 6). The black one, not captured, does the same, as
it already shares the white one's Extinguish line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bandit-HaxUnit
Bandit-HaxUnit marked this pull request as ready for review November 23, 2026 10:23
@UnhealthyKraken
UnhealthyKraken self-requested a review November 23, 2026 18:08
@UnhealthyKraken

Copy link
Copy Markdown
Collaborator

Reviewing this now (review loop, head 4db9a65).

@UnhealthyKraken UnhealthyKraken left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR #6619 at 4db9a65 (main 75a513d, integration tree eca5d953047cb374a35077001522387317179c11).

What it does

Lighting an unlit white or black candle lantern with a tinderbox now sends "You light the lantern." as a spam (filterable) line and plays synth 3226, like the oil, bullseye and sapphire lanterns in OilLights already do. The level refusal (below 4 Firemaking) is unchanged and sends neither. The light-sources:lit event and the in-slot setId are untouched.

What was checked

  • Behaviour: applyLight runs setId, refreshItems, then the spam line and sendSound(3226, 100, 0), then the event. Nothing is consumed or given, so there is no money or item risk. A second click on the now-lit lantern is not in the lights map, so a double click cannot repeat the line or sound. The torch (message) and the candle, bug and emerald entries have no spam/sound, so they stay silent as before. lightOnObject only lights the torch, so the object path is unaffected.
  • Parity (captures): I opened rsprox_transcripts/226/910167.txt, 910168.txt and 910173.txt (the PR's local 1000134, 1000135 and 1000140). All six cited lightings exist: 910167 ticks 438, 585, 780, 1144; 910168 tick 221; 910173 tick 763. Each is if_buttont (tinderbox 590 on 4529), then [message_game] type=spam, message="You light the lantern.", update_inv_partial slot -> 4531, and [synth_sound] id=3226, with no player sequence. The text is byte-identical. The related lanterns agree: the oil, bullseye and sapphire lightings in rsprox_transcripts/226/01698.txt, 227/910228.txt, 227/910481.txt, 231/03015.txt and 242/911949.txt use the same line and synth.
  • Timing nit: the docs and test comment say "on the click tick". That holds for 4 of 6 (438, 1144, 221, 763). At 910167 ticks 585 and 780 the line, slot change and synth land one tick after the if_buttont (586, 781). The server answering on the click tick is what OilLights does too, so I do not count it as a defect.
  • Wiki: Candle lantern page: level 4 Firemaking to light, no experience, no message text. It does not conflict with the recording.
  • Traced: build() entries are consumed only by light/applyLight; _test.build; the light-sources:lit event (league "Light a Torch"); extinguishAll (agility shortcuts) is unaffected; OilLights uses the same constant 3226 and sendSound(…, 100, 0) form.
  • Rules: no plugin description or config change, so no world-config-docs regeneration. No generated JSON edited. LF endings.
  • Not captured, stated honestly in the PR: the black lantern (4532 -> 4534) is given the white one's line and sound and is labelled "Ours" in the code comment and docs; emerald and bug lantern lighting stay silent.
  • Cosmetic: the header comment line added at server/plugins/items/LightSources.plugin.js:20 is 154 characters wide, though the PR says the header wrap was fixed. Not a finding.

Findings

No defects found.

Scope

ordinary

Verified

  • yarn build in server/ on the integration commit (no TypeScript in the diff): up to date.
  • tests/light-sources.test.cjs: 97/97.
  • tests/darkness.test.cjs: 5/5.
  • tests/league-task-deeds.test.cjs (real LightSources "Light a Torch"): 160/160.
  • Revert check: main's LightSources.plugin.js with the new test: 96 pass, 1 fail (the new candle lantern test). Restored with git checkout HEAD --.
  • docs/ yarn install --frozen-lockfile and yarn build (Yarn 1.22.22): build complete.
  • main+head merge tree: clean
  • generated JSON: none edited (a test run touched server/plugins/bots/data/object-index.json in the review worktree only; restored).

Not verified

  • In-game play and sound playback: not run; the PR's MCP run does not report sounds. The test mocks sendSound and sendTypedMessage; the packet encoding is shared with OilLights, which uses the same call.
  • Black lantern and emerald/bug lantern lighting: no capture exists, as the PR says.
  • tests/falador-diary.test.cjs and tests/small-conversions-preset-copies.test.cjs (they touch OilLights, which this PR does not change) were not run.

Verdict

Merge

@UnhealthyKraken
UnhealthyKraken merged commit 710c73b into RSPSApp:main Nov 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants