LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[IDEA] Missing "window" wrapper within rooms.

Open iomatix opened this issue 1 year ago • 5 comments

Goal Description

foreach (Window window in room.Windows) window.Break(); foreach (Door door in room.Doors) door.Break();

Notes

No response

iomatix avatar Jul 19 '25 21:07 iomatix

Okay there's solution for breaking Doors with TryBreak on BreakableDoor:

                foreach (Door door in room.Doors)
                {
                    door.IsOpened = true;
                    if (door is BreakableDoor breakable && !breakable.IsBroken)
                        breakable.TryBreak();
                }

iomatix avatar Jul 19 '25 21:07 iomatix

It wouldn't really make sense to add a Break method to the Door base class since not all doors are breakable, that's why you need to do a type check

Axwabo avatar Sep 13 '25 13:09 Axwabo

First of all, thanks for the response.

Second, My post regards windows -> more specifically the "breakable" windows to work like the breakable doors.

Third it would be QoL if the API could check if the door or window is breakable and send warning to console that the door nor window is breakable when trying to destroy it. So we could use Door.TryDestroy() instead of checking if it's breakable first of all at end-user cases. API could do the check and return e.g. BOOL value, 0 failure and 1 success to provide more info.

Regards

iomatix avatar Sep 13 '25 14:09 iomatix

Thank you for your suggestion! We've logged this issue in our internal git system for further review and tracking. Please note that this doesn't guarantee acceptance or implementation at this stage. If we need any additional information or clarification, we'll be sure to reach out to you.

Jesus-QC avatar Oct 14 '25 09:10 Jesus-QC

We've reopened this suggestion to prevent confusion and duplicate posts. As stated before, the issue has been added to our internal tracker, but that does not guarantee acceptance nor implementation.

Axwabo avatar Apr 27 '26 18:04 Axwabo