Add DedicatedServer with web visualizer#384
Merged
Conversation
Port the mod to compile against the latest ONI game DLLs (build 21518087). API changes addressed: - KObject.GetEventSystem() now returns bool with out parameter - AccessControl.DefaultPermission → SetDefaultPermission - SkillListable removed, replaced with IListableOption - Chore.GetSMI() moved to protected StandardChoreBase, use reflection - SafeCellMonitor type hierarchy changed (Def instead of object) - ScheduleGroup constructor gained Color parameter - PauseScreen.OnQuitConfirm() requires bool saveFirst - Chore.addToDailyReport/reportType → GetReportType() - DevTool/DevPanel/DevToolManager not available, excluded via csproj
Adapt test code to ONI API changes: - PathProber is now static, remove AddComponent<PathProber>() - Worker renamed to StandardWorker - MinionConfig.MINION_NAV_GRID_NAME moved to TUNING.DUPLICANTSTATS
…t.Sdk) Enable dotnet test execution by adding required NuGet packages and IsTestProject property. Tests now run: 70 pass, 335 fail due to HarmonyLib mprotect EACCES on macOS ARM64 (W^X security restriction).
Bump OniMinimumSupportedBuild from 577063 to 21518087 to match the game version this PR was compiled against.
- SensorsPatch: prevent Sensors.Add() from calling sensor.Update() immediately, which crashed MingleCellSensor, ClosestEdibleSensor etc. during minion setup - ScheduleManager: add to test setup so MingleCellSensor.IsAllowed() doesn't NPE - ChoreConsumerStatePatch: null-safe Schedule resolution in constructor (game code bug: GetSchedule() can return null but ctor doesn't check) - MinionIdentityPatch: suppress Debug.LogError during OnSpawn when Personality DB is empty (test environment has no personality data) - AbstractChoreTest DI: inject ChoreExtensions dependency (was missing, causing NPE in chore.Register()) - PlayableGameTest TearDown: comprehensive singleton cleanup (~30 singletons) to prevent cross-test contamination - Unity mock patches: SystemInfo.processorCount, MonoBehaviour stubs, Object companion registration - ChoresPatcher: fix Chore constructor access (became protected), handle abstract Cleanup method
…ssion
- Add TestPersonalitiesCsv constant with valid personality entry ("TestDupe")
- Set MinionIdentity.personalityResourceId to match test personality
- Remove MinionIdentityPatch (SuppressErrors hack no longer needed)
- Revert DebugLogHandlerPatch to original behavior (always throw on LogError)
- Revert unnecessary whitespace change in BehaviourPatch
- .NET 4.8 console app with HttpListener web server - Mock world state: 64x64 grid with ONI elements, temperature, mass - React + TypeScript + Vite frontend with Canvas 2D renderer - Three overlay modes: elements, temperature, mass - Zoom, pan, cell tooltips, entity markers - API endpoints: /api/world, /api/entities, /api/state - Vite proxies /api to backend in dev, builds to wwwroot for production - Skip AssemblyExposure for DedicatedServer project - Add /decompiled/ to .gitignore (game IP protection)
zed-assistant bot
added a commit
that referenced
this pull request
Mar 20, 2026
- Remove compiled wwwroot/assets/ from git (add to .gitignore) - Update web-client README with actual build/run instructions - Assets are embedded as resources in DedicatedServer.csproj Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zed-assistant bot
added a commit
that referenced
this pull request
Mar 20, 2026
- Remove compiled wwwroot/assets/ from git (add to .gitignore) - Update web-client README with actual project description Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove compiled wwwroot/assets/ from git (add to .gitignore) - Update web-client README with actual project description
68ce074 to
8766587
Compare
zed-assistant bot
added a commit
that referenced
this pull request
Mar 20, 2026
- Remove compiled wwwroot/assets/ from git (add to .gitignore) - Update web-client README with actual build/run instructions - Assets are embedded as resources in DedicatedServer.csproj
zuev93
approved these changes
Mar 20, 2026
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
DedicatedServerproject — standalone HTTP server with world state APIScreenshot
Web visualizer showing real game Grid data loaded from ONI DLLs. Sidebar shows display controls, cell inspector, and game state.
What's included
Server (
src/DedicatedServer/)WebServer.cs— lightweight HTTP server (HttpListener, port 8080)wwwroot//api/health,/api/world,/api/entities,/api/state,/api/elementsMockWorldState.cs— generates fake 64x64 ONI world with elements, temperature, massProgram.cs— console entry point with assembly resolution for game DLLsWeb Client (
src/DedicatedServer/web-client/)WorldRenderer.ts— Canvas 2D renderer with pan/zoom, cell hover infoBuild changes
DedicatedServertoOniMod.slnDirectory.Build.targetsforSkipAssemblyExposuresupportHow to run
Next steps
Phase 2 (
feature/game-loader): load real game DLLs, WorldGen, and SimDLL physics.