[Linux-only] basically bloxstap for sober

update readme

+2 -89
+2 -89
README.md
··· 1 1 # TuxStrap 2 2 3 - A modern event-driven plugin system for Roblox game management, built with TypeScript and Bun. 4 - 5 - ## Features 6 - 7 - - **Event-Driven Architecture**: Direct event emission to plugins without RPC overhead 8 - - **Type-Safe Events**: Full TypeScript support with proper type checking 9 - - **Plugin System**: Easy-to-use plugin registration and management 10 - - **State Management**: Real-time game state tracking and updates 11 - - **Backward Compatibility**: Legacy hook system still supported 12 - 13 - ## Installation 14 - 15 - ```bash 16 - bun install 17 - ``` 18 - 19 - ## Usage 20 - 21 - ### Basic Setup 22 - 23 - ```typescript 24 - import { EventEmitter, registerPlugin } from "./src/index"; 25 - 26 - // Register a plugin 27 - registerPlugin({ 28 - name: "My Plugin", 29 - id: "my-plugin", 30 - forceEnable: true, 31 - configPrio: 0 32 - }, (plugin) => { 33 - // Subscribe to events 34 - const gameJoinSub = plugin.on("GAME_JOIN", (gameData) => { 35 - console.log("Joined game:", gameData.placeId); 36 - }); 3 + A modern Bloxstrap alternative for Linux, built with TypeScript and Bun. 37 4 38 - // Cleanup when done 39 - return () => gameJoinSub.unsubscribe(); 40 - }); 41 - 42 - // Emit events 43 - EventEmitter.emitGameJoin({ 44 - ipAddr: "127.0.0.1", 45 - placeId: "123456789", 46 - jobId: "test-job-id", 47 - serverType: "PUBLIC" 48 - }); 49 - ``` 50 - 51 - ### Available Events 52 - 53 - - `GAME_JOIN`: Emitted when joining a game 54 - - `GAME_LEAVE`: Emitted when leaving a game 55 - - `PLAYER_JOIN`: Emitted when a player joins 56 - - `PLAYER_LEAVE`: Emitted when a player leaves 57 - - `BLOXSTRAP_RPC`: Emitted for Bloxstrap RPC events 58 - - `STATE_CHANGE`: Emitted when game state changes 59 - 60 - ## Migration from BloxstrapRPC 61 - 62 - If you're migrating from the old BloxstrapRPC API, see the [Migration Guide](docs/EVENT_SYSTEM_MIGRATION.md) for detailed instructions. 63 - 64 - ## Development 65 - 66 - ```bash 67 - # Run the main application 68 - bun run src/index.ts 69 - 70 - # Test the event system 71 - bun run src/test-event-system.ts 72 - ``` 73 - 74 - ## Project Structure 75 - 76 - ``` 77 - src/ 78 - ├── api/ 79 - │ ├── CurrentState.ts # Game state management 80 - │ ├── EventCollector.ts # Main event collection system 81 - │ ├── EventEmitter.ts # Event emission interface 82 - │ ├── Plugin.ts # Plugin registration system 83 - │ ├── RobloxLogHooks.ts # Legacy hook system (deprecated) 84 - │ └── types.ts # TypeScript type definitions 85 - ├── plugins/ 86 - │ ├── default.ts # Default plugin configuration 87 - │ ├── example.ts # Example plugin implementation 88 - │ └── index.ts # Plugin loading 89 - └── index.ts # Main entry point 90 - ``` 91 - 92 - This project was created using `bun init` in bun v1.2.18. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 5 + wip