1. Hi everyone,

    I am currently working on a solution to make one of my mods easier, I was planning on using Tuple and Dictionary in the OnEntityTakeDamage, here is the function that I was making:

    Code:
            public sealed class MyKey : Tuple<Type, Type>
            {
                public MyKey(Type dataA, Type dataB) : base(dataA, dataB) { }            public Type DataA { get { return Item1; } }            public Type DataB { get { return Item2; } }
            }        Dictionary<MyKey, string> myDictinaryData = new Dictionary<MyKey, string>()
            {
                { new MyKey(typeof(BasePlayer), typeof(BasePlayer)), "Player V Player"},
                { new MyKey(typeof(BasePlayer), typeof(AutoTurret)), "Player V Turret"},
                { new MyKey(typeof(BasePlayer), typeof(BaseNpc)), "Player V NPC"},
                { new MyKey(typeof(AutoTurret), typeof(BasePlayer)), "Turret V Player"}
            };
    The issue is that in rust I get this error:
    Code:
    Error while compiling: PvXSelector.cs(691,37): error CS0246: The type or namespace name `Tuple' could not be found. Are you missing an assembly reference?
    I just want to confirm if Turpe is supported or if I have to use an alternative, if I do have to use an alternative does anyone have any recommendations/suggestions thanks.
     
  2. Wulf

    Wulf Community Admin