Files
WT-Offline/gui-patches/online-shop/render-retired-entitlement-log/patch.json
T
N0VAN0M4LY 4b1e226c34 feat(store): show native receipts for purchases
Persist the actual grant in the purchase log and open one native receipt per unread entry. Keep pending receipts during log trimming and resume them when the price table becomes available.

Verified TypeScript types, GUI patch application, and Quirrel syntax.
2026-11-26 10:00:19 +08:00

31 lines
2.1 KiB
JSON

{
"id": "online-shop/render-retired-entitlement-log",
"title": "Keep purchase history readable after a product is removed",
"file": "scripts/userlog/userlogviewdata.nut",
"program_behaviour": {
"stock": "The purchase history renderer looks up the recorded entitlement in the current store catalogue and passes that result to the price and name formatters.",
"patched": "Use the recorded product ID when the current catalogue no longer includes its entry."
},
"derivation": {
"requirement": "Purchase history remains readable when store tuning removes a configurable product.",
"cause": "getEntitlementConfig returns null for a removed product. The original formatter expects a table.",
"lighter_options_ruled_out": [
"Remove purchase logs when a product is removed. That loses valid acquisition history."
],
"if_not_applied": "An older purchase can trigger a script error in the user log after its catalogue entry is removed."
},
"features": [
"G-Store",
"G-Premium Account"
],
"evidence": [
"2.61.0.37 scripts/userlog/userlogviewdata.nut: EULT_BUYENTITLEMENT renderer.",
"2.61.0.37 scripts/onlineshop/entitlements.nut: getEntitlementConfig, getEntitlementPrice and getEntitlementName.",
"packages/local-service/src/store/store-tuning.ts: configurable product IDs and packs."
],
"edit": {
"find": " let ent = getEntitlementConfig(logObj.name)\r\n if (\"cost\" in logObj)\r\n ent[\"goldCost\"] <- logObj.cost\r\n local costText = getEntitlementPrice(ent)\r\n if (costText != \"\")\r\n costText = $\" ({costText})\"\r\n\r\n res.name = \"\".concat(format(loc($\"userlog/{logName}\"), getEntitlementName(ent)), costText)",
"replace": " let ent = getEntitlementConfig(logObj.name)\r\n if (ent != null && \"cost\" in logObj)\r\n ent[\"goldCost\"] <- logObj.cost\r\n local costText = ent != null ? getEntitlementPrice(ent) : \"\"\r\n if (costText != \"\")\r\n costText = $\" ({costText})\"\r\n\r\n let productName = ent != null ? getEntitlementName(ent) : logObj.name\r\n res.name = \"\".concat(format(loc($\"userlog/{logName}\"), productName), costText)"
}
}