public GetObjectById ( short id ) : FSO.SimAntics.VMEntity | ||
id | short | The entity's ID. |
return | FSO.SimAntics.VMEntity |
public VMEntity GetObjectById(short id)
{
if (ObjectsById.ContainsKey(id))
{
return ObjectsById[id];
}
return null;
}
public bool CheckWallValid(LotTilePos pos, WallTile wall) { if (pos.Level < 1 || pos.Level > ObjectsAt.Count || !ObjectsAt[pos.Level - 1].ContainsKey(pos.TileID)) { return(true); } var objs = ObjectsAt[pos.Level - 1][pos.TileID]; foreach (var id in objs) { var obj = VM.GetObjectById(id); if (obj.WallChangeValid(wall, obj.Direction, false) != VMPlacementError.Success) { return(false); } } return(true); }