armoha / euddraft

System for pluginizing eudplib codes.
Other
29 stars 4 forks source link

`CUnit.statusFlags` does not save you from typo #113

Closed armoha closed 1 year ago

armoha commented 1 year ago
// example
const golTank = UnitGroup(400);

function newUnitLoop() {
    foreach(unit : EUDLoopNewCUnit()) {
        if (unit.unitType == $U("Terran Goliath")
        || unit.unitType == $U("Terran Siege Tank (Tank Mode)")
        ) {
            unit.statusFlags.IsAir = true;  // TYPO! no error, just silently skipped with no trigger
            unit.statusFlags.InAir = true;  // correct code
            golTank.add(unit);
        }
    }
}
armoha commented 1 year ago

Should be fixed in euddraft 0.9.9.8