ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
207 stars 24 forks source link

fix map decompile #428

Closed CactusPuppy closed 1 year ago

CactusPuppy commented 1 year ago

This PR fixes an issue with decompiling modes copied from Overwatch caused by the addition of a "0" following map names.

An example may illustrate this better. Previously maps would be listed as follows:

Deathmatch
{
    Self Initiated Respawn: Off

    enabled maps
    {
        Château Guillard
        Ilios Lighthouse
        Ilios Ruins
        Ilios Well
        Kanezaka
        Lijiang Control Center
        Lijiang Garden
        Lijiang Night Market
        Malevento
        Nepal Sanctum
        Nepal Shrine
        Nepal Village
        Oasis City Center
        Oasis Gardens
        Oasis University
        Petra
    }
}

However, now maps are listed as follows:

Deathmatch
{
    Self Initiated Respawn: Off

    enabled maps
    {
        Château Guillard 0
        Ilios Lighthouse 0
        Ilios Ruins 0
        Ilios Well 0
        Kanezaka 0
        Lijiang Control Center 0
        Lijiang Garden 0
        Lijiang Night Market 0
        Malevento 0
        Nepal Sanctum 0
        Nepal Shrine 0
        Nepal Village 0
        Oasis City Center 0
        Oasis Gardens 0
        Oasis University 0
        Petra 0
    }
}

The addition of the trailing zero caused the decompiler to fail. This PR allows the decompilation of both older modes and newer.