Files

666 B
Raw Permalink Blame History

FarawayOrbAgg.js — isFarawayDusman() (satır 55)

← FarawayOrbAgg.js · ← Master

function isFarawayDusman(entity)
{
    var states = entity.getStates();
    
    if (states == null || !states.has("FarawayDusman"))
    {
        return false;
    }

    var text = String(states.getString("FarawayDusman")).toLowerCase();

    if (text == "true" || text == "1" || text == "yes" || text == "evet")
    {
        return true;
    }

    if (states.getNumber("FarawayDusman") == 1)
    {
        return true;
    }

    return text == "" || text == "null" || text == "undefined";
}