29 lines
2.9 KiB
Markdown
29 lines
2.9 KiB
Markdown
# Rebuild SCUM Plugin-Owned Data
|
|
|
|
## Why
|
|
|
|
The previous SCUM data implementation placed game-specific projections, gift rules, and browser callbacks in Platform. That couples every SCUM version change to Platform releases and makes the implementation larger than the required relay role.
|
|
|
|
The first rebuild still left collection acquisition behind a page-owned `同步 SCUM.db` action and did not consume supervised SCUM stdout. As a result, opening no UI means no users, squads, vehicles, or coordinates are collected, and a real BattlEye login cannot create a player or produce the expected welcome announcement.
|
|
|
|
## What Changes
|
|
|
|
- Replace the recent SCUM direct-data and game-gift additions with a generic plugin data store and generic plugin-page data bridge.
|
|
- Keep SCUM SQLite, configuration, and log access plugin-declared and dispatched through Platform to Run.
|
|
- Put SCUM `scum_*` collection names, record shapes, gift catalog/grant behavior, map rendering inputs, and feature UI in the SCUM plugin package.
|
|
- Let each plugin query template declare its own background cadence. Platform creates due jobs from the authenticated Run polling loop, so collection acquisition continues with every browser closed.
|
|
- Add plugin-declared stdout sequence projections. Platform applies the declaration generically when durable Run log batches arrive; it does not hard-code BattlEye or SCUM line formats.
|
|
- Use Steam ID as the canonical SCUM user key, merge stdout-created users with later SQLite enrichment, and replace complete snapshot collections so deleted squads, members, vehicles, flags, and map points do not remain forever.
|
|
- Remove manual database synchronization controls. The plugin page periodically rereads Platform records only; it never initiates machine collection.
|
|
- On an authentic completed login sequence, create a missing user immediately and queue the plugin-declared global new-player announcement. For an existing user, suppress duplicate logins inside ten minutes and otherwise queue the plugin-declared returning-player announcement.
|
|
|
|
## Success Criteria
|
|
|
|
- Platform exposes no SCUM-, squad-, map-, or gift-specific data API/service/model added by this change.
|
|
- The SCUM plugin can read and write its scoped platform collections for users, squads, activity, gifts, and map points through generic bridge calls.
|
|
- Version-specific SQL/config/log declarations remain in the SCUM manifest and assets.
|
|
- Existing generic lifecycle and machine-job dispatch behavior remains intact.
|
|
- Player and vehicle coordinates are acquired every three seconds, while squad and squad-member snapshots are acquired every thirty minutes, without a browser request.
|
|
- A supervised stdout BattlEye login creates or updates exactly one `scum_users` record and exactly one eligible announcement according to the ten-minute presence window.
|
|
- The SCUM page contains no `同步 SCUM.db`, refresh-projection, or equivalent machine-collection button and never substitutes sample records.
|