private static ValueGroupType[] GetEnumTypes()
        {
            var enums = EnumData.GetEnumData();

            ValueGroupType[] types = new ValueGroupType[enums.Length];
            for (int i = 0; i < types.Length; i++)
            {
                types[i] = new ValueGroupType(enums[i], !enums[i].ConvertableToElement());
            }
            return(types);
        }
 public EnumValuePair(ElementEnumMember member, bool constant, ValueGroupType type) : base(member.CodeName(), type, constant ? CompletionItemKind.Constant : CompletionItemKind.EnumMember)
 {
     Member     = member;
     _type      = type;
     Attributes = new VariableInstanceAttributes()
     {
         CanBeSet = false,
         UseDefaultVariableAssigner = false,
         CanBeIndexed = false,
         StoreType    = StoreType.None
     };
     // todo: token type
     // TokenType = Deltin.Deltinteger.Parse.SemanticTokenType.EnumMember;
 }
        public void GetDefaults()
        {
            _anyType     = new AnyType(_deltinScript);
            _unknownType = new AnyType("?", true, _deltinScript);
            AddType(_anyType);
            AddType(_playerType);
            AddType(_vectorType);
            AddType(_numberType);
            AddType(_stringType);
            AddType(_booleanType);
            // Enums
            foreach (var type in ValueGroupType.GetEnumTypes(this))
            {
                AddType(type);
            }

            _deltinScript.GetComponent <Pathfinder.PathfinderTypesComponent>();

            _deltinScript.PlayerVariableScope = _playerType.PlayerVariableScope;
        }
 public override CodeParameter[] Parameters() => new CodeParameter[]
 {
     new CodeParameter("relativePlayer", "The player to whom the resulting vector will be relative."),
     new CodeParameter("transformation", "Specifies whether the vector should receive a rotation and a translation (usually applied to positions) or only a rotation (usually applied to directions and velocities).", ValueGroupType.GetEnumType <Transformation>())
 };
 public override CodeParameter[] Parameters() => new CodeParameter[]
 {
     new CodeParameter("other", "The vector to determine line of site."),
     new CodeParameter("barriers", "Defines how barriers affect line of sight.", ValueGroupType.GetEnumType <BarrierLOS>(), new ExpressionOrWorkshopValue(EnumData.GetEnumValue(BarrierLOS.NoBarriersBlock))),
 };