Spooky Doors house ads: an empty street serves one of Marty's programs instead of "Nobody's home"

When a door finds no visit pack and no video, /api/door/open serves a house ad from rates.doorHouseAds
(RM Circle, Drip Runner, Gem Kingdom, PolHunter by default; ref templates carry the player's IAP username
where the program takes a share link). Rotation: never the same program twice in a row, else the one least
recently shown to that member today. Same dwell + Halloween icon check. No advertiser charge and no campaign
imps, but it counts toward doorCapPerDay (visit_repeat row with campaign 0). Callback and receipt add
house: true and program, with credits 0, host null, campaignId 0. doorHouseAds = [] restores none=1.
Admin rates table keeps text columns as text so the list survives a save. qa/door.mjs covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-02 15:06:53 -05:00
parent dbbce34202
commit 9809953ae0
7 changed files with 69 additions and 18 deletions
+1 -1
View File
@@ -44,6 +44,6 @@ a.dr-open{color:var(--moon);font-size:12px}
<button class="dr-btn" id="sdDone" type="button" disabled>Waiting…</button>
<button class="dr-btn ghost" id="sdBack" type="button" hidden>Back to the street</button>
</div>
<script src="/assets/door.js?v=20261002a"></script>
<script src="/assets/door.js?v=20261002b"></script>
</body>
</html>