Skip to content

Conversation

@tiennou
Copy link

@tiennou tiennou commented Nov 25, 2025

This is about #140, where the engine does the isActive check one way and later, while in tick does it a different way, leading to a bunch of bugs where structures that should be active actually aren't and vice-versa.

This is a slightly modified version of #107, updated to work on the latest version. The gist of it is that instead of doing checkStructureAgainstController checks, those are all made as part of the room processing logic, all at once, and set an off property on the relevant objects (anything that's in STRUCTURE_CONTROLLER, as part of a new _check_active_structures intent. Then all uses of the old function are changed to look at that off property to decide whether they're actually active or not.

This has been tested on a private server, console-boosting a room up to RCL8 then checking progressive lowering of the level, and appears to work properly.

@tiennou
Copy link
Author

tiennou commented Nov 25, 2025

As an extra data point, CPU usage of .isActive() is now around 0.08-0.13, so a change to the CPU cost in docs might be warranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants