[codex] Add shared time manager module#317
Draft
RSamaium wants to merge 4 commits into
Draft
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
- Added client entry point with game configuration and server integration. - Created map component with grid lines, HUD elements, and event layer. - Implemented time HUD component displaying current time, date, and weather. - Configured client settings including keyboard controls and map loading. - Defined main module for client and server interactions. - Developed server module with player hooks and weather pedestal event. - Introduced time management module with calendar and lighting settings. - Set up server entry point for game execution. - Configured Vite for development with RPG.js integration. - Added TypeScript definitions for custom file extensions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR proposes a shared Time Manager design that can be registered through the existing module providers instead of adding more public methods to
RpgMap.The intended DX is:
Design
withTimeManager()in@rpgjs/commonas a shared module factory.TimeManagerin@rpgjs/serverfor authoritative server-side time control.ClientTimeManagerin@rpgjs/clientfor local display projection.__rpgjsTime.elapsedMinutes,scale,paused, andserverTimestamp.RpgMappublic API unchanged.Developer Impact
Game code can register one shared module on both client and server while using focused services for behavior:
Documentation
Adds
docs/guide/time-manager.mdand links it near the existing lighting/weather guides.Validation
pnpm vitest run packages/server/tests/time-manager.spec.tspnpm vitest run packages/server/tests/lighting.spec.ts packages/client/src/i18n.spec.ts packages/server/tests/module.spec.tspnpm --dir packages/common buildpnpm --dir packages/server buildpnpm --dir packages/client build