|
| 1 | +# Hytale Adapter Signal Seam (Internal) |
| 2 | + |
| 3 | +This document describes how platform-integrated modules should emit internal arena signals without adding Hytale imports or gameplay logic to LegendaryCore. |
| 4 | + |
| 5 | +## Why this exists |
| 6 | +- LegendaryCore must remain platform-agnostic and signal-only. |
| 7 | +- Platform modules (with real Hytale imports) detect gameplay conditions and post internal events onto the CoreRuntime EventBus. |
| 8 | + |
| 9 | +## Seam |
| 10 | +- `io.github.legendaryforge.legendary.core.internal.platform.hytale.HytaleSignalSource` |
| 11 | +- Bound via `new HytalePlatformAdapter(runtime, signalSource)` |
| 12 | + |
| 13 | +## Arena bounds enforcement pipeline (current) |
| 14 | +1. Platform module detects a breach (player outside arena bounds for an encounter instance). |
| 15 | +2. Platform module posts: |
| 16 | + - `ArenaBoundsViolatedEvent.withoutPosition(instanceId, playerId)` |
| 17 | +3. Core `BoundsInvariant` (legendary-only, instance-gated) posts: |
| 18 | + - `ArenaParticipationRevokedEvent(instanceId, playerId)` |
| 19 | +4. Platform module reacts (behavior lives here): |
| 20 | + - move player to spectator / prevent actions / show UI warning / etc. |
| 21 | + |
| 22 | +## Non-goals (explicit) |
| 23 | +- No teleporting or physics correction inside LegendaryCore. |
| 24 | +- No Hytale imports in LegendaryCore. |
| 25 | +- No public API changes for bounds enforcement. |
| 26 | + |
| 27 | +## Minimum implementation notes for platform module |
| 28 | +- You will need a way to map `playerId -> encounter instanceId` (content/platform-owned). |
| 29 | +- You will need arena bounds data (content/platform-owned): center + radius (v1), or AABB later. |
| 30 | +- Emit violations on tick or movement updates; de-dupe or rate-limit in platform module if desired (Core already de-dupes revoke per player per instance). |
| 31 | + |
0 commit comments