Dlc multiplayer maintenance#386
Open
JiangNanGenius wants to merge 12 commits into
Open
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
* Fix build compatibility with current ONI version
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
* Fix test project build compatibility with current ONI version
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
* Add test runner infrastructure (NUnit3TestAdapter + Microsoft.NET.Test.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).
* Update minimum supported game build to current version
Bump OniMinimumSupportedBuild from 577063 to 21518087 to match
the game version this PR was compiled against.
* Fix test infrastructure: 116->331 passing tests (300->85 failures)
- 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
* Fix personality lookup: provide test CSV data instead of error suppression
- 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
* Add DedicatedServer with web visualizer (React + TypeScript + Vite)
- .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)
* Add visualizer screenshot for PR onimp#384
* fix: address PR onimp#384 review comments
- Remove compiled wwwroot/assets/ from git (add to .gitignore)
- Update web-client README with actual project description
* fix: remove screenshot from repo (keep in PR description only)
---------
Co-authored-by: zed-assistant[bot] <268705864+zed-assistant[bot]@users.noreply.github.com>
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.
No description provided.