adapap / OWScript

Python-like scripting language which transpiles into Overwatch Workshop script rulesets.
MIT License
37 stars 2 forks source link

"Visible To Position and String" erroneously transpiles to "Visible To, Position, and String" #18

Closed netux closed 5 years ago

netux commented 5 years ago

Since the commas separate parameters, Visible To, Position and and String count as separate parameters for the in-game parser.

Example

Input

Rule "Create a 'Hello' In-World Text at <0, 0, 0>"
    Event
        On Global

    Actions
        Create In-World Text
            Everyone
            "Hello"
            <0, 0, 0>
            1
            Clip Against Surfaces
            Visible To Position and String

Current Output

rule("Create a 'Hello' In-World Text at <0, 0, 0>") {
   Event {
      Ongoing - Global;
   }
   Actions {
      Create In-World Text(All Players(Team(All)), String("Hello", Null, Null, Null), Vector(0, 0, 0), 1, Clip Against Surfaces, Visible To, Position, And String);
   }
}

Output of recreated rule in-game (notice no commas)

rule("Create a 'Hello' In-World Text at <0, 0, 0>")
{
    event
    {
        Ongoing - Global;
    }

    actions
    {
        Create In-World Text(All Players(All Teams), String("Hello", Null, Null, Null), Vector(0, 0, 0), 1, Clip Against Surfaces,
            Visible To Position and String);
    }
}
netux commented 5 years ago

Just tested it and its still happening.