Jump to content

Wrong values for the `Facing` property of IsoWindow objects


co-

Recommended Posts

When an IsoWindow is oriented either East or South, the property Facing of the window indicates a wrong value, respectively West and North.

 

For example, given an IsoWindow that is oriented East, the following code would print W in the console instead of E:

print(isoWindow:getProperties():Val("Facing"))

When the IsoWindow objects are oriented either North or West, then we get the proper values, respectively N and W
 

Here's the code I'm using to print the values in the console:

function onFillWorldObjectContextMenu(player, context, worldobjects, test)
    for _, object in ipairs(worldobjects) do
        if instanceof(object, 'IsoWindow') then
            local orientation = object:getProperties():Val('Facing')
            print('DEBUG: Window facing ' .. orientation)
        end
    end
end

Events.OnFillWorldObjectContextMenu.Add(onFillWorldObjectContextMenu)

Note: I had to crop the screenshots to fit the 4MB upload limit, but I can provide the full version if needed, just ask.

 

WestWindow_Console.png

WestWindow_ChunkDebugger.png

EastWindow_ChunkDebugger.png

EastWindow_Console.png

Edited by co-
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...