Start at the factory, add PWA install and GPS real-world mode
The game now begins inside the Negin Sazan Pishgam Radmehr Atousa vending-machine factory on the Mashhad–Chenaran road, and the world extends ~20 km along the real driving route to Park Mellat and Ferdowsi University. - Factory compound: production hall with assembly line, office, yard, gate and company signs; first mission at its half-price demo machine - Map data merged from four OSM extracts (factory zone, route corridor, region main roads, city zone), clipped to a 15 x 18 km region - City meshes chunked and culled by distance; traffic recycled around the player; minimap and city map drawn from cached tiles + overview - The Robot Market robot no longer walks with the family: it comes out of a machine when they arrive, greets them with expression portraits and goes back inside when they leave - PWA: manifest, icons from the robot avatar, offline service worker generated at build time, install button / iOS steps, update prompt; Vazirmatn font bundled instead of Google Fonts - Real-world mode: safety notice, GPS + compass tracking with accuracy smoothing, 20-40 m arrival radius, speed lock and in-person bonus Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
--teal: #3ee0c9;
|
||||
--red: #ff6b5e;
|
||||
--font: 'Vazirmatn', Tahoma, sans-serif;
|
||||
--safe-top: env(safe-area-inset-top, 0px);
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
@@ -123,6 +124,10 @@ button { font: inherit; cursor: pointer; }
|
||||
background: rgba(0, 0, 0, .55); text-align: center; font-size: 16px; line-height: 1.7;
|
||||
}
|
||||
#subtitle b { margin-inline-end: 8px; }
|
||||
#subtitle { display: flex; align-items: center; gap: 4px; }
|
||||
#subtitle[hidden] { display: none; }
|
||||
#subtitle-face { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; margin-inline-end: 10px; background: #f7fcfc; border: 2px solid var(--teal); }
|
||||
#subtitle-face[hidden] { display: none; }
|
||||
#subtitle b.robot { color: var(--teal); }
|
||||
#subtitle b.father { color: var(--gold); }
|
||||
#subtitle b.child { color: #ff9f7a; }
|
||||
@@ -275,3 +280,31 @@ dialog header { display: flex; justify-content: space-between; align-items: star
|
||||
.map-body { grid-template-columns: 1fr; grid-template-rows: 1fr 40%; }
|
||||
.map-side { border-inline-start: 0; border-top: 1px solid var(--line); }
|
||||
}
|
||||
|
||||
/* ---------- PWA: install and update ---------- */
|
||||
.brief-robot { float: left; width: 110px; height: auto; margin: -8px 0 0 8px; filter: drop-shadow(0 8px 18px rgba(62, 224, 201, .25)); }
|
||||
.brief-actions { display: flex; gap: 8px; margin-top: 8px; }
|
||||
.brief-actions button { flex: 1; padding: 10px; font-size: 13px; }
|
||||
.brief-actions button[hidden] { display: none; }
|
||||
#ios-install { width: min(420px, 92vw); padding: 22px; border-top: 3px solid var(--teal); }
|
||||
#ios-install h2 { margin: 0 0 8px; }
|
||||
#ios-install ol { line-height: 2; padding-inline-start: 20px; }
|
||||
#ios-install button { width: 100%; padding: 10px; border: 0; background: var(--teal); color: #04201b; font-weight: 800; }
|
||||
#update-toast {
|
||||
position: fixed; z-index: 60; top: calc(12px + var(--safe-top)); left: 50%; transform: translateX(-50%);
|
||||
padding: 8px 10px 8px 14px; background: var(--panel-solid); border: 1px solid var(--teal); display: flex; gap: 10px; align-items: center;
|
||||
}
|
||||
#update-toast[hidden] { display: none; }
|
||||
#update-toast button { padding: 4px 12px; border: 0; background: var(--teal); color: #04201b; font-weight: 800; }
|
||||
@media (max-width: 760px) { .brief-robot { width: 70px; } }
|
||||
|
||||
/* ---------- Real-world mode ---------- */
|
||||
#gps-status { display: block; margin-top: 2px; color: var(--gold); font-size: 12px; }
|
||||
#gps-status[hidden] { display: none; }
|
||||
#gps-toggle.on { background: var(--teal); color: #04201b; border-color: var(--teal); }
|
||||
#real-intro { width: min(460px, 92vw); padding: 22px; border-top: 3px solid var(--gold); }
|
||||
#real-intro img { float: left; border-radius: 50%; background: #f7fcfc; }
|
||||
#real-intro h2 { margin: 0 0 8px; }
|
||||
#real-intro p, #real-intro li { line-height: 1.9; font-size: 14px; }
|
||||
#real-intro ul { padding-inline-start: 18px; color: var(--dim); }
|
||||
#real-go { flex: 1; padding: 10px; border: 0; background: var(--gold); color: #1b1406; font-weight: 800; }
|
||||
|
||||
Reference in New Issue
Block a user