Zezombye / overpy

High-level language for the Overwatch Workshop with support for compilation and decompilation.
GNU General Public License v3.0
175 stars 25 forks source link

Enumeration values are not find in settings #335

Open novalderya opened 1 year ago

novalderya commented 1 year ago

So I create an enum like

enum Ow1Dva:
    ARMOR = 300,
    HEALTH = 300,
    MICRO_MISSILES_COOLDOWN_TIME = 8,
    SHIELD = 0,
    ULT_COST = 1222,

I can access in rule some rule for example :

def initDva():
    @Name "[dva.opy]: initDva()"
     setCustomHealth(Ow1Dva.HEALTH, Ow1Dva.ARMOR, Ow1Dva.SHIELD)

But when I try to use it in the setting function :

settings {
            "heroes": { "allTeams": {
            "dva": {
                "secondaryFireMaximumTime%": 67,
                "ultGen%": percent(OW2_DVA_ULT_COST/Ow1Dva.ULT_COST)
            },
          }
       }

I get the following error : Error: ReferenceError: Ow1Dva is not defined