When portals are closed, if the gate layout is changed, weird things happen #15

Open
opened 2021-11-06 04:09:02 +01:00 by EpicKnarvik97 · 2 comments

If the gate layout is changed, the gate-open and gate-closed materials will still overwrite regardless if the gate no longer matches the layout at all. It can cause really weird and broken results. Part of the border may be replaced with the portal-open and portal-closed blocks.

If the button is relocated, a new button is generated. On reload, the old button is still the registered one. On restart, the new button is the working one.
Haven't really found out why this happens just yet. Everything should be removed and then loaded from disk.

I'm guessing it firstly happens when loading a portal: PortalFileHelper::loadPortal. I'm not sure which approach is the best. One option would to make portal verification mandatory, as the portals would not be loaded because of the mismatch. Another option would be to invalidate it if the layout itself is changed. No material checks, just check if the layout matrices are identical.

If the gate layout is changed, the gate-open and gate-closed materials will still overwrite regardless if the gate no longer matches the layout at all. It can cause really weird and broken results. Part of the border may be replaced with the portal-open and portal-closed blocks. If the button is relocated, a new button is generated. On reload, the old button is still the registered one. On restart, the new button is the working one. Haven't really found out why this happens just yet. Everything should be removed and then loaded from disk. I'm guessing it firstly happens when loading a portal: PortalFileHelper::loadPortal. I'm not sure which approach is the best. One option would to make portal verification mandatory, as the portals would not be loaded because of the mismatch. Another option would be to invalidate it if the layout itself is changed. No material checks, just check if the layout matrices are identical.
EpicKnarvik97 added the
bug
label 2021-11-06 04:09:02 +01:00
EpicKnarvik97 added this to the Better stargates project 2021-11-06 04:23:58 +01:00
Author
Owner

It seems like the button bug is caused by lookupBlocks not being updated, though I cannot find a reason why it wouldn't be.

It seems like the button bug is caused by lookupBlocks not being updated, though I cannot find a reason why it wouldn't be.
Author
Owner

While the button stuff seems to work fine now, I don't know how to fix the open-block and closed-block overwriting the frame of the portal. If gate verification is enabled, there is no problem, since the gates will be unregistered and untouched.

If gate verification is disabled, however, the portal's open and closed blocks overwrites anything, even the frame. I'm not sure if there is a way to fix this, maybe except checking if any border blocks are air as a kind of soft validation if validation is disabled.

While the button stuff seems to work fine now, I don't know how to fix the open-block and closed-block overwriting the frame of the portal. If gate verification is enabled, there is no problem, since the gates will be unregistered and untouched. If gate verification is disabled, however, the portal's open and closed blocks overwrites anything, even the frame. I'm not sure if there is a way to fix this, maybe except checking if any border blocks are air as a kind of soft validation if validation is disabled.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: EpicKnarvik97/Stargate#15
No description provided.