Skip to content

Not setting macro causes an exception #1996

@ike709

Description

@ike709

This is from Eternia:

window "main"
    elem "main"
        type = MAIN
        pos = 281,0
        size = 1487x714
        anchor1 = -1,-1
        anchor2 = -1,-1
        is-default = true
        saved-params = "pos;size"
        on-size = "WindowResize"
        statusbar = false
        icon = 'icons\\interface\\titlescreen\\images\\meranthe_logo.png'

macro defaulting to an empty string causes a KeyNotFound exception in ControlWindow.cs: public InterfaceMacroSet Macro => _interfaceManager.MacroSets[WindowDescriptor.Macro.AsRaw()];

According to the ref, it seems this field is optional so we just need to support it being null or empty.

https://www.byond.com/docs/ref/#/{skin}/param/macro

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientInvolves the OpenDream clientbugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions