feat(release): declare the RunicNPC API the bridge needs (runicnpc stage 4, D224)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m36s
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m36s
overlay.toml gains runicnpc_api = 3, the release folds it into manifest.json, and checkPlugin.js holds it equal to RunicNpcApiNeeded in the code. The installer's bundle carries the latest RunicNPC release that answers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -198,6 +198,14 @@ function check(source, toml) {
|
||||
|
||||
// 5. The two declaration sites this repository owns must agree.
|
||||
const inCode = /ProtocolVersion\s*=\s*(\d+)\s*;/.exec(source)
|
||||
// runicnpc stage 4: the RunicNPC API the bridge needs, declared twice like the protocol.
|
||||
const npcToml = /^\s*runicnpc_api\s*=\s*(\d+)\s*$/m.exec(toml)
|
||||
const npcCode = /const\s+int\s+RunicNpcApiNeeded\s*=\s*(\d+)\s*;/.exec(source)
|
||||
if (npcCode && !npcToml) problems.push('the plugin needs a RunicNPC API (RunicNpcApiNeeded) and overlay.toml declares no runicnpc_api')
|
||||
if (npcCode && npcToml && npcCode[1] !== npcToml[1]) {
|
||||
problems.push(`the plugin needs RunicNPC API ${npcCode[1]} and overlay.toml declares runicnpc_api = ${npcToml[1]}. The bundle picks a RunicNPC by the second, so they must agree.`)
|
||||
}
|
||||
|
||||
const inToml = /^\s*protocol\s*=\s*(\d+)\s*$/m.exec(toml)
|
||||
|
||||
if (!inCode) problems.push('could not read ProtocolVersion from the plugin source')
|
||||
|
||||
Reference in New Issue
Block a user