/// <summary> /// Creates a new instance of Content. /// </summary> /// <param name="basePath">Path to client directory.</param> /// <param name="device">A GraphicsDevice instance.</param> private Content(string basePath, GraphicsDevice device) { this.BasePath = basePath; this.Device = device; UIGraphics = new UIGraphicsProvider(this, Device); AvatarMeshes = new AvatarMeshProvider(this, Device); AvatarBindings = new AvatarBindingProvider(this); AvatarTextures = new AvatarTextureProvider(this, Device); AvatarSkeletons = new AvatarSkeletonProvider(this); AvatarAppearances = new AvatarAppearanceProvider(this); AvatarOutfits = new AvatarOutfitProvider(this); AvatarAnimations = new AvatarAnimationProvider(this); AvatarPurchasables = new AvatarPurchasables(this); AvatarHandgroups = new HandgroupProvider(this, Device); WorldObjects = new WorldObjectProvider(this); WorldFloors = new WorldFloorProvider(this); WorldWalls = new WorldWallProvider(this); WorldObjectGlobals = new WorldGlobalProvider(this); Audio = new Audio(this); Init(); }
public PatternReplaceCount(bool floor) { if (Floors == null) { var content = Content.Content.Get(); Walls = content.WorldWalls; Floors = content.WorldFloors; } FloorMode = floor; Cost = 0; Total = 0; }
/// <summary> /// Creates a new instance of Content. /// </summary> /// <param name="basePath">Path to client directory.</param> /// <param name="device">A GraphicsDevice instance.</param> private Content(string basePath, GraphicsDevice device) { this.BasePath = basePath; this.Device = device; Changes = new ChangeManager(); UIGraphics = new UIGraphicsProvider(this); AvatarMeshes = new AvatarMeshProvider(this, Device); AvatarBindings = new AvatarBindingProvider(this); AvatarTextures = new AvatarTextureProvider(this, Device); AvatarSkeletons = new AvatarSkeletonProvider(this); AvatarAppearances = new AvatarAppearanceProvider(this); AvatarOutfits = new AvatarOutfitProvider(this); AvatarAnimations = new AvatarAnimationProvider(this); AvatarPurchasables = new AvatarPurchasables(this); AvatarHandgroups = new HandgroupProvider(this, Device); AvatarCollections = new AvatarCollectionsProvider(this); AvatarThumbnails = new AvatarThumbnailProvider(this, Device); WorldObjects = new WorldObjectProvider(this); WorldFloors = new WorldFloorProvider(this); WorldWalls = new WorldWallProvider(this); WorldObjectGlobals = new WorldGlobalProvider(this); WorldCatalog = new WorldObjectCatalog(); Audio = new Audio(this); GlobalTuning = new Tuning(Path.Combine(basePath, "tuning.dat")); Init(); }
public static int GetArchValue(VMArchitecture arch) { Floors = GameContent.Get.WorldFloors; Walls = GameContent.Get.WorldWalls; int value = 0; for (int level = 0; level < arch.Stories; level++) { var walls = arch.Walls[level]; var floors = arch.Floors[level]; int index = 0; for (int y = 0; y < arch.Height; y++) { for (int x = 0; x < arch.Width; x++) { if (arch.FineBuildableArea[index]) { var floor = floors[index]; var wall = walls[index]; if (floor.Pattern > 0) { value += GetFloorPrice(floor.Pattern); } if (wall.Segments > 0) { if ((wall.Segments & WallSegments.AnyDiag) > 0) { value += GetWallPrice(wall.TopRightStyle); if (wall.TopLeftPattern != 0) { value += GetFloorPrice(wall.TopLeftPattern) / 2; } if (wall.TopLeftStyle != 0) { value += GetFloorPrice(wall.TopLeftStyle) / 2; } if (wall.BottomLeftPattern != 0) { value += GetPatternPrice(wall.BottomLeftPattern); } if (wall.BottomRightPattern != 0) { value += GetPatternPrice(wall.BottomRightPattern); } } else { if ((wall.Segments & WallSegments.TopLeft) > 0) { value += GetWallPrice(wall.TopLeftStyle); value += GetPatternPrice(wall.TopLeftPattern); var wall2 = walls[index - 1]; value += GetPatternPrice(wall2.BottomRightPattern); } if ((wall.Segments & WallSegments.TopRight) > 0) { value += GetWallPrice(wall.TopRightStyle); value += GetPatternPrice(wall.TopRightPattern); var wall2 = walls[index - arch.Width]; value += GetPatternPrice(wall2.BottomLeftPattern); } } } } index++; } } } return(value); }