Esempio n. 1
0
        private static Int64 MergeId(long currentId, IDType type, ref Dictionary <Int64, Int64> idReplacementTable)
        {
            if (currentId == 0)
            {
                return(0);
            }

            if (idReplacementTable.ContainsKey(currentId))
            {
                return(idReplacementTable[currentId]);
            }

            idReplacementTable[currentId] = SpaceEngineersApi.GenerateEntityId(type);
            return(idReplacementTable[currentId]);
        }
Esempio n. 2
0
        private static Int64 MergeId(long currentId, IDType type, ref Dictionary<Int64, Int64> idReplacementTable)
        {
            if (currentId == 0)
                return 0;

            if (idReplacementTable.ContainsKey(currentId))
                return idReplacementTable[currentId];

            idReplacementTable[currentId] = SpaceEngineersApi.GenerateEntityId(type);
            return idReplacementTable[currentId];
        }
Esempio n. 3
0
 public static bool ValidateEntityType(VRage.MyEntityIdentifier.ID_OBJECT_TYPE type, long id)
 {
     return(MyEntityIdentifier.GetIdObjectType(id) == type);
 }
Esempio n. 4
0
 public static long GenerateEntityId(VRage.MyEntityIdentifier.ID_OBJECT_TYPE type)
 {
     return(MyEntityIdentifier.AllocateId(type));
 }