Files
browser/plugins/examples/scum-server-plugin/sql/scum-db-v57/vehicles.sql
T
npc0-hue 300390dc4d Fill the SCUM user and vehicle tables from the plugin-declared database read path
The SCUM 用户管理 list stayed empty because the typed scum_user and
scum_vehicle tables had no producer: the run ingest endpoint is signed-run
only, and the previously registered plugin templates asked for a Run
database capability the endpoint never advertises.

The plugin now declares bounded, read-only SQLite projections for players
and vehicles (sql/scum-db-v57/*.sql with query schemas), and the platform
dispatches those templates as durable remote.run.db.sqlite.query jobs on
run heartbeat and page open, then projects the returned rows into the typed
SCUM tables through the same shared ingest path used by signed run facts.
2026-09-16 18:01:33 +08:00

14 lines
434 B
SQL

SELECT
CAST(spawner.vehicle_entity_id AS TEXT) AS gameVehicleId,
entity.class AS vehicleClass,
spawner.vehicle_alias AS displayName,
1 AS existsInGame,
entity.location_x AS x,
entity.location_y AS y,
entity.location_z AS z,
strftime('%Y-%m-%dT%H:%M:%SZ', 'now') AS observedAt
FROM vehicle_spawner spawner
JOIN entity ON entity.id = spawner.vehicle_entity_id
ORDER BY spawner.vehicle_last_access_time DESC
LIMIT :limit