Skip to content

Stop walls from coming back from the dead - #5453

Merged
cwisniew merged 4 commits into
RPTools:developfrom
kwvanderlinde:bugfix/5271-wall-necromancy
May 21, 2025
Merged

Stop walls from coming back from the dead#5453
cwisniew merged 4 commits into
RPTools:developfrom
kwvanderlinde:bugfix/5271-wall-necromancy

Conversation

@kwvanderlinde

@kwvanderlinde kwvanderlinde commented May 18, 2025

Copy link
Copy Markdown
Collaborator

Identify the Bug or Feature request

Fixes issue with #5271

Description of the Change

When using the Wall tool, the selected wall is now handled more consistently. There a few facets to this:

  1. The control panel is no longer responsible for syncing changes to other clients. It used to have a bad habit of telling other clients to update their walls when the current wall may have been deleted or is a new wall that hasn't been completed yet. Now, it fires an event that the tool itself can handle and decide whether updates need to be synced. This also means the control panel only need to use the immutable Wall.Data as its model, rather than a complete and mutable Wall.
  2. In the tool itself, when a wall is modified, it is up to the specific tool mode to decide whether to sync the changes. For most modes, the sync is always done. But for DrawingWallToolMode, the selected wall is only temporary, so changes to it are not synced.
  3. Another change to the tool itself is that when the selected wall is deleted, it is also consistently nulled out and deleted on all other clients.

Beyond that, I've cleaned up a bunch of helper methods that hardly saved anything, and I found they actually obscured what was happening.

Possible Drawbacks

Should be none

Documentation Notes

N/A

Release Notes

N/A


This change is Reviewable

When the selected wall is deleted, it is always nulled out now, and that deletion is consistently broadcasted to other
clients as well. The `DrawingWallToolMode` also only sets the selected wall when it is activated, rather than setting it
while the previous tool is still active.
This responsibility is better placed in the Wall topology tool itself.

With this change, the control panel only has to manage the immutable `Wall.Data` rather than an entire `Wall`. This also
cleans the panel up a bit since it now longer has to keep track of the current zone either.
Most modes will sync any wall updates when they happen. But the `DrawingWallTopologyTool` uses a temporary wall that is
not part of the zone yet, so changes to that temporary wall should not be synced.
These methods in `Wall` and `WallTopologyTool` barely helped save keystrokes, and they somewhat obscure what is actually
going on.
@github-actions github-actions Bot added the feature Adding functionality that adds value label May 18, 2025
@kwvanderlinde kwvanderlinde self-assigned this May 18, 2025
@cwisniew
cwisniew added this pull request to the merge queue May 21, 2025
Merged via the queue into RPTools:develop with commit a8b9664 May 21, 2025
@kwvanderlinde
kwvanderlinde deleted the bugfix/5271-wall-necromancy branch May 21, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adding functionality that adds value

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Improved mouse support for V/MBL Walls.

2 participants