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]); }
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]; }
public static bool ValidateEntityType(VRage.MyEntityIdentifier.ID_OBJECT_TYPE type, long id) { return(MyEntityIdentifier.GetIdObjectType(id) == type); }
public static long GenerateEntityId(VRage.MyEntityIdentifier.ID_OBJECT_TYPE type) { return(MyEntityIdentifier.AllocateId(type)); }