partial void DoInit(FurniturePackData data)
 {
     this.name = this.FullId;
     this.furniture_type.Value    = data.GetVanillaFurnitureType();
     this.defaultSourceRect.Value = this.sourceRect.Value = data.GetTexture().Rect ?? new Rectangle(0, 0, data.GetTexture().Texture.Width, data.GetTexture().Texture.Height);
     this.boundingBox.Value       = new Rectangle(0, (int)(data.Configurations[0].DisplaySize.Y - data.Configurations[0].CollisionHeight) * Game1.tileSize, (int)data.Configurations[0].DisplaySize.X * Game1.tileSize, (int)data.Configurations[0].CollisionHeight * Game1.tileSize);
     this.rotations.Value         = data.Configurations.Count;
     this.UpdateRotation();
 }
示例#2
0
 partial void DoInit(FurniturePackData data)
 {
     this.name = this.FullId;
     this.furniture_type.Value     = data.GetVanillaFurnitureType();
     this.defaultSourceRect.Value  = this.sourceRect.Value = data.GetTexture().Rect ?? new Rectangle(0, 0, data.GetTexture().Texture.Width, data.GetTexture().Texture.Height);
     this.defaultBoundingBox.Value = this.boundingBox.Value = new Rectangle(0, (int)(data.Configurations[0].DisplaySize.Y - data.Configurations[0].CollisionHeight) * Game1.tileSize, (int)data.Configurations[0].DisplaySize.X * Game1.tileSize, (int)data.Configurations[0].CollisionHeight * Game1.tileSize);
     Mod.instance.Helper.Reflection.GetField <int>(this, "_placementRestriction").SetValue(2);
     this.rotations.Value = data.Configurations.Count;
     this.UpdateRotation();
 }